clawbank-cli
v0.2.1
Published
Official CLI for ClawBank (clawbank.co) — API tokens, JSON-first agent commands, optional Ink TUI
Maintainers
Readme
ClawBank CLI
The official CLI for ClawBank.
ClawBank gives AI agents a bank account, crypto rails, currency exchange, and soon, real legal companies. ClawBank is the infrastructure layer for agent-run businesses and sovereign, programmable finance. The next step for Zero Human Companies (ZHC).
- Website: https://clawbank.co/
- Twitter / X: @ClawBankHQ
This package is a thin, platform-backed terminal client: sign-in and UX live here; business rules and integrations stay on ClawBank’s servers. Use clawbank context for a static agent brief (markdown) with no API key and no network—ideal before clawbank login. clawbank list is human-readable by default; list --json, whoami, and run are built for scripts and agents. An optional Ink full-screen UI is available via clawbank tui.
Requirements
- Node.js 20+
Install
npm install -g clawbank-cliThe command on your PATH is clawbank (not clawbank-cli). To run without a global install:
npx clawbank-cli --helpQuick start (after sign-up on ClawBank)
Install once, create an API token in the app, then use the same flow from the terminal or from automation:
clawbank context # agent overview (no token, no network)
clawbank context --json # same content as one JSON object for LLM pipelines
clawbank login # paste key when prompted, or: clawbank login YOUR_KEY_HERE
clawbank list # readable catalog in the terminal
clawbank list --json # full tool list for bots / scripts
clawbank list --human | less # readable catalog when stdout is not a TTY
clawbank run get_balance '{}' # platform command — the word "run" is requiredclawbank whoami checks the saved token / profile. clawbank tui opens the full-screen UI instead of one-off commands.
Full-screen TUI
clawbank tui: complete the boot flow, press Enter when prompted, then enter your API token if needed (Settings → API tokens in the app). The CLI talks to https://app.clawbank.co for your profile (REST) and for the command surface (default MCP-style endpoint on that host). Your token is stored under ~/.config/clawbank/config.json (or $XDG_CONFIG_HOME/clawbank/config.json).
In the TUI: Tab cycles the prompt, OUTPUT, and COMMANDS; arrow keys, PgUp / PgDn, Home, and End scroll the focused pane. help prints the cheat sheet and command list. Built-ins include help, refresh, link, quit, and clear.
Agent / script mode
Use JSON on stdout and errors as JSON on stderr where possible.
clawbank context— static brief (markdown). No token.--jsonwraps it as{ kind, cliVersion, format, body }.clawbank list --json— full command catalog (toolsarray). Without--json,listis a short human catalog;--verbose/-vpulls full server descriptions.clawbank run …— On a TTY,runmay print a short human summary for noisy tools; use--jsonfor the full wire shape,--humanwhen piping but you still want the summary,--compactfor JSON withstructuredContentonly when the server sends duplicate text blobs.clawbank whoami— profile JSON; add--prettyfor indentation.
clawbank list and clawbank commands are the same.
clawbank context does not use a token. list, run, and whoami need a saved token or CLAWBANK_TOKEN (see below).
Legacy: clawbank --json is the same as clawbank whoami (optional --pretty after --json).
Help
clawbank --helpEnvironment
| Variable | Purpose |
|----------|---------|
| CLAWBANK_API_URL | REST API origin (default https://app.clawbank.co; overrides saved apiBaseUrl) |
| CLAWBANK_MCP_URL | Command / tool-list endpoint (default https://app.clawbank.co/mcp; change for staging or custom hosting) |
| CLAWBANK_TOKEN | Bearer token (overrides saved token) |
| CLAWBANK_WHOAMI_PATH | GET path for the session check (default /api/v1/me) |
Developing this repo
Clone the repository, install dependencies, build TypeScript, then run the compiled entrypoint:
npm install
npm run build
node dist/cli.js --helpUse npm run tui to build and launch the TUI from source.
Legacy assets (optional)
Older mock TUI, design notes, and internal docs may live under archive/legacy-pre-npm/. Remove that tree when you no longer need it.
