autocontextDocs
CLI

Command reference

The current autoctx operational surfaces, the runtime that serves each one, and representative flags.

Last updated Aug 26, 2026

The Runtime column shows where a command is implemented: both runtimes, py for the Python package only, or ts for the TypeScript package only. This reference covers the supported operational surfaces; large command groups have additional subcommands and flags. Run autoctx <command> --help for the installed package's exact parser. Python's autoctx commands --all includes advanced commands and compatibility aliases that its concise default help omits.

Commands that call a model need a provider; set AUTOCONTEXT_AGENT_PROVIDER before invoking them. Inspect, export, auth, and configuration commands generally do not. See CLI overview for the invocation model and providers for the runtime-specific provider matrix.

Solve and run

CommandDescriptionRuntimeKey flags
solveCreate and solve a scenario from plain language.bothcommon: -d/--description, --iterations (--gens/--generations compatibility), --family, --output, --json; py also: --task-file, --task-prompt, --simplicity-mode
runRun the generation loop for a scenario. Python requires an explicit scenario and preflights configured OpenAI-compatible endpoints; npm may use a project default.bothcommon: scenario positional or --scenario, --iterations (--gens compatibility), --run-id, --json; py also: --serve, --port, --preset, --skip-preflight; ts also: --provider, --matches
resumeContinue a previously started run.py--scenario, run id argument
replayPrint replay JSON for a generation.bothpy: <run-id>; ts: --run-id; both: --generation
showShow the latest, best, or selected generation for a run. Python also surfaces evaluator lineage and active re-score revisions.both<run-id> or --run-id, --best, --generation, --json
watchFollow a run until its final completed generation is visible.both<run-id> or --run-id, --interval, --ndjson; --json is deprecated
listList recent runs.both--json
benchmarkRun a scenario multiple times and aggregate stats.both--scenario, --runs
runtime-sessionsInspect recorded runtime sessions.ts--json

status --json and show --json each write one versioned, schema-backed value. watch --ndjson streams the same run-status-v1 envelope one value per line. For the shared contract-v2 surface, success data goes to stdout, structured errors go to stderr, and exit codes are 0 for success, 2 for invalid usage, and 1 for execution failure.

Evaluation

CommandDescriptionRuntimeKey flags
judgeOne-shot evaluation of output against a rubric.bothpy: --task-prompt, --provider, --model, --timeout, --json; ts: --prompt, --scenario, --from-stdin and always-JSON output; both: -p, -o/--output, -r/--rubric
improveMulti-round evaluate-and-revise loop.bothpy: --task-prompt, --provider, --timeout, --json, --ndjson, --simplicity-mode; ts: --prompt, --scenario, --min-rounds, RLM flags, --verbose, always-JSON output; both: -p, -r/--rubric, -o/--output, -n/--rounds, -t/--threshold
replRun a direct REPL-loop session.ts(interactive)
ab-testCompare two configurations on a scenario.py--scenario

Plain-language workflows

CommandDescriptionRuntimeKey flags
simulateRun a plain-language simulation with sweeps and analysis.bothcommon: -d/--description, --variables, --sweep, --runs, --max-steps, --replay, --compare-left/--compare-right, --export, --format, --save-as, --json; py only: --provider
investigateRun a plain-language investigation with evidence and hypotheses.bothcommon: -d/--description, --max-steps, --hypotheses, --save-as, --browser-url, --json; py only: --mode
analyzeAnalyze and compare runs, simulations, investigations, and missions.ts--id, --left/--right, --type

Missions and campaigns

CommandDescriptionRuntimeKey flags
missionManage multi-step missions. TypeScript always writes JSON; Python uses --json when requested.bothsubcommands create/run/status/list/pause/resume/cancel/artifacts; --name, --goal, --type, --id, --max-steps; py only: --json
campaign create/status/list/add-mission/progress/pause/resume/cancelManage a TypeScript multi-mission Campaign.ts--id, --name, --goal, --mission-id, budget flags
campaign runRun or resume a durable Python branch/trial evaluation plan.pyPLAN.json, --state-root, --json
campaign audit listList durable independent campaign-audit records.py<campaign-id>, --store-root, --json
campaign audit resolveAppend an operator disposition for an audit fingerprint.py<campaign-id> <evidence-fingerprint>, --operator, --disposition, --rationale, --audit-id, --store-root

Background queue

CommandDescriptionRuntimeKey flags
queue addAdd a task to the background runner queue. TypeScript requires --spec; Python accepts either a spec or prompt.bothcommon: -s/--spec, -p/--prompt, -r/--rubric, --browser-url, --min-rounds, --priority; py only: --task-prompt, -n/--rounds, -t/--threshold, --provider, --json; ts only: RLM flags
queue statusShow the pending-task count. JSON guarantees pending_count; npm also emits deprecated pendingCount.both--json
workerRun the background task queue worker.both--poll-interval, --concurrency, --max-empty-polls, --once, --model, --json
statusShow run status; Python also surfaces evaluator lineage and active re-score revisions. Queue status lives under queue status.both<run-id> or --run-id, --json

Auth and discovery

CommandDescriptionRuntimeKey flags
initScaffold project config and agent guidance.ts
loginStore provider credentials persistently.ts
whoamiShow current auth status and provider.ts
logoutClear stored provider credentials.ts
providersList known providers with auth status.ts
modelsList available models for authenticated providers.ts
capabilitiesShow available scenarios, providers, and features (JSON).both
agentRun, dev-serve, or build local .autoctx/agents handlers.tssubcommands run/dev/build

Scenarios

CommandDescriptionRuntimeKey flags
scenario createCreate a scenario. This is the canonical nested path.both--description, --template, --name
new-scenarioHidden compatibility alias for scenario create.both--description, --template, --name

Export, import, skills, and training

CommandDescriptionRuntimeKey flags
exportExport portable JSON (the default, written to stdout without --output) or a Pi-package directory. strategy is a deprecated alias for json.both<run-id> or --run-id, --scenario, --format json|pi-package, --output, --json receipt
export-training-dataExport training data as JSONL; quarantined evaluator scores are excluded by default.both--run-id or --scenario --all-runs, --output, --include-matches, --kept-only, --include-quarantined
import-packageImport a strategy package from a file.bothpy: file path argument; ts: --file / -f; both: --scenario, --conflict, --json
trainPython performs packaged local training. TypeScript validates/orchestrates a training request and needs an injected real executor.bothpy dataset: --data; ts dataset: --dataset; both include --scenario, --backend, --base-model, --teacher-model, --scale-profile, --opd-diagnostics, --opd-pressure-mode, --json
train-r1Run the R1-style cold-start distillation + RLVR recipe.py--scenario, --data, --output-dir, --base-model, --variant, --register-import
self-improveTrain, sample, score, append elite samples, and report the best deployable model.py--scenario, --data, --output-dir, --rounds, --samples-per-round, --elite-fraction, --backend, --json
share prepareLocally scan a run and prepare a redacted bundle/report for sharing.py<run-id>, --scenario, --runs-root, --knowledge-root, --output, --license, --dry-run, --json
skills listList the host-agnostic skills the Python package can emit.py--json
skills exportPrint or write the autocontext-creator or autocontext-consumer SKILL.md.py<name>, --output, --force, --json

Servers and integration

CommandDescriptionRuntimeKey flags
serveStart the HTTP API and WebSocket server through the bare shared path.both--host, --port
serve httpStart the same HTTP/WebSocket service through Python's explicit nested path.py--host, --port
serve mcpStart the MCP server on stdio through the canonical shared nested path.both
mcp-serveHidden compatibility alias for serve mcp.both
tuinpm launches or remotely attaches the interactive pi-tui client; Python starts the API/WebSocket server used by a separate terminal client.bothpy: --port; ts: --port, --connect, --headless

See terminal UI for local and remote attachment, detachment versus stopping, command confirmation, and security boundaries.

Evaluator epochs (Python)

CommandDescriptionRuntimeKey flags
epoch listList candidate, active, and disabled evaluator epochs.py--scenario
epoch approveApprove and activate a candidate epoch, clearing quarantine on its prior scores.py<scenario> <epoch-id>, --charter, --by
epoch rejectRecord a human rejection while leaving the epoch and its scores quarantined.py<scenario> <epoch-id>, --charter, --by
rescoreRe-run the current evaluator against stale original artifacts. Report-only by default; --apply appends an audit revision without replacing the live score.py<run-id>, --generation, --apply, --by, --json

Python show and status include active_evaluator_epoch plus per-generation evaluator_epoch, evaluator_epoch_status, and quarantined. They also show the latest active-epoch revision as has_active_revision, revised_score, revised_by, and revised_at; the original live score remains the score of record.

Ambient trainer (Python)

CommandDescriptionRuntimeKey flags
ambient initCreate a charter through the interview flow.py--charter-path, --force
ambient statusInspect stage backlog, datasets, candidates, and active serving pointers.pypath overrides
ambient runRun the resident charter-governed trainer.py--charter-path, --poll-seconds
ambient onceRun one named ambient stage once.py<stage>, path overrides
ambient proposalsList pending charter proposals.py--charter-path, --proposals-path
ambient approve / ambient rejectApply or reject a pending proposal.py<proposal-id>, --charter-path, --proposals-path

Additional Python workflows

CommandDescriptionRuntimeKey flags
ecosystemAlternate providers across cycles sharing one knowledge directory.py--scenario, --cycles, --gens-per-cycle, --provider-a/--provider-b, --rlm-a/--no-rlm-b
waitWait for an existing monitor condition to fire.py<condition-id>, --timeout, --json
analyticsRebuild traces, inspect drift and context selection, render timelines, and emit stored-trace findings.pysubcommands rebuild-traces/drift/context-selection/render-timeline/trace-findings
hermesInspect Hermes Curator state, export the skill, ingest redacted data, train an advisor, and emit recommendations.pysubcommands; run autoctx hermes --help

Control plane (TypeScript)

CommandDescriptionRuntimeKey flags
candidateRegister, list, show, lineage, and rollback control-plane artifacts.tssubcommands
evalAttach and list evaluation runs on artifacts.tssubcommands
promotionDecide, apply, and show history for promotion transitions.tssubcommands
harnessCreate and gate evidence-backed harness and context proposals.tssubcommands
registryRepair, validate, and migrate the control-plane registry.tssubcommands
emit-prGenerate a promotion pull request (or dry-run bundle) for a candidate.tscandidate id

Diagnostics and traces

CommandDescriptionRuntimeKey flags
probes checkRun contract probes against observed harness state.both
probes extractExtract a probe suite from an observed harness trace.bothtrace and output paths
production-tracesIngest, list, show, export, and manage production traces.tssubcommands
instrumentScan a repo for LLM clients and propose autocontext wrappers.tsrepo path
trace-findingsExtract structured findings from a public trace JSON file. Python's stored-trace equivalent is analytics trace-findings.tstrace file path
context-selectionInspect persisted context-selection telemetry. Python's equivalent is analytics context-selection.tscommand-specific filters
commandsList the concise Python command set; include advanced commands and compatibility aliases with --all.py--all
versionShow the installed version through the npm subcommand. Both runtimes also support global autoctx --version --json.ts--json

This table describes the published 0.17.0 core packages. Use the installed package's autoctx <command> --help as the exact parser authority and see installation for current pins.