Commands
Run these from the repository root with npm run <name>, or inside the container with docker compose -p resolution exec app npm run <name>. See operating for when to use each.
| Command | What it does | Runs |
|---|---|---|
npm run start | Start the server. Prints the owner link with its token on first start. | node src/main.ts |
npm run demo | Start with a seeded example fund. Nothing in it is real. | node src/main.ts --demo |
npm run test | Run the test suite. | node --test --test-reporter=dot "test/**/*.test.ts" |
npm run coverage | Check spec coverage against status/COVERAGE.md. | node tools/coverage.ts --check |
npm run imagine | Generate art for the Academy with a local image CLI (development only). | node tools/imagine.ts |
npm run academy:check | Validate every Academy lesson, case and glossary term: references, both languages, quiz answers, rule ids. | node tools/academy-check.ts |
npm run typecheck | Type-check the whole code base without emitting. | tsc --noEmit |
npm run replay | Rebuild state from the Record and compare it with the stored projections; reports any divergence. | node src/replay/cli.ts |
npm run export:beancount | Write the book as a Beancount ledger (stdout, or --out FILE) for Fava or bean-query. Reads the Record, never writes it. | node src/integrations/beancount-cli.ts |
npm run kill | Engage the kill switch from the shell: cancels open orders and halts trading. | node src/kill/cli.ts |
npm run release | Release the kill switch. Needs the owner. | node src/kill/cli.ts --release |
npm run passkeys | List the owner's passkeys; with --reset, revoke them all (the recovery for a lost passkey). | node src/server/passkey-cli.ts |
npm run password | The owner's password from the terminal: --set reads it from stdin and stores the hash, --reset removes it (the recovery for a forgotten password), --status says whether one is set. | node src/server/password-cli.ts |
npm run backup | Write an encrypted backup now (needs BACKUP_PASSPHRASE). | node src/backup/cli.ts |
npm run restore | Restore from an encrypted backup into an empty data folder and verify the hash chain. | node src/backup/cli.ts --restore |
npm run verify | Verify the Record hash chain and the anchors. | node src/ops/verify.ts |
npm run ots:verify | Recompute the OpenTimestamps proofs from their anchors up to each attestation. Does not check the Bitcoin block header. | node src/ops/ots-verify.ts |
npm run mcp | Run the MCP bridge on stdio, so an MCP client can read the fund with a scoped token. | node src/mcp/stdio.ts |
npm run openapi | Regenerate docs/openapi/openapi.json from the route table. | node src/integrations/openapi.ts |
npm run erase | GDPR erasure of personal data outside the Record (the Record itself is kept, as the law allows for records). | node src/eu/erase.ts |
npm run doctor | Check the install end to end: data folder, token, database, market, model, broker, notifications, backups. | node src/setup/doctor-cli.ts |
npm run docs | Regenerate the reference pages in docs/reference/ from the code. | node tools/docs-gen.ts |
npm run docs:check | Fail when a reference page is out of date. | node tools/docs-gen.ts --check |
npm run site | Build the product website into site/dist/ from the documentation, the changelog and the source tree. Not a CI gate. | node tools/site-gen.ts |
npm run check | Run every CI gate in order: types, academy, docs, tests. | npm run -s typecheck && npm run -s academy:check && npm run -s docs:check && npm test |