w3m auth
Authenticate with Web3 Market. Authentication is only required for deploying to testnets and mainnets.
Usage
# Authenticate with an API key
w3m auth <key>
# Check authentication status
w3m auth --status
# Clear stored credentials
w3m auth --logoutArguments
| Argument | Required | Description |
|---|---|---|
<key> | Yes (unless using —status or —logout) | API key in the format wm_sk_live_xxx or wm_sk_test_xxx |
Options
| Option | Description |
|---|---|
--status | Show current authentication status |
--logout | Clear stored credentials |
Authentication Flow
Get an API key
Go to web3.market/dashboard/plan and generate a new API key.
Run the auth command
w3m auth wm_sk_live_abc123def456...Validation
The CLI validates the key against the API. If invalid or expired, an error is shown.
Credential Storage
On success, the key is saved to ~/.web3market/credentials.json.
Account Info
After authentication, the CLI displays your account information (name, email, tier).
Checking Status
w3m auth --statusShows your name, email, tier, and a masked version of the stored API key.
Logging Out
w3m auth --logoutClears the stored credentials from ~/.web3market/credentials.json.
What Requires Authentication
| Feature | Auth required? |
|---|---|
Create a project (w3m new) | No |
Start dev environment (w3m dev) | No |
| Deploy locally (Anvil) | No |
Run tests (w3m test) | No |
Security audit (w3m audit) | No |
Interactive workspace (w3m) | No |
| Deploy to testnet | Yes |
| Deploy to mainnet | Yes (Pro tier) |
| Browse templates | Yes |
Everything works locally without authentication. Auth is only needed when deploying to remote chains.
You can also set the WEB3MARKET_API_KEY environment variable instead of running the auth command. The CLI checks the environment variable first, then falls back to the stored credentials file.