Usage
Available flags
Project configuration
The name of your project directory. Must be a valid npm package name (lowercase, no spaces).Example:
npx create-nextjs-dapp my-awesome-dappBlockchain to use for your dApp.Options:
evm, solanaDefault: evmExample: --chain solanaWallet provider to integrate.EVM options:
rainbowkit, connectkit, privy, dynamic, reown, thirdweb, getparaSolana options: wallet-adapter, privy, dynamic, reown, thirdwebExample: --wallet rainbowkitAutomation flags
Skip all prompts and use default values.Defaults used:
- Project name:
my-dapp - Chain:
evm - Wallet:
rainbowkit(for EVM) orwallet-adapter(for Solana)
npx create-nextjs-dapp --yesPackage manager
Use npm as the package manager.Example:
npx create-nextjs-dapp my-app --use-npmUse yarn as the package manager.Example:
npx create-nextjs-dapp my-app --use-yarnUse pnpm as the package manager.Example:
npx create-nextjs-dapp my-app --use-pnpmUse bun as the package manager.Example:
npx create-nextjs-dapp my-app --use-bunIf no package manager flag is specified, the CLI will auto-detect from your environment (checking for
npm_config_user_agent or looking for lock files).Post-creation options
Initialize a git repository after creating the project.Example:
npx create-nextjs-dapp my-app --gitAutomatically install dependencies after project creation.Example:
npx create-nextjs-dapp my-app --installHelp and version
Show help message with all available options.Example:
npx create-nextjs-dapp --helpShow the current version of create-nextjs-dapp.Example:
npx create-nextjs-dapp --versionExamples
Basic usage
Create a project with interactive prompts:Create with project name
Specify the project name and answer prompts for chain and wallet:Complete non-interactive setup
Create an EVM dApp with RainbowKit, no prompts:Solana project
Create a Solana dApp with Dynamic:Quick start with defaults
Use default values for everything:Full setup with git and dependencies
Create project, initialize git, and install dependencies:Specific package manager
Create project using pnpm:Combining multiple flags
Create an EVM dApp with Privy, using bun, with git initialization:Validation and error handling
Project name validation
The project name must be a valid npm package name:src/cli/args.ts
Chain and wallet compatibility
The CLI validates that your wallet provider supports your chosen blockchain:--yes), the CLI will exit with an error.
From the source code:
src/cli/prompts.ts
Directory conflicts
If the target directory already exists and contains files: Interactive mode: You’ll be prompted to confirm overwriting Non-interactive mode: The CLI exits with an error listing the conflicting filesWhen to use flags vs interactive mode
Use interactive mode when:
- You’re creating a project manually
- You want to see all available options
- You’re new to the tool
- You want descriptions for each provider
Use flags when:
- Automating in CI/CD pipelines
- You know exactly what you want
- Creating multiple similar projects
- Writing scripts or documentation
Flag precedence
When both flags and prompts are used:- Flags take precedence - If a flag is provided, that value is used
- Missing flags trigger prompts - If a flag is not provided, you’ll be prompted
--yesoverrides prompts - The--yesflag skips all prompts and uses defaults
Getting help
View the help message with examples:- All available flags
- List of wallet providers by blockchain
- Common usage examples
- Link to documentation
Explore wallet providers
Learn about all 8 wallet providers and how to choose the right one