NEXUS

CLI reference

Every nexus command, its options and its exit codes. The text matches nexus <command> --help on 2026-12-05. If they disagree, the program is right. The package README has the design notes and the known gaps.

nexus has had no external security review. A command that prints a success line has not been run against a real model.

Common to every command

  • --home <dir> uses this directory instead of ~/.nexus. Without it, $NEXUS_HOME comes first, then the folder named in ~/.nexus-location (written by home move). $HADES_HOME and ~/.hades from v3.0 still work, with a notice on stderr. Keep the path under about 80 characters, because vaultd’s sockets live under <home>/run.
  • --json prints one JSON document on stdout instead of text, on success and on failure.
  • -h, --help shows help for the command. -V, --version shows the version.
  • Results go to stdout. Prompts, progress and warnings go to stderr.
  • NODE_NO_WARNINGS=1 hides Node’s node:sqlite warning. NEXUS_DEBUG=1 prints a scrubbed stack for an unexpected failure.

The JSON document is one of these:

{"ok":true,"exit":0,"command":"inbox","result":{...}}
{"ok":false,"command":"inbox","error":{"code":"unavailable","exit":4,"message":"vaultd is not running","hint":"Start it with `nexus vault start`."}}

ok is true only for exit 0. console prints a {"event":"listening",...} line first. intake serve refuses --json, because its stdout is the MCP protocol.

Passphrases come from a no-echo prompt at a terminal, or from the first line of stdin with --passphrase-stdin. They never come from the command line. Four actions need a person at a terminal and accept no pipe: approve, kill reset, budget set and schedule enable. Without a terminal they exit 5.

Exit codes

  • 0: ok. The command did what was asked.
  • 1: failure. It ran and failed, or doctor found a failing check.
  • 2: usage. Unknown command or option, a missing or extra argument, an invalid value.
  • 3: not set up. No config in this home yet (run nexus init), or an unreadable one.
  • 4: vaultd unavailable. It is not running or not reachable.
  • 5: denied. The presence check failed, a person was needed and absent, or policy said no.
  • 6: audit chain broken. audit verify found a break.
  • 7: waiting on you. run stopped on a budget, a card, an escalation or a veto.
  • 8: an audit check failed. audit check ran and found a problem.
  • 9: one could not run. audit check could not run a check, and none found a problem.
  • 130: interrupted. Ctrl-C at a prompt.

init

Create a vault and a config. The recovery key is printed once.

nexus init [--vault-dir <dir>] [--approver <name>] [--workspace <dir>] [--passphrase-stdin]
  • --vault-dir <value>: where the vault lives (default <home>/vault).
  • --approver <value>: the name your decisions are recorded under (ceo).
  • --workspace <value>: the folder the file tools may touch.
  • --passphrase-stdin: read the passphrase from stdin.

Example: nexus init --workspace "$WORKSPACE". The passphrase is asked for twice and must have at least 12 characters. Prints the vault path, the config path, the recovery key and a next step. Exits 0 when created. Exits 1 if this home is already set up, and changes nothing. Exits 2 for a short or mismatched passphrase, a bad --approver, or no terminal and no --passphrase-stdin. Exits 130 on Ctrl-C.

doctor

Check this machine, the config, the vault and vaultd.

nexus doctor

Example: nexus doctor. Prints one line per check, then a summary:

[ok  ] node            Node 26.13.1
[warn] vaultd          not running; `nexus vault start`
10 ok, 1 warning(s), 0 failure(s)

The checks are node, sqlite, config, permissions, vault, config-secrets, vaultd, kill-switch, org-db, git, git-version and docker. Exits 0 when nothing fails (warnings are allowed). Exits 1 when a check fails. Exits 3 when this home is not set up.

vault

Start, stop and inspect vaultd, the process that holds every key.

nexus vault start [--passphrase-stdin] [--workspace <dir>] [--tcp]
nexus vault stop
nexus vault status
  • --passphrase-stdin: read the passphrase from stdin.
  • --workspace <value>: the folder the file tools may touch (your grant).
  • --tcp: loopback TCP with a bearer secret instead of sockets. Always on for Windows.
  • --dir <value>, --run-dir <value>: (serve, internal) the vault directory and where the sockets go.

Example: nexus vault start. start asks for the passphrase and spawns vaultd detached. It prints the pid, the two endpoints and the workspace, or vaultd is already running (pid N). stop prints vaultd stopped or vaultd was not running. status prints vaultd is running (pid N, since <time>) and both endpoints.

vault serve is the daemon itself, started by start. It reads the passphrase from a pipe and refuses a terminal. Do not run it by hand.

Exits: start and stop exit 0. start exits 5 for a wrong passphrase and 4 if vaultd cannot start. status exits 0 when running and 4 when not.

console

Serve the approval console on loopback and print a one-time launch link.

nexus console [--port <n>]
  • --port <value>: port to listen on (default: any free one).

Example: nexus console. Prints the link and The link works once. Press Ctrl-C to stop the console. A card decided there reaches the company at once. Exits 0 after Ctrl-C. Exits 2 for a bad port, 3 if not set up and 4 if vaultd is down.

goal

Give the company a goal. It proposes a charter, and a card asks you to confirm.

nexus goal "<text>" [--priority 1-5] [--deadline <time>] [--budget <dollars>]
  • --priority <value>: 1 (highest) to 5; yours, never the model’s.
  • --deadline <value>: an ISO time, for example 2026-12-31T17:00:00Z.
  • --budget <value>: a charter budget in dollars.

Example: nexus goal "Fix the lint errors" --priority 2 --budget 5. Prints the goal id, the proposed charter, the lead department and the card id. The goal stays a draft until you approve the card. With no terminal, the goal is tainted and the output says so. Exits 0 on success, 2 for a missing text or a bad flag, 3 if not set up and 4 if vaultd is down.

inbox

Show approval cards waiting for you, or one card in full.

nexus inbox [--all]
nexus inbox <card-id>
  • --all: include cards already decided.

Example: nexus inbox. Prints a table (card, kind, class, status, title, expires) and a short digest, or No cards are waiting. Nothing is blocked on you. With an id it prints the card as the vault restated it, with its facts. Exits 0, or 1 for an unknown card, or 4 if vaultd is down.

approve

Approve a card. It asks for your passphrase at the terminal.

nexus approve <card-id> [--by <name>] [--totp]
  • --by <value>: the name this decision is recorded under.
  • --totp: give a one-time code instead of the passphrase. It fails closed until vaultd has an enrolled secret.

Example: nexus approve <card-id>. Shows the card, then asks for the passphrase. Prints Card <id> is now approved (decided by ceo). and what the company did with it. Without a terminal it exits 5. There is no --passphrase-stdin; passing one exits 2. Exits 1 for an unknown card or one already decided. Exits 5 for a failed presence check. Exits 130 on Ctrl-C.

deny

Deny a card. No passphrase is needed.

nexus deny <card-id> [--by <name>]
  • --by <value>: the name this decision is recorded under.

Example: nexus deny <card-id>. Prints Card <id> is now denied (decided by ceo). Exits 0, 1 for an unknown or decided card, 4 if vaultd is down.

status

Show vaultd, the kill switch, cards, work in flight and this month’s budget.

nexus status

Example: nexus status.

vaultd: running (pid 4242)
kill switch: not engaged
cards waiting for you: 1
goals: 1 charter-proposed
charters: 1 draft
tickets: none
runs: none

It also reads the company file when vaultd is down, and says vaultd: not running. It still exits 0 then, unlike vault status. It applies any card already decided. Exits 3 if not set up.

employees

List who works here: role, department, status, brain tier.

nexus employees [--department <id>] [--all]
  • --department <value>: only this department.
  • --all: include retired employees.

Example: nexus employees --department software-development. Prints a table (id, name, role, department, status, tier, team, failed reviews), or No employees yet. Teams are formed when work starts. Exits 0, or 2 for an unknown department.

teams

List the teams HR formed, with their lead and members.

nexus teams [--department <id>] [--all]
  • --department <value>: only this department.
  • --all: include dissolved teams.

Example: nexus teams. Prints a table (id, name, department, status, lead, members, charter), or No teams yet. A team is formed when a ticket starts. Exits 0, or 2 for an unknown department.

skills

List installed skills and whether each still verifies.

nexus skills list

Example: nexus skills list. Prints a table (skill, level, version, pinned, state), or No skills installed. A skill that fails verification shows as SKIPPED and is not offered to agents. There is no command to sign, promote or remove a skill yet (HV-124, deferred). Exits 0, or 3 if not set up.

packs

List the department packs: the roles, SOPs and skills each adds.

nexus packs list

Example: nexus packs list. Prints a table (pack, department, version, roles, SOPs, skills with the number installed) and a footer. The packs are read from the packs folder beside nexus.mjs (npm run build creates dist/packs); a nexus.mjs copied away on its own has none, and this exits 1 there. Exits 1 too if the loader refuses a pack.

learn

Show what runs left behind, and turn recording on or off.

nexus learn status
nexus learn on [--passphrase-stdin]
nexus learn off
  • --passphrase-stdin: (on) read the passphrase from stdin.

Example: nexus learn on. status prints whether recording is on and counts of runs, candidate skills in quarantine, held lessons and spot checks. on checks the vault passphrase, then prints recording is on. Each nexus run then asks for the passphrase to seal its trace. off needs no proof. Nothing here promotes a skill. on exits 5 for a wrong passphrase and 2 with no terminal and no flag.

audit

Verify the vault’s audit log, or run the deterministic audit checks.

nexus audit verify [--anchor <seq>:<hash>] [--passphrase-stdin]
nexus audit check [--anchor <seq>:<hash>] [--passphrase-stdin]
  • --anchor <value>: a head you recorded earlier, to catch a cut-off tail.
  • --passphrase-stdin: read the passphrase from stdin.

Example: nexus audit verify. It unlocks the vault in this process and prints:

audit chain verified: 8 entries, 0 checkpoints
head 8:<hash>  (record it to catch a cut-off tail later)

check runs four checks: the chain verifies, every external write has a receipt, budget invariants hold and the ledger balances. It prints one line per check, marked PASS, FAIL or ERROR. Exits for verify: 0 verified, 6 chain broken, 5 wrong passphrase. Exits for check: 0 all four ran and passed, 8 one failed, 9 one could not run.

budget

Show monthly department budgets. Set one, or ask to raise one.

nexus budget
nexus budget set <department> <dollars>
nexus budget raise <department> <dollars> [--reason <text>]
  • --reason <value>: a note shown on the card, marked unverified.

Example: nexus budget set software-development 25. The department can also be company. Plain budget prints a table (department, allocated, spent, remaining). set needs a terminal, because an envelope is money an agent may spend. raise creates a card and prints its id. Exits 0. set exits 5 without a terminal. raise exits 1 when there is no envelope yet. Exits 2 for an unknown department or a bad amount.

kill

Engage the kill switch. Every token dies and none is issued. kill reset lifts it.

nexus kill [--reason <text>]
nexus kill reset [--totp]
  • --reason <value>: why, for the audit log.
  • --totp: (reset) give a one-time code instead of the passphrase.
  • --by <value>: (reset) the name the reset is recorded under.

Example: nexus kill --reason "odd card". It needs no proof. Prints that the switch is engaged, with its epoch, and that every token is revoked and none will be issued until a reset. reset needs a terminal and your passphrase, and tokens from before the kill stay dead. Exits 0. kill exits 4 if vaultd is down. reset exits 5 without a terminal or on a failed proof. See the kill switch runbook.

run

Run a ticket through the SOP: brief, plan, build, verify, review, deliver, retro.

nexus run <ticket-id> [--max-steps <n>] [--passphrase-stdin]
nexus run <ticket-id> --teacher <claude-code|codex|qoder> --teacher-plan <api|subscription|enterprise> [--teacher-model <name>]
  • --max-steps <value>: stop after this many stage attempts (100).
  • --passphrase-stdin: with nexus learn on: read the vault passphrase (to seal the trace) from stdin.
  • --teacher <value>: do the stages with this coding agent’s CLI, headless (claude-code, codex, qoder).
  • --teacher-plan <value>: the terms the teacher runs under: api, subscription or enterprise (required).
  • --teacher-model <value>: the model name to ask the teacher for.

Example: nexus run tk_<id>. It forms or reuses a team, runs the stages and prints progress on stderr. A stage that needs a card waits for you in the same run: approve it in another terminal. The last line reads ticket <id>: done (stage retro, N attempt(s), USD x), or the status it stopped on, with a hint. Exits 0 when done. Exits 7 when it stopped on a budget, a card, an escalation or a veto. Exits 1 for no work yet, no such ticket, a pack the loader refuses, or a run that did not settle. Exits 5 when the provider terms forbid a teacher. Exits 2 for a bad --max-steps (1 to 1000).

It builds a real model provider and nothing has called one, so use nexus demo to see the loop.

schedule

List pack schedules, open the tickets that are due, and bind a charter. Run run-due from cron.

nexus schedule list
nexus schedule run-due [--run] [--passphrase-stdin]
nexus schedule enable <sop-id> --charter <charter-id>
nexus schedule disable <sop-id>
  • --charter <value>: (enable) an active charter you confirmed; each slot’s ticket belongs to it.
  • --run: (run-due) also run each ticket it opened, as nexus run does, one after another.
  • --passphrase-stdin: (run-due –run) with nexus learn on: the vault passphrase, from stdin.

Example: nexus schedule enable social-listening-digest --charter ch_<id>. list prints a table (sop, department, schedule, charter, last slot, next slot, state). run-due opens one ticket per due slot under an enabled charter. Missed slots are reported as gaps and never backfilled. This program starts no daemon: the timer is yours. enable needs a terminal. disable needs no proof and works with vaultd down. Like packs list, these fail from the bundled file for lack of a packs folder. run-due --run exits with the worst exit of the runs it started.

dashboard

nexus dashboard [--port <n>] [--no-open]

Serves the dashboard and its API on 127.0.0.1 (port 8787, or the next free one if it is taken) and opens it in your browser. The printed link works once, within 10 minutes; after that the browser holds an HttpOnly session cookie. Runs in the foreground; Ctrl-C stops it. Without vaultd running the company view is watch-only: no kill switch and no approval console. Before nexus init the company tabs stay empty; Setup and Host still work. See The dashboard.

  • --port <n>: the port to try first.
  • --no-open: print the link without opening a browser.

home

nexus home show
nexus home move <folder> [--passphrase-stdin]

show prints where your data lives, where that choice came from (flag, env, pointer or default) and its size. move moves all of it to <folder>, which must be missing or empty and not inside the current home. It stops vaultd, checks your passphrase, copies, verifies every file and every SQLite database, writes ~/.nexus-location, restarts vaultd at the new place and renames the old folder to <name>.moved-<stamp>, which you delete when you are sure. Any failure puts everything back. Refused with exit 2 when --home or $NEXUS_HOME fixes the home: change those yourself instead.

agents

nexus agents list
nexus agents connect <agent> [--yes]
nexus agents disconnect <agent> [--yes]

list shows the coding agents and local models found on this machine and whether each agent has the nexus MCP server in its user config. connect and disconnect print the change to that file; with --yes they write it, keep a backup beside the file and log it to <home>/logs/agents.log. Agents: claude-code, codex, gemini, cursor, vscode, windsurf. The write fails (exit 1) if the file changed after the diff was made, and a file with comments is refused. Restart the agent afterwards. To put the routing rule in a project too, use connect. See Agents and LLMs.

connect

Link a coding agent to Nexus: register the goal-intake MCP server in the client’s own config and write the rule that says which prompts belong to the company.

nexus connect claude-code|codex|qoder [--project <dir>] [--print]
nexus connect json
  • --project <value>: the folder the agent works in (default: the current one).
  • --print: print what would be written; write nothing.

Examples: nexus connect claude-code --project ~/code/app writes .mcp.json (the nexus stdio entry for nexus intake serve) and a managed block in CLAUDE.md. connect codex writes AGENTS.md and prints the [mcp_servers.nexus] table for <CODEX_HOME>/config.toml; it writes nothing under your home. connect qoder writes .mcp.json and AGENTS.md; if Qoder does not read the file, paste the entry connect json prints into its MCP settings. connect json prints the entry for any other client.

The block is idempotent: a second run changes no byte and says unchanged. Text outside the markers and other servers in .mcp.json are kept. A file that is not the expected shape (invalid JSON, a mcpServers that is not an object, one marker without the other) is reported and left as it was. Exits 0 when linked or printed; 1 when a file is refused; 2 for an unknown target, an extra argument or a missing --project folder; 3 when this home is not set up. See Linking a coding agent for what a linked agent can and cannot do.

intake

Serve the goal-intake MCP server over stdio for a coding agent. Drafts only, tainted.

nexus intake serve [--max-drafts <n>]
  • --max-drafts <value>: drafts one connection may submit before it is refused (10).

Example: nexus intake serve. A coding agent launches it as an MCP stdio server. Every goal it submits is stored as a tainted draft from source coding-agent, with a card that only you can decide. The process holds the runtime endpoint only. It was tried with the MCP SDK’s own client, not with a real Claude Code, Codex or Qoder client. Exits 4 if vaultd is down, and 2 if given --json.

demo

Run a scripted company end to end, offline, in a throwaway vault.

nexus demo

Example: nexus demo. Needs no init, key or network. Prints eight numbered parts: vault, goal, charter confirmed, budget and team, a card for a staging deploy, sign-off, traces and lessons, and the learning plane. Deletes its vault afterwards. The models are scripted, so it shows the machinery and not model quality. Exits 0.


Source of this page on GitHub