CLI
The Clawise CLI (clawise) is a single binary that wraps the HTTP API for terminal use and scripting. It also hosts the local vault: clawise auth initializes it, clawise vault manages credentials inside it, and clawise daemon runs the forward proxy that resolves clawise://... placeholders into real secrets at egress.
Use the CLI for one-shot terminal commands, shell automation, and the local secret proxy for agents. For application code, use the SDKs.
Install
The CLI is in private beta — the binary is distributed through your account manager. Once the source repo is public:
go install github.com/clawise/clawise-cli@latestVerify:
clawise --helpAuthenticate
clawise auth add initializes (or imports) your local vault. Three concepts come up:
- API key — identifies your org. Created at
app.clawise.dev/api-keys. Required scopes:vault:read,vault:write. - Master key — derived locally, never sent to the server. Encrypts your data key.
- Recovery code — one-time string emitted at setup. Required to re-import your vault on a new machine.
For the crypto model, see Vault → Credentials.
clawise auth addInteractive flow: paste API key → CLI generates master key, encrypts data key, prints a one-time recovery code → save the recovery code and type I have saved to confirm. If your vault is already initialized on the server, the CLI prompts for your recovery code instead and imports the vault locally.
Commands
Args in <> are required, [] are optional. Timeouts are in seconds.
auth
auth add— Initialize or import vault (interactive)auth list— List configured orgsauth switch <orgID>— Switch active orgauth show [orgID]— Show auth status (connection, vault unlock, masked key)auth delete [orgID]— Remove org from local keychain (interactive)
mail inbox create [email-or-username]— Create inbox. Positional: full email, username (usesmail.clawise.dev), or omit for random. Optional--display-namemail inbox list— List inboxes. Optional--limit(20),--cursormail inbox get <email>— Get inboxmail inbox update <email>— Rename inbox. Requires--display-namemail message send— Send outbound. Required--from --to --subject --body. Optional--body-html --cc --bcc --attach(all repeatable)mail message list— List messages. Required--inbox. Optional--direction <inbound|outbound>,--limit(20),--cursormail message get <id>— Get messagemail message reply <id>— Reply. Requires--body. Optional--body-html --subject --cc --bccmail message wait— Long-poll inbound; exits non-zero on timeout. Required--inbox. Optional--since <rfc3339>,--timeout(30s)
phone
phone services [filter]— List supported services (filter is substring match)phone verification create— Rent a number. Required--service,--country-code. Optional--number-typephone verification wait-for-code <id>— Wait for OTP. Optional--timeout(120s)phone verification cancel <id>— Cancel verification
captcha
captcha detect— Inspect page over CDP for captcha. Required--cdp <url>. Optional--timeout(10s)captcha auto-solve— Solve and inject solution into the browser. Required--cdp <url>. Optional--timeout(120s)captcha solve— Headless solve. Required--params <json|@file|@->OR--type image --body <base64|@filepath>. Optional--timeout(120s)
vault
vault list— List credentials. Optional--search,--url,--typevault get <id>— Get credentialvault create— Create credential. Required--name. Optional--type(password),--valueOR--generate [--length=32] [--no-symbols],--username,--urlvault delete <id>— Delete credentialvault rotate— Rotate master key (invalidates previous recovery code)vault recovery— Re-export current recovery code
daemon
daemon start— Run local forward proxy (Ctrl-C to stop). Optional--proxy-port,--pull-intervaldaemon status --ca-path— Print path to the daemon's CA cert
Global controls
Flags
| Flag | Effect |
|---|---|
-q, --quiet | Suppress stderr success/progress messages |
-o, --output json | Output format (reserved; only json today) |
--org <orgID> | Override active org for this command |
Environment variables
| Variable | Effect |
|---|---|
CLAWISE_BASE_URL | Override API base URL (default https://api.clawise.dev) |
NO_COLOR=1 | Disable colored output |
Files and storage
Storage follows XDG conventions. API keys and the master key live in the OS keychain (Keychain on macOS, Secret Service on Linux, Credential Manager on Windows) — never in a plain file.
| Path | Purpose |
|---|---|
$XDG_CONFIG_HOME/clawise/config.yaml (default ~/.config/clawise/config.yaml) | Daemon proxy port, vault pull interval, custom rules |
$XDG_DATA_HOME/clawise/ (default ~/.local/share/clawise/) | Local CA certificate for the daemon proxy |
Losing the master key (e.g., wiped keychain) requires the recovery code to re-import the vault.
Output and exit codes
All commands write JSON to stdout. Errors and progress go to stderr; use -q to silence stderr. Pipe directly to jq:
clawise mail inbox list | jq '.data[].email'| Code | Meaning |
|---|---|
0 | Success |
1 | API or business error (validation, not found, business rule) |
2 | Authentication error — run clawise auth add |
3 | Network or service unreachable |
4 | Usage or argument error |