The published binary is martin-loop. Public installs, docs, and examples should use martin-loop.
martin-loop --version
martin-loop start
martin-loop tour
martin-loop doctor
martin-loop demo
martin-loop audit [--days <n>] [--project <text>] [--dir <path>] [--share] [--offline]
martin-loop session-start [--host <claude|codex|gemini|generic>]
martin-loop phase status|contract|session-start|preflight|run [--execute]
martin-loop preflight <objective> [options]
martin-loop run <objective> [options]
martin-loop bench --suite <suiteId>
martin-loop triage
martin-loop dossier (--latest | --loop-id <id> | --file <path>)
martin-loop inspect --file <path>
martin-loop resume <loopId>
martin-loop challenge [--loop-id <id> | --file <path> | --latest] [--format markdown|svg]
martin-loop share (--loop-id <id> | --file <path> | --latest) [--out-dir <path>]
martin-loop badge [--format svg|json] [--runs-dir <path>]
martin-loop runs list|get|attempt|verify ...
martin-loop sync status
martin-loop sync flush
martin-loop mcp print-config --host <codex|claude|gemini|generic>
martin-loop mcp install --host <codex|claude|gemini|generic>
npx -y martin-loop@latest audit
npx -y martin-loop@latest audit --days 30 --json
npx -y martin-loop@latest audit --share
npx -y martin-loop@latest audit --offlineThe audit reads Claude Code session history locally. It estimates API-equivalent spend inside fix-and-retry loops and reports verifier failures, retry depth, stuck loops, red-ending sessions, and edited sessions with no recognized verifier command. By default it may fetch the public LiteLLM model-price list; no session contents are sent. Use --offline for zero network access.
Use this sequence when you are new to the product or setting up a fresh repo:
npx -y martin-loop@latest enable --engine codex
npx -y martin-loop@latest start
npx -y martin-loop@latest --version
npx -y martin-loop@latest demo
cd martin-loop-demo
npm install
npx -y martin-loop@latest run "Summarize the workspace and prove tests still pass" --verify "npm test" --budget-usd 2 --max-iterations 1
npx -y martin-loop@latest share --latestrun auto-checks doctor, session-start, and preflight, then executes when the environment is ready. Run those commands directly when you want to inspect the governed checks first.
--objective <text> The task to accomplish, or pass it as the first positional arg
--budget <n> Hard cost cap in USD
--budget-usd <n> Alias for --budget
--soft-limit-usd <n> Soft budget threshold in USD
--verify <cmd> Verifier command after each attempt
--proof Explicitly opt into a no-spend proof adapter lane
--unsafe-allow-unguarded-run
Bypass the local governance gate for this one run
--max-iterations <n> Maximum number of attempts
--max-tokens <n> Maximum token budget
--engine <name> Adapter to use: claude, codex, or openai
--model <name> Override the adapter model
--cwd <path> Repo root for the run
--allow-path <glob> Restrict writes to this path pattern; repeatable
--deny-path <glob> Block this path pattern; repeatable
--accept <criterion> Add an acceptance criterion; repeatable
--config <path> Path to a martin.config.yaml file
--workspace <id> Workspace ID for the run record
--project <id> Project ID for the run record
--metadata <key=value> Attach metadata to the run record; repeatable
npx -y martin-loop@latest enable --engine codex
npx -y martin-loop@latest doctor
npx -y martin-loop@latest session-start
npx -y martin-loop@latest preflight "fix the auth regression" --verify "pnpm test"Use bench when you want the shipped public benchmark summary from an installed package:
npx martin-loop bench --suite under-3-challenge
npx martin-loop bench --suite ralphy-engineering-50Use the public benchmark workspace when you want clean-clone repro from the repository:
pnpm install --frozen-lockfile
pnpm --filter @martin/benchmarks build
pnpm --filter @martin/benchmarks test
pnpm --filter @martin/benchmarks eval
pnpm --filter @martin/benchmarks report:ralphy--runs-dir <path> Override the Martin runs root for guided flow receipts, persisted evidence views, and badge generation
--out-dir <path> Override where `martin share` writes the local share bundle
sync status reports queued hosted evidence. sync flush attempts to upload eligible queued records using:
MARTIN_API_TOKEN Workspace-scoped hosted API token
MARTIN_TELEMETRY_ENDPOINT Hosted telemetry endpoint
Both settings are required for a flush. Missing configuration returns a nonzero exit and preserves the queue. A later configured flush uploads the same run ID; normal governed execution and local receipt verification remain independent of hosted availability. Keep tokens in environment or secret-management facilities and never print them.
Use triage first when you want the fastest ranking of saved runs:
npx martin-loop triageUse dossier when you want one run receipt:
npx martin-loop dossier --latestCompatibility views remain available:
npx martin-loop inspect --file ~/.martin/runs/<workspaceId>.jsonl
npx martin-loop resume <loopId>
npx martin-loop challenge --latest
npx martin-loop share --latest
npx martin-loop badge --format json --runs-dir ~/.martin/runsmartin badge reports how many of five binary local evidence signals are present:
- a configured budget;
- a configured verifier;
- a persisted run receipt with verified integrity;
- rollback, restore, or patch evidence; and
- passing local MCP doctor prerequisites.
The human result and full --json document report N/5 signals and explain every missing signal. --format svg emits an SVG badge, while --format json emits the compact four-field Shields static-endpoint document.
A 5/5 result means all five local evidence signals are present. It is not a historical success rate, probability, benchmark result, or claim that agent runs succeed 100 percent of the time. The retained points and maxPoints fields are compatibility readiness points, with 20 points assigned to each present signal.
Use share when you want a reviewable bundle for the latest governed run or a specific saved run.
npx martin-loop share --latest
npx martin-loop share --loop-id <loopId>
npx martin-loop share --file ~/.martin/runs/<loopId>/loop-record.json
npx martin-loop share --latest --out-dir ./receiptsBy default MartinLoop writes:
run-receipt.jsonrun-receipt.mdproof-card.svg
The default output location is the selected run directory under share/.
session-start and phase read local MartinLoop receipts and local phase state, then turn that state into a suggested run contract before work starts.
phase statussummarizes local posture.phase contractprints the generated contract.phase preflightprints the preflight invocation.phase runprints the governed run invocation.
phase preflight and phase run are dry-run by default. Add --execute only after the generated contract has the right verifier, budget, allowed paths, and blocked paths.