CLI reference
Apothem CLI reference — per-command synopsis, options, and exit codes for the apothem command-line interface.
The apothem command-line interface manages harness adapter configurations
from the shared profile. Each page below documents one subcommand: its
synopsis, options, behavior, and exit codes.
Each of install, update, and uninstall also accepts a continuous-form
alias (installing, updating, uninstalling) that is identical in flags and
behavior to the base command. Updating and uninstalling through the install
channels — the Claude Code plugin, npx, and the one-shot installer
scripts — are documented in the Updating and
Uninstalling install guides, not by the aliases
themselves.
Commands
| Command | Description |
|---|---|
| quickstart | Guided first run: ensure a profile, preview the writes, then install. |
| install | Install a harness adapter configuration from the shared profile (alias: installing). |
| update | Re-install a harness adapter configuration from the current shared profile (alias: updating). |
| uninstall | Remove a harness adapter configuration (alias: uninstalling). |
| rollback | Restore a harness to the state before its recorded install. |
| backups | Prune the install backups and ledger history Apothem keeps (backups prune). |
| verify | Verify a harness adapter installation. |
| status | Report install, verify, and drift state for every registered harness. |
| diff | Preview the pending configuration changes for a single harness. |
| harnesses | List and inspect registered harness adapters. |
| profile | Manage the shared Apothem profile. |
| migrate-workspace | Migrate a legacy per-harness workspace into the shared .apothem layout. |
| doctor | Run system diagnostics for the Apothem installation. |
| completion | Emit a sourceable shell-completion script (bash, zsh, fish, powershell). |
JSON output contract
Every command except completion (which emits a shell script) accepts --json
(shorthand for --format json) and then writes exactly one JSON document to
stdout. Each document starts with a top-level
schema_version key, an integer that is 1 today:
{"schema_version": 1, "status": "success", "command": "verify", "...": "..."}- Stability. Within one
schema_version, changes are additive: a new key can appear, but no key is renamed or removed and no value changes type. Anything else increasesschema_version. - Versioned artifacts.
profile show --jsonemits the profile itself, so itsschema_versionis the profile schema version (also1today). - One exception.
harnesses list --jsonemits a JSON array (one object per harness), as it always has, so it has no top-level key to carry the version. Wrapping it in an object would break existing parsers; until a version bump does that, treat its shape asschema_version1. - Errors. Expected failures use the same document shape with
"status": "error"and anerrorobject carryingcode,field,reason, andfix.
Exit codes
Every command uses the same small set of exit codes; each page lists the ones it can return.
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Expected failure: a validation, profile, harness, project, or adapter error |
| 2 | Partial result: a batch wrote or removed something before a failure (only the commands whose page lists it) |
| 64 | Usage error: an unknown option or command, a missing required option, or an invalid option value |
A usage error never touches the filesystem. Under --json (or
--format json) it prints one error document with "code": "cli.usage"
instead of the plain usage text, so automation can tell a mistyped flag from a
partial write.
For slash commands and the higher-level CLI overview, see the CLI overview and Slash commands reference pages.
Plans Discipline — Project-Local Ephemeral Working Memory
Manage project-local ephemeral working memory in .apothem/plans/ (a legacy .plans/ tree is upgraded via apothem migrate-workspace) using a frontmatter schema, lifecycle transitions, promotion to ADRs, and enforcement through hooks and validators.
quickstart
CLI reference for the apothem quickstart guided first-run command.