Create Onchain
A CLI tool to bootstrap your Base onchain apps and Farcaster Mini-Apps with best practices and modern tooling.
🚀 Quickstart
Create a new project:
npx create-onchain
npx create-onchain --mini
npx create-onchain --template-<template>
Available Templates:
- onchainkit: Create an OnchainKit project
- minikit-basic: Create a Demo Mini-App
- minikit-snake: Create a Snake Game Mini-App
npx create-onchain --manifest
npx create-onchain --help
npx create-onchain --version
📦 Templates
OnchainKit Template
A Next.js template with OnchainKit pre-configured for building Base onchain apps:
- Next.js 14+ with App Router
- OnchainKit components and hooks
- Wagmi for wallet connection
- Tailwind CSS for styling
- TypeScript support
- ESLint and Prettier configured
npx create-onchain
npx create-onchain --template=onchainkit
MiniKit Basic Template
A template optimized for building Farcaster Mini-Apps:
- Next.js 14+ with App Router
- MiniKit components and hooks
- Farcaster Frame utilities
- OnchainKit for Wallet Connection
- OnchainKit for sample Transaction
- Tailwind CSS for styling
- TypeScript support
- ESLint and Prettier configured
npx create-onchain --mini
npx create-onchain --template=minikit-basic
MiniKit Snake Template
A template optimized for building Farcaster Mini-Apps:
- Next.js 14+ with App Router
- MiniKit components and hooks
- Farcaster Frame utilities
- Demo Snake game
- OnchainKit for Wallet Connection
- OnchainKit for sample Attestation Transaction
- OnchainKit Identity components to display addresses
- Tailwind CSS for styling
- TypeScript support
- ESLint and Prettier configured
npx create-onchain --template=minikit-snake
🔧 Development
Requirements
Getting Started
pnpm install
pnpm dev
pnpm build
Testing
pnpm test
pnpm test:coverage
📖 Mini-App Manifest Generation
When using --manifest
, the tool will:
- Launch a UI to connect your Farcaster custody wallet
- Generate and sign your manifest
- Save it to your
.env
file as:
FARCASTER_HEADER
FARCASTER_PAYLOAD
FARCASTER_SIGNATURE
🌊 License
This project is licensed under the MIT License - see the LICENSE.md file for details