Overview
This page provides a comprehensive reference of all available flags forcreate-nextjs-dapp, including their syntax, types, defaults, and usage.
Configuration Flags
Specify which blockchain to build on.Accepted values: Interactive default: Prompts user to selectNon-interactive default (—yes):
evm, solanaShort flag: -cSyntax:evmValidation: Must be one of the valid chain values. Invalid chains exit with error.Source: src/cli/args.ts:49-69Specify which wallet provider to integrate.EVM providers: Interactive default: Prompts user to select from chain-compatible providersNon-interactive default (—yes): First provider for selected chain:Source: src/cli/args.ts:28-48, src/cli/prompts.ts:96-111
rainbowkit, connectkit, privy, dynamic, reown, thirdweb, getparaSolana providers: wallet-adapter, privy, dynamic, reown, thirdwebShort flag: -wSyntax:- EVM:
rainbowkit - Solana:
wallet-adapter
- Must be a valid wallet provider
- Must support the selected chain
- Incompatible combinations exit with error in
--yesmode - In interactive mode, prompts for compatible provider
Automation Flags
Skip all interactive prompts and use default values.Short flag: Behavior:Source: src/cli/args.ts:70-71, src/cli/prompts.ts:30
-ySyntax:- Uses default values for all missing options
- Exits with error on conflicts instead of prompting
- Exits with error on incompatible wallet/chain combinations
- Project name:
my-dapp - Chain:
evm - Wallet:
rainbowkit(EVM) orwallet-adapter(Solana) - Git: Not initialized
- Install: Not installed
Initialize a Git repository in the project directory.Syntax:Behavior:Source: src/cli/args.ts:72-73
- Runs
git initin project directory - Creates initial commit with scaffolded files
- Includes Next.js
.gitignoreconfiguration
Automatically install dependencies after project creation.Syntax:Behavior:Source: src/cli/args.ts:74-75
- Installs dependencies using detected or specified package manager
- Shows installation progress
- Validates successful installation
- Uses
--use-*flag if specified - Otherwise, detects from lock files
- Falls back to
npmif no lock files found
Package Manager Flags
Use npm as the package manager.Syntax:Behavior:Source: src/cli/args.ts:76-77
- Sets package manager to npm
- Updates
package.jsonscripts accordingly - Used by
--installflag if specified
--use-* flag should be provided. Last flag wins.Examples:Use Yarn as the package manager.Syntax:Behavior:Source: src/cli/args.ts:78-79
- Sets package manager to Yarn
- Updates
package.jsonscripts accordingly - Used by
--installflag if specified
Use pnpm as the package manager.Syntax:Behavior:Source: src/cli/args.ts:80-81
- Sets package manager to pnpm
- Updates
package.jsonscripts accordingly - Used by
--installflag if specified
Use Bun as the package manager and runtime.Syntax:Behavior:Source: src/cli/args.ts:82-83
- Sets package manager to Bun
- Updates
package.jsonscripts accordingly - Used by
--installflag if specified
Utility Flags
Display help information and exit.Short flag: Output includes:Source: src/cli/args.ts:18-21, src/cli/output.ts:30-91
-hSyntax:- Command syntax
- All available options with descriptions
- Complete wallet provider list organized by chain
- Usage examples for common scenarios
- Links to documentation
Display version number and exit.Short flag: Output format: Source: src/cli/args.ts:23-26, src/cli/output.ts:96-98
-vSyntax:create-nextjs-dapp v0.1.0Exit code: 0Version source: Read from package.json at runtimeExample:Flag Combinations
Common Patterns
Quick Start with Defaults
Production Setup
Solana Development
Testing Different Providers
CI/CD Pipeline
Flag Validation
Validation Rules
-
Unknown flags - Exit with error (src/cli/args.ts:84-85)
-
Missing values - Exit with error (src/cli/args.ts:30-31, 51-52)
-
Invalid values - Exit with error with suggestions (src/cli/args.ts:34-37, 54-58)
-
Case insensitive - Values are normalized to lowercase (src/cli/args.ts:29, 50)
-
Wallet/chain compatibility - Validated before project generation (src/cli/prompts.ts:96-111)
Quick Reference Table
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--chain | -c | string | evm | Blockchain selection |
--wallet | -w | string | First available | Wallet provider |
--yes | -y | boolean | false | Skip prompts |
--git | - | boolean | false | Initialize Git |
--install | - | boolean | false | Install dependencies |
--use-npm | - | boolean | Auto-detect | Use npm |
--use-yarn | - | boolean | Auto-detect | Use Yarn |
--use-pnpm | - | boolean | Auto-detect | Use pnpm |
--use-bun | - | boolean | Auto-detect | Use Bun |
--help | -h | boolean | - | Show help |
--version | -v | boolean | - | Show version |
Related
create command
Main command documentation and usage
Command Options
Detailed option documentation with examples