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
| Argument | Required | Description |
|---|---|---|
[name] | No | Project name. If not provided, the wizard prompts for it interactively. Must be lowercase alphanumeric with dashes. |
Options
| Option | Description |
|---|---|
--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-standardAvailable Templates
| Template | Description |
|---|---|
token-standard | Standard ERC-20 token (mintable, burnable) |
token-tax | Tax token with buy/sell tax and max wallet |
token-meme | Meme token with trading controls and burn |
token-reflection | Reflection 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)
- Contract framework — Foundry (recommended) or Hardhat
- Frontend framework — Next.js (recommended), Vite + React, or None
- Components — Select from registry (e.g.
token) - Chains — Multi-select target chains
- Package manager — pnpm (recommended), npm, yarn, or bun
What It Does
After collecting options, the CLI scaffolds your project:
- Creates the project directory at
./<name> - Writes all project files (contracts, frontend, config)
- Installs dependencies via the selected package manager
- Installs Solidity dependencies via
forge install - 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 newGenerated 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