NEXUS

Quickstart

This guide takes you from a clean checkout to a running vault, a goal and an approval card. It runs on one machine. It needs no API key and no network.

nexus has had no external security review. Do not use it to protect anything you cannot afford to lose. Nothing here has run against a real model: the demo and the tests use scripted models. Simulated vs real lists what is and is not real.

What you need

  • Node 26 LTS (24.11 or newer) and npm.
  • git 2.38 or newer. The git tool refuses to run on older versions, and nexus doctor warns about it.
  • Linux, macOS and Windows all run the test suite in CI. On Windows vaultd listens on loopback TCP with a bearer secret by default, because a Unix socket there cannot be made private.
  • Docker is optional. Without it, commands run with no sandbox, so each one needs your approval.

1. Build the command

git clone <repository url>
cd nexus
npm ci
npm run build
node dist/nexus.mjs --help

npm run build writes one file, dist/nexus.mjs, with a checksum and a license notice beside it. There is no install step. The rest of this guide writes nexus for that command:

alias nexus="node $PWD/dist/nexus.mjs"

Node prints an ExperimentalWarning about node:sqlite on stderr. It does not touch stdout. export NODE_NO_WARNINGS=1 hides it.

2. Run the demo

nexus demo

The demo needs no init, no key and no network. It makes a throwaway vault, starts a real vaultd, and runs a scripted company end to end in a second or two. Then it deletes the vault. Part of the output:

3. You confirm the charter at the console. First a wrong passphrase:
   refused: step-up failed: invalid
   then the right one: approved. Nothing was approved on your behalf.

5. The delivery stage wants to deploy: a cloud-resource action, so it stops on a card.
   The vault wrote this card from its own tool table, not from anything the model said:
   Card card_<id>: Deploy demo-build-1 to staging
     class: cloud-resource
   You approve it with a presence check; only then does the gateway mint a single-use receipt.

The demo vault uses a fast key derivation and a public passphrase. It is worthless as a real vault. The models are scripted, so the demo shows the machinery and says nothing about model quality.

3. Make a real vault

Every command uses a home directory: --home <dir>, else $NEXUS_HOME, else ~/.nexus. For a first try, use a throwaway one.

export NEXUS_HOME=$(mktemp -d)
export WORKSPACE=$(mktemp -d)
nexus init --workspace "$WORKSPACE"

init asks for a passphrase twice. It must be at least 12 characters. The workspace is the one folder the file tools may touch. Without it, they can touch nothing.

Keep the home path short, under about 80 characters. vaultd puts two Unix sockets under <home>/run and refuses a socket path over 100 characters.

init prints:

Created a vault at <home>/vault
Config (no secrets): <home>/config.json

RECOVERY KEY. It is shown once and stored nowhere. Write it down and keep it offline:

    <recovery key>

Without the passphrase or this key the vault cannot be opened, and nobody can recover it.

The recovery key is printed once and never again. Write it on paper now. Read the recovery key runbook before you make a vault you care about. Today no command accepts the key and none changes the passphrase. The runbook says what you can do.

To script a throwaway vault, pipe the passphrase. nexus init, vault start, audit and learn on accept --passphrase-stdin, which reads the first line of stdin:

printf 'a long test passphrase\n' | nexus init --passphrase-stdin

Never put a passphrase on a command line.

4. Start vaultd

nexus vault start

It asks for the passphrase, then starts vaultd as a detached process:

vaultd started (pid 4242)
  runtime endpoint unix:<home>/run/runtime.sock (for agents)
  console endpoint unix:<home>/run/console.sock (for you)
  file tools may touch: <workspace>

Commands that run agents get the runtime endpoint only. Commands that decide, such as approve, get the console endpoint. Check the result:

nexus status
nexus doctor

status prints vaultd, the kill switch, cards waiting for you and work in flight. doctor checks Node, SQLite, the config, file permissions, the vault, vaultd, git and docker. It exits 0 unless a check fails.

5. Give a goal

nexus goal "Write a one page summary of what this repo does" --priority 2 --budget 5
Goal goal_<id> is a draft. Proposed charter ch_<id>: Write a one page summary of what this repo does
  lead department software-development, priority 2
  objective 1: Write a one page summary of what this repo does
Nothing starts until you confirm card card_<id> (expires <time>):
  nexus inbox card_<id>   to read it
  nexus approve card_<id>   to confirm it here, or use nexus console

The goal is a draft. The charter comes from a fixed template, not from a model. Priority, deadline and budget come only from your flags. A card now waits for you for 24 hours, then it expires to deny.

If you run goal with no terminal (a script, or a coding agent’s shell), the goal is marked tainted. Its runs then lose every reserved action, and the output says so.

6. Read the card

nexus inbox
nexus inbox <card-id>

The first command lists cards waiting for you. The second shows one card in full, as the vault restated it. The facts on the card come from stored data. Text that came from the goal is quoted.

7. Approve it, as a person

You can approve in the terminal or in the web console.

nexus approve <card-id>

approve shows the card, then asks for your vault passphrase with no echo. On success it prints:

Card <card-id> is now approved (decided by ceo).
  charter-confirm card <card-id>: confirmed; active with <n> ticket(s)

Approving needs a person at a terminal, on purpose. From a script or a pipe it refuses with exit 5:

nexus: approving needs a person at a terminal
  Run `nexus approve` yourself in a terminal, or use `nexus console`.

approve has no --passphrase-stdin. Passing it is a usage error (exit 2). The same rule covers kill reset, budget set and schedule enable.

For the web console:

nexus console
Approval console: http://127.0.0.1:<port>/<one-time launch path>
The link works once. Press Ctrl-C to stop the console.

The console listens on loopback only. Open the link in a browser on the same machine. Treat the link as a secret. A decision there needs the same passphrase.

To say no, use nexus deny <card-id>. It needs no passphrase. Denying is always safe.

8. Look at the work

nexus status
nexus employees
nexus teams

After the charter is confirmed, status shows the tickets. Employees and teams appear when a ticket first starts.

nexus run <ticket-id> runs a ticket through brief, plan, build, verify, review, deliver and retro. It stops on every card for you. Do not expect it to work against a real model yet. It builds a real model provider, nothing has called one, and a real call would be denied until model calls get their own grant. Use the demo to see the loop. The CLI README lists the known gaps.

9. Stop and clean up

nexus vault stop

It prints vaultd stopped. If you used a throwaway home, delete it. This deletes the vault for good.

rm -rf "$NEXUS_HOME" "$WORKSPACE"

If you think something is wrong while vaultd is running, run nexus kill. It revokes every token and needs no passphrase. See the kill switch runbook.

When something fails

  • Exit 3, nexus is not set up here yet. Run nexus init, or check NEXUS_HOME.
  • Exit 4, vaultd is not running. Run nexus vault start.
  • vaultd exited before it was ready. The likeliest cause is a home path that is too long. Use a shorter one.
  • nexus packs list and nexus schedule need the packs folder beside nexus.mjs. npm run build puts it there (dist/packs); if you copy nexus.mjs somewhere else, copy packs/ with it.

Where next


Source of this page on GitHub