CLI ReferenceOverview

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/cli

After installation, both w3m and web3market are available as global commands.

w3m --version
# 0.3.0

Interactive Workspace

Running w3m with no arguments opens the interactive workspace. The menu adapts to your context:

ContextWhat happens
Inside a project directoryOpens the project workspace menu (works without auth)
Not in a project, authenticatedShows recent projects, create, browse templates
Not in a project, not authenticatedShows recent projects, create, authenticate

Project workspace menu

When inside a project directory, the workspace shows:

OptionDescription
Dev environmentLocal chain + frontend
DeployPick a chain (Local, testnet, mainnet)
AI customizeModify contracts & frontend (single-shot)
AI ChatInteractive multi-turn AI conversation
Auto-fixDiagnose & repair build errors with AI
DeploymentsShows deployed contracts (only if deployments exist)
TestForge test suite (only if project has contracts)
AuditSecurity analysis (only if project has contracts)
Switch projectOpen a different project
ExitClose 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

CommandDescription
w3mOpen interactive workspace
w3m auth <key>Authenticate with Web3 Market using an API key
w3m auth --statusShow current authentication status
w3m auth --logoutClear stored credentials
w3m new [name]Create a new project (aliases: init, create)
w3m add <component>Add a component to your project
w3m devStart local development environment
w3m deploy --chain <chain>Deploy contracts to a chain (requires auth)
w3m testRun contract and TypeScript tests
w3m generateRun codegen pipeline to generate TypeScript bindings
w3m templatesBrowse available project templates
w3m chatInteractive AI chat session for iterative code changes
w3m fixAI-powered build error fixing
w3m auditRun security checks on local contracts
w3m publishPublish a product to the Web3 Market marketplace
w3m productsList your published marketplace products (alias: my-products)
w3m statusShow account and project info
w3m deploymentsView deployment history
w3m projectsManage tracked projects

What Requires Authentication

FeatureAPI keyAI providerPlan
Create a project (w3m new)NoNoFree
Start dev environment (w3m dev)NoNoFree
Deploy locally (Anvil)NoNoFree
Run tests (w3m test)NoNoFree
Security audit (w3m audit)NoNoFree
Interactive workspace (w3m)NoNoFree
Auto-fix (w3m fix)NoYesFree
AI Chat (w3m chat)YesYesFree
AI contract review (w3m audit --ai)YesNoPro
Deploy to testnet (w3m deploy --chain sepolia)YesNoFree
Deploy to mainnet (w3m deploy --chain ethereum)YesNoPro
Browse templates (w3m templates)YesNoFree
Publish (w3m publish)YesNoPro

Global Options

OptionDescription
--versionDisplay the CLI version
--helpDisplay help for a command