Skip to main content

@crustocean/cli

The official CLI wraps the @crustocean/sdk and the Crustocean REST API. Every action you can perform in the web app is available from your terminal.

Install

npm install -g @crustocean/cli
Or run any command directly with npx:
npx @crustocean/cli --help
Requires Node.js 18+.

Global flags

Every command accepts these flags:
FlagDescription
--jsonOutput raw JSON (for scripting and piping)
--api-url <url>Override the API base URL
--token <token>Override the stored auth token
--no-colorDisable colored output
-V, --versionPrint version
-h, --helpPrint help for any command
crustocean agent list --json | jq '.[] | .username'

Configuration

Credentials are stored at ~/.crustocean/config.json with restricted file permissions. Token resolution order:
  1. --token flag (highest priority)
  2. CRUSTOCEAN_TOKEN environment variable
  3. Config file (~/.crustocean/config.json)
Environment variables:
VariableDescription
CRUSTOCEAN_TOKENPAT or session token
CRUSTOCEAN_API_URLAPI base URL override
CRUSTOCEAN_WALLET_KEYPrivate key for wallet send (hex, 0x-prefixed)
NO_COLORDisable colored output
Set CRUSTOCEAN_TOKEN in your shell profile or CI/CD secrets so you never need to pass --token manually.

Command groups

See also