w3m new

Create a new Web3 Market dApp project. Supports both template-based and interactive blank project creation.

Aliases: init, create

w3m new [name] [--template <id>]

Arguments

ArgumentRequiredDescription
[name]NoProject name. If not provided, the wizard prompts for it interactively. Must be lowercase alphanumeric with dashes.

Options

OptionDescription
--template <id>Use a specific template: token-standard, token-tax, token-meme, token-reflection

From a Template

The fastest way to start. Templates generate a complete project with Solidity contracts, Foundry tests, deployment scripts, and a Next.js frontend.

w3m new my-token --template token-standard

Available Templates

TemplateDescription
token-standardStandard ERC-20 token (mintable, burnable)
token-taxTax token with buy/sell tax and max wallet
token-memeMeme token with trading controls and burn
token-reflectionReflection token with holder rewards

Each template prompts for parameters specific to that template. For example, token-standard asks for: token name, symbol, initial supply, mintable, burnable.

Interactive Setup (Blank Project)

If you omit --template, you’re prompted to pick a template or create a blank project with custom options:

Project Name

Enter a name for your project. Must match ^[a-z0-9-]+$.

Template Selection

Choose a template or select “Blank project” for full customization.

Blank Project Options (if selected)

  1. Contract framework — Foundry (recommended) or Hardhat
  2. Frontend framework — Next.js (recommended), Vite + React, or None
  3. Components — Select from registry (e.g. token)
  4. Chains — Multi-select target chains
  5. Package manager — pnpm (recommended), npm, yarn, or bun

What It Does

After collecting options, the CLI scaffolds your project:

  1. Creates the project directory at ./<name>
  2. Writes all project files (contracts, frontend, config)
  3. Installs dependencies via the selected package manager
  4. Installs Solidity dependencies via forge install
  5. Runs initial codegen to generate TypeScript bindings

Honest Summary

After scaffolding, you see a summary that honestly reports what succeeded and what needs manual attention:

┌  my-token is ready ─────────────────────────────────╮
│                                                      │
│  ✓ 28 files generated                                │
│  ✓ Dependencies installed                            │
│  ✓ Solidity deps installed                           │
│  ✓ Codegen complete                                  │
│                                                      │
├──────────────────────────────────────────────────────╯

If any step fails (e.g. pnpm or forge not found), it shows a warning with the manual command to run:

│  ! Dependencies need manual install (pnpm install)   │

Context-Aware “What Next?”

After the summary, you’re prompted with options based on your project type:

For projects with a frontend (all token templates):

  • Start dev environment — Starts Anvil, deploys contracts, runs Next.js at localhost:3000
  • Enter workspace — Opens the interactive menu

For contracts-only projects:

  • Deploy locally — Starts Anvil and deploys contracts
  • Enter workspace — Opens the interactive menu

Does not require authentication.

Examples

# From a template
w3m new my-token --template token-standard
 
# Interactive (prompted for template or blank)
w3m new my-project
 
# Without a name (fully interactive)
w3m new

Generated Project Structure

my-project/
  contracts/
    src/           # Solidity contracts
    test/          # Foundry tests
    script/        # Deploy scripts
    foundry.toml   # Foundry configuration
  web/             # Frontend (if selected)
    app/           # Next.js app directory
    lib/           # wagmi config
    package.json
  deployments/     # Deployment records (created on deploy)
  kit.config.ts    # Project configuration
  package.json     # Root workspace package
  .env.example     # Environment variable template
  .gitignore