--install, and then interact with your API by name — no HTTP knowledge required.
To generate a CLI binary: install the SDK, call
buildCli(), and upload the output to your preferred host (GitHub Releases, S3, CDN, etc.). See For Sellers: Generating the Binary below.For Sellers: Generating the Binary
ThebuildCli() function compiles a self-contained binary with your service URL baked in. Agents receive a binary that already knows where to connect — no configuration required on their end.
1. Install the CLI builder
The CLI builder is included in the Key0 SDK. No extra install needed.2. Create a build script
Add abuild-cli.ts to your project:
3. Build
4. Distribute
Upload the binaries to your CDN or GitHub Releases. Each agent downloads the binary for their platform.Distributing binaries
RunbuildCli() as part of your build or CI pipeline, then upload the output to wherever your agents can download them — GitHub Releases, S3, a CDN, etc.
For Agents: Installing and Using the CLI
Install
inPath is false, add the addToPath line to your shell config (~/.bashrc or ~/.zshrc):
~/.local/bin and /usr/local/bin fail (permissions), run with sudo:
Commands
Once installed, the binary is available by name from anywhere:Exit codes
All output is machine-readable JSON, making it easy to parse from an agent:
Full install + use flow (Claude Code example)
Reference
buildCli(opts)
Returns
{ binaries: Array<{ path, target, size }> }.

