Skip to main content
totebot is a command-line tool for everything the Public API can do. Coding agents such as Claude Code and Codex work especially well with it: you log in once, every command explains itself with --help, output is JSON, and common tasks need no code.

Install

It needs Node.js 18 or newer and has no other dependencies. Once a day the CLI checks whether a newer version exists and prints a one-line notice to stderr when it runs in a terminal; set TOTEBOT_NO_UPDATE_CHECK=1 to turn this off.
The CLI uses the Public API, so your plan needs the Public API (Basic, Pro or Scale).

Sign in

The CLI opens the dashboard in your browser and shows a short code. Check that the code matches your terminal, then pick:
  • Team: the team the CLI works on. You must be an owner of it, and its plan must include the Public API.
  • Scopes: read access is selected, write access is off. Turn on only what you need, for example knowledge:write to update FAQs.
  • Agents: all agents, or only some.
Approve, and the terminal is signed in and prints the team the key was approved for. If it is not the team you meant, run totebot logout. Behind the scenes, approving creates a team API key named after your computer. It shows up in Team settings → API keys, where you can Edit access or Revoke it like any other key. The code expires after 10 minutes and works once. The key it creates expires after 90 days; run totebot login again to get a new one. If the team already has 25 active API keys, approval fails until you revoke one.

Other ways to sign in

Check who you are signed in as with totebot whoami. totebot logout revokes the key and forgets it. If the revocation fails, the login is kept so you can retry; --keep-key only forgets it locally.

Where the key is stored

On macOS the key goes into the Keychain, and on Linux into the Secret Service (through secret-tool). When neither is available, it goes into ~/.config/totebot/credentials.json, readable only by you (mode 0600). Windows has no supported keychain, so the key is stored unencrypted in %APPDATA%\totebot\credentials.json, which only your Windows user can open; the CLI prints a warning when it saves a key there.

How the CLI behaves

  • Output. Tables on a terminal; JSON with --json or when output is piped. Only the result goes to stdout; messages and errors go to stderr.
  • Exit codes:
  • Dry runs. --dry-run on any write prints the requests it would send, and sends nothing. Some commands also print changes: agents update and widget set show { field: { before, after } }, bulk update the same per agent id, agents rollback shows { field: { from, to } } plus the skippedFields it leaves alone, and tests import lists the questions it would add (created), change (updated) or leave (unchanged).
  • Confirmations. Deleting, erasing, removing, applying a template and bulk deletes ask first, and so do commands that reach customers or change how agents answer: tickets reply, agents update, agents rollback, bulk update, widget set, experiments start and experiments stop. Without a terminal they need --yes.
  • Agents by name. Any <agent> can be an id or an exact name, or come from --agent or TOTEBOT_AGENT.
  • Input from files. --file and --from-file take a path, or - for stdin. Markdown works for text knowledge.
  • Safe retries. Every write carries an Idempotency-Key, and rate-limited calls are retried after Retry-After.

Next

Command reference

Every command and its flags.

Use with coding agents

Claude Code and Codex setup and recipes.

Optimize your agents

The full loop: analyse, test before applying, apply, verify, roll back.