CLI

openbelt is one small binary (about 2 MB, cli/ in this repo). It does two jobs:

curl -fsSL https://openbelt.com/install | sh        # the CLI, then openbelt install (it asks for your workspace)
openbelt search expense claims
openbelt fn run expenses.file '{"amount": 42, "what": "lunch"}' --key lunch-1108
openbelt data list expenses/claims --limit 50 | jq '.docs[].data'
openbelt app deploy ./standup

Arguments and output

Getting it, and keeping it current

The platform hands out the CLI it was built with, so it always matches the server, from its own address (https://openbelt.com, OPENBELT_HOST) and from each workspace's host:

Signing in

openbelt login [workspace url] (and install) prints a link and a short code, like BCDF-GHJK, and opens the link in your browser. Check that the page shows the same code, then Continue and Allow. The link works in any browser, so on a server or over SSH (where no browser opens, nor with --no-open) open it on your laptop or phone, or go to <workspace>/_oauth/device and type the code. The CLI waits up to 10 minutes and saves the sign-in once you allow it. openbelt install -y doesn't wait: it keeps the started sign-in in pending.json beside the credentials (yours alone) until openbelt login --wait finishes it. Under the hood this is OAuth's device sign-in (RFC 8628), described in MCP.

Where it keeps things

The sign-in is ~/.config/openbelt/credentials.json (or under $XDG_CONFIG_HOME), readable by you alone: an API token, or OAuth tokens it renews by itself. openbelt logout signs out and revokes them; openbelt status [--json] says which workspace you're in, as whom, your CLI build, and which agents have OpenBelt (and still works offline); openbelt uninstall removes OpenBelt from your agents and deletes its local files.

For OpenBelt's own code

Commands come from each tool's _meta["openbelt/cli"] in packages/platform/src/mcp.ts (cli(...)): a usage line and a one-line summary. A new tool gets its command there; one with none is reached with openbelt call <tool> '<json>'. The server's hints name MCP calls (function_runs({ app })); the CLI says them as the commands that make them.

The CLI lists every operation as a command (its session says it is openbelt-cli); an agent's tools/list gives only search and call (MCP).

Source: docs/cli.md on GitHub