@kashdao/cli package ships the kash binary, a scripting-friendly client over the REST API. Use it for one-off queries, shell scripts, CI jobs, agent integrations and exploratory debugging.
Trades placed with kash trade and kash redeem go through the public API, so they work on every market the API serves, including the Solana markets. The CLI is non-custodial: your funds stay in a self-custodial wallet you own, and ZeroID never holds custody of them.
Configure
~/.kash/config.json (written mode 0600) and supports named profiles (--profile <name>, kash config use <name>). For CI, use environment variables instead:
Environment variables override on-disk config; per-invocation flags (
--base-url, --api-version, --profile, --config) override both.
Common commands
--help for full usage and examples. The pages in this section are the structured reference for each command.
Output modes
- Human (default): colored, tabular, designed for interactive reading.
- JSON (
--json): the API’s response body, designed for piping intojq, scripts or agents.
--fields <list> projects dot-paths (e.g. id,status,outcomes.label) and --filter <expr> keeps matching entries (e.g. 'status==ACTIVE && outcomeCount>2').
On error, --json emits a stable envelope instead:
suggestion, retryAfterMs, docsUrl and requestId appear when they apply. actions is the agent-friendly recovery path: each type is a stable value (run_command, set_env, wait_and_retry, open_url, check_input), so agents can branch on it without parsing prose.
Quiet mode
--quiet suppresses spinners, progress, informational logs and human-mode tables, and prints JSON compactly. Pair it with --json:
--quiet on a list or get command prints nothing to stdout, by design.
Exit codes
Rate-limit errors exit
1. The recoverable flag and retryAfterMs field tell scripts and agents how to handle them, and kash with-retry re-runs a command on recoverable failures.
Retry behaviour
The CLI retries transient failures (network errors, 429, 5xx) with exponential backoff and jitter, the same as the TypeScript SDK. The global--max-retries <n> flag (0–10) overrides the retry budget for one invocation; --max-retries 0 disables retries.
Tab completion
Config import and export
Source
- npm:
@kashdao/cli - GitHub:
KashDAO/cli(issues and discussions)
Next
TypeScript SDK
The library version of the same API, for in-process integration.
Endpoint Reference
Every REST endpoint the CLI calls.