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 --logout

Arguments

ArgumentRequiredDescription
<key>Yes (unless using —status or —logout)API key in the format wm_sk_live_xxx or wm_sk_test_xxx

Options

OptionDescription
--statusShow current authentication status
--logoutClear 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 --status

Shows your name, email, tier, and a masked version of the stored API key.

Logging Out

w3m auth --logout

Clears the stored credentials from ~/.web3market/credentials.json.

What Requires Authentication

FeatureAuth 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 testnetYes
Deploy to mainnetYes (Pro tier)
Browse templatesYes

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.