CLI Reference

CLI Reference

Cabinet's CLI is intentionally small. Most of the work happens inside the app, and the CLI exists to start, scaffold, diagnose, and update.

npx cabinetai <command> [args] [flags]

If you've installed Cabinet globally, drop the npx. Everything below uses cabinetai for short.

Commands at a glance

CommandWhat it does
createScaffold a new cabinet folder
runStart Cabinet against the current cabinet folder
listList cabinets visible to this install
addInstall a template cabinet from cabinets.sh
doctorDiagnose env, ports, providers, db
sessionsManage active sessions and locks
skillsInstall, update, publish skills
publishPublish the current cabinet to cabinets.sh
updateReinstall the latest version
uninstallRemove cached app (keeps your data)

Global flags

FlagWhat it does
--data-dir <path>Override CABINET_DATA_DIR for this run.
--port <n>Override the default port (3000).
--quietSuppress non-error output.
--jsonEmit machine-readable JSON instead of human output.
--no-colorDisable ANSI color in terminal output.
--helpPrint help for any command.

Environment

VariableDefaultPurpose
CABINET_DATA_DIR~/cabinets/Where Cabinet looks for cabinet folders.
CABINET_LOG_LEVELinfodebug / info / warn / error.
CABINET_OFFLINEfalseSkip provider connectivity checks at boot.
ANTHROPIC_API_KEYPicked up automatically.
OPENAI_API_KEYPicked up automatically.
GOOGLE_API_KEYPicked up automatically.
XAI_API_KEYPicked up automatically.

Exit codes

CodeMeaning
0Success
1Generic error (see stderr)
2Bad input (missing arg, unknown flag)
3Cabinet not found at the given path
4Port in use
5Provider auth failure
6Schema violation (a malformed persona / job / skill)

create

Scaffold a new cabinet folder.

npx cabinetai create [name] [--template <slug>] [--dir <path>] [--no-install]
Arg / flagDefaultWhat it does
[name]promptsFolder name. Sluggified for the cabinet id.
--template <slug>emptyStart from a template cabinet on cabinets.sh.
--dir <path>$CABINET_DATA_DIRParent directory.
--no-installfalseSkip npm install after scaffold.

Examples

# Empty cabinet, prompts for a name
npx cabinetai create

# Named cabinet
npx cabinetai create my-startup

# From a template
npx cabinetai create my-jobsearch --template cabinet-app/job-hunt-hq

run

Start Cabinet against the current folder (or a specified cabinet).

npx cabinetai run [path] [--port <n>] [--open] [--read-only]
Arg / flagDefaultWhat it does
[path].Cabinet folder to open.
--port <n>3000Port to bind.
--opentrueOpen the browser automatically. Use --no-open to disable.
--read-onlyfalseDisable agent runs, edits, and git writes. Useful for demos.

Examples

npx cabinetai run                                    # current dir
npx cabinetai run ~/cabinets/my-startup              # specific cabinet
npx cabinetai run --port 3001 --no-open              # alt port, headless
npx cabinetai run --read-only                        # demo mode

list

List cabinets visible to this install.

npx cabinetai list [--json]

Reads $CABINET_DATA_DIR for any folder with a .cabinet manifest at the top level.

Output

NAME              ID              KIND     PATH
My Startup        my-startup      root     ~/cabinets/my-startup
Job Hunt HQ       job-hunt-hq     root     ~/cabinets/job-hunt-hq
Acme Client       acme            child    ~/cabinets/agency/clients/acme

add

Install a template cabinet from cabinets.sh.

npx cabinetai add <owner/template> [--into <path>] [--name <name>]
Arg / flagDefaultWhat it does
<owner/template>requiredTemplate slug on cabinets.sh, e.g. cabinet-app/job-hunt-hq.
--into <path>$CABINET_DATA_DIRWhere to install.
--name <name>template's idRename on install.

Heartbeats are paused on first install. Cabinet asks you to confirm each one before it fires.


doctor

Diagnose environment, ports, providers, and database integrity.

npx cabinetai doctor [--fix] [--json]
FlagWhat it does
--fixAttempt safe auto-fixes (kill stale ports, clear bad locks).
--jsonMachine-readable output for CI / scripts.

Checks:

  • Node version ≥ 20
  • Git installed
  • $CABINET_DATA_DIR exists and is writable
  • Default port is free
  • Each configured provider responds to a ping
  • The cabinet's SQLite (.cabinet.db) is healthy

sessions

Manage active agent sessions and locks.

npx cabinetai sessions list                # show active runs
npx cabinetai sessions kill <id>           # stop a run
npx cabinetai sessions clear-locks         # release stale file locks

skills

Install, update, and publish skills.

npx cabinetai skills add <slug> [--global] [--force]
npx cabinetai skills list
npx cabinetai skills update [<slug>]
npx cabinetai skills remove <slug>
npx cabinetai skills publish              # in a skill folder

Use --force only if you've reviewed the security scan output.


publish

Publish the current cabinet folder to cabinets.sh.

npx cabinetai publish [--dry-run]

Strips .gitignore'd files, generates a README, validates schemas, and opens a PR to the registry.


update

Reinstall the latest Cabinet app version.

npx cabinetai update [--channel <stable|beta>]

Your data is untouched. Only the cached app version changes.


uninstall

Remove the cached Cabinet app from your machine.

npx cabinetai uninstall

Your cabinet folders are not affected. They live wherever $CABINET_DATA_DIR points (default ~/cabinets/) and stay where they are.

Read on