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
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
- 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.
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 (throughsecret-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
--jsonor when output is piped. Only the result goes to stdout; messages and errors go to stderr. -
Exit codes:
-
Dry runs.
--dry-runon any write prints the requests it would send, and sends nothing. Some commands also printchanges:agents updateandwidget setshow{ field: { before, after } },bulk updatethe same per agent id,agents rollbackshows{ field: { from, to } }plus theskippedFieldsit leaves alone, andtests importlists 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 startandexperiments stop. Without a terminal they need--yes. -
Agents by name. Any
<agent>can be an id or an exact name, or come from--agentorTOTEBOT_AGENT. -
Input from files.
--fileand--from-filetake a path, or-for stdin. Markdown works for text knowledge. -
Safe retries. Every write carries an
Idempotency-Key, and rate-limited calls are retried afterRetry-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.