Resolution

All pages

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.

CommandWhat it doesRuns
npm run startStart the server. Prints the owner link with its token on first start.node src/main.ts
npm run demoStart with a seeded example fund. Nothing in it is real.node src/main.ts --demo
npm run testRun the test suite.node --test --test-reporter=dot "test/**/*.test.ts"
npm run coverageCheck spec coverage against status/COVERAGE.md.node tools/coverage.ts --check
npm run imagineGenerate art for the Academy with a local image CLI (development only).node tools/imagine.ts
npm run academy:checkValidate every Academy lesson, case and glossary term: references, both languages, quiz answers, rule ids.node tools/academy-check.ts
npm run typecheckType-check the whole code base without emitting.tsc --noEmit
npm run replayRebuild state from the Record and compare it with the stored projections; reports any divergence.node src/replay/cli.ts
npm run export:beancountWrite 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 killEngage the kill switch from the shell: cancels open orders and halts trading.node src/kill/cli.ts
npm run releaseRelease the kill switch. Needs the owner.node src/kill/cli.ts --release
npm run passkeysList the owner's passkeys; with --reset, revoke them all (the recovery for a lost passkey).node src/server/passkey-cli.ts
npm run passwordThe 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 backupWrite an encrypted backup now (needs BACKUP_PASSPHRASE).node src/backup/cli.ts
npm run restoreRestore from an encrypted backup into an empty data folder and verify the hash chain.node src/backup/cli.ts --restore
npm run verifyVerify the Record hash chain and the anchors.node src/ops/verify.ts
npm run ots:verifyRecompute 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 mcpRun the MCP bridge on stdio, so an MCP client can read the fund with a scoped token.node src/mcp/stdio.ts
npm run openapiRegenerate docs/openapi/openapi.json from the route table.node src/integrations/openapi.ts
npm run eraseGDPR 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 doctorCheck the install end to end: data folder, token, database, market, model, broker, notifications, backups.node src/setup/doctor-cli.ts
npm run docsRegenerate the reference pages in docs/reference/ from the code.node tools/docs-gen.ts
npm run docs:checkFail when a reference page is out of date.node tools/docs-gen.ts --check
npm run siteBuild 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 checkRun 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