CLI Reference
The w3m CLI handles project creation, component management, code generation, testing, deployment, and the interactive workspace.
Version: 0.3.0
Installation
# npm
npm install -g @web3marketlabs/cli
# pnpm
pnpm add -g @web3marketlabs/cliAfter installation, both w3m and web3market are available as global commands.
w3m --version
# 0.3.0Interactive Workspace
Running w3m with no arguments opens the interactive workspace. The menu adapts to your context:
| Context | What happens |
|---|---|
| Inside a project directory | Opens the project workspace menu (works without auth) |
| Not in a project, authenticated | Shows recent projects, create, browse templates |
| Not in a project, not authenticated | Shows recent projects, create, authenticate |
Project workspace menu
When inside a project directory, the workspace shows:
| Option | Description |
|---|---|
| Dev environment | Local chain + frontend |
| Deploy | Pick a chain (Local, testnet, mainnet) |
| AI customize | Modify contracts & frontend (single-shot) |
| AI Chat | Interactive multi-turn AI conversation |
| Auto-fix | Diagnose & repair build errors with AI |
| Deployments | Shows deployed contracts (only if deployments exist) |
| Test | Forge test suite (only if project has contracts) |
| Audit | Security analysis (only if project has contracts) |
| Switch project | Open a different project |
| Exit | Close the workspace |
Local deployment from the workspace menu works without authentication. Select “Deploy” > “Local (Anvil)” to start Anvil, build, deploy, and see a summary.
Remote chain deployment (testnets, mainnets) requires authentication and environment variables.
Commands
Command Summary
| Command | Description |
|---|---|
w3m | Open interactive workspace |
w3m auth <key> | Authenticate with Web3 Market using an API key |
w3m auth --status | Show current authentication status |
w3m auth --logout | Clear stored credentials |
w3m new [name] | Create a new project (aliases: init, create) |
w3m add <component> | Add a component to your project |
w3m dev | Start local development environment |
w3m deploy --chain <chain> | Deploy contracts to a chain (requires auth) |
w3m test | Run contract and TypeScript tests |
w3m generate | Run codegen pipeline to generate TypeScript bindings |
w3m templates | Browse available project templates |
w3m chat | Interactive AI chat session for iterative code changes |
w3m fix | AI-powered build error fixing |
w3m audit | Run security checks on local contracts |
w3m publish | Publish a product to the Web3 Market marketplace |
w3m products | List your published marketplace products (alias: my-products) |
w3m status | Show account and project info |
w3m deployments | View deployment history |
w3m projects | Manage tracked projects |
What Requires Authentication
| Feature | API key | AI provider | Plan |
|---|---|---|---|
Create a project (w3m new) | No | No | Free |
Start dev environment (w3m dev) | No | No | Free |
| Deploy locally (Anvil) | No | No | Free |
Run tests (w3m test) | No | No | Free |
Security audit (w3m audit) | No | No | Free |
Interactive workspace (w3m) | No | No | Free |
Auto-fix (w3m fix) | No | Yes | Free |
AI Chat (w3m chat) | Yes | Yes | Free |
AI contract review (w3m audit --ai) | Yes | No | Pro |
Deploy to testnet (w3m deploy --chain sepolia) | Yes | No | Free |
Deploy to mainnet (w3m deploy --chain ethereum) | Yes | No | Pro |
Browse templates (w3m templates) | Yes | No | Free |
Publish (w3m publish) | Yes | No | Pro |
Global Options
| Option | Description |
|---|---|
--version | Display the CLI version |
--help | Display help for a command |