Skip to main content

CLI Reference

Generated by make docs-cli from the dispatch table in cmd/ailang/commands.go. Do not edit this page; edit the Command row and regenerate. make check-cli-docs fails if the page and the table disagree.

Finding a command

ailang --help # the visible top level, one screen
ailang <group> --help # everything filed in a group (dev, ops, eval)
ailang help <command> # one command's own help
ailang <command> --help # the same thing, spelled the other way

--help exits 0 at every level and runs nothing. An unknown command prints one line and a suggestion on stderr and exits 1 — it does not dump the command list into your pipe.

Output conventions

QuestionFlagNotes
Machine-readable output--jsonThe one output-format flag. ailang test --json, not --format json.
Which model--modelailang eval-suite --models is accepted as an alias of the same target.
Where output goes--outputSix of the eight sites. ailang compile --out and ailang eval-publish --output-dir are not converged yet.
Gate a mutation--dry-runAudited at all 14 sites: the default acts, and --dry-run is the opt-out everywhere. No command inverts it.

Superseded spellings keep working — ailang test --format json still means --json — because the fleet and fifteen frozen teaching prompts call them. They are not the spelling to learn. Two commands keep a --format of their own for a reason that is not output format: ailang check --format agent selects a third rendering (and ailang ai-check is ailang check --verify --format agent), and ailang exec --stream-json is an NDJSON event stream, which is not what --json means there.

Two commands parse --format by hand rather than registering it, so they do not accept --json and were invisible to the flag audit that converged the rest: ailang eval-report --format=markdown|html|docusaurus|json|csv and ailang doctor managed_agents --format=json. Both need the = form. Converging them is a follow-up, not a documentation problem.

Groups are a drawer, not a rename

ailang messages list and ailang ops messages list are the same route. A group exists so ailang --help fits on one screen; every grouped command keeps its own top-level spelling, and no script, skill or launchd driver has to change.

Commands

The visible top level: what ailang --help lists.

CommandAlso acceptedWhat it does
ailang checkailang ai-checkType-check a file or directory (--verify adds contract verification)
ailang docsShow stdlib module documentation (--list to enumerate)
ailang evalBenchmarks: run one, or a subcommand (suite, report, elo, ...)
ailang examplesSearch and explore working code examples
ailang fmtFormat AILANG source (stdout / --write / --check)
ailang helpShow help for ailang, a group or a command
ailang ifacePrint the normalized JSON interface of a module
ailang initScaffold a new AILANG package or web app
ailang lspLanguage Server Protocol server (for AI agents and IDEs)
ailang pkgPackage registry inspection and coordination
ailang promptDisplay the AILANG teaching prompt (for AI code generation)
ailang replStart the interactive REPL
ailang runRun an AILANG program
ailang serveailang serverStart the Observatory dashboard server (default port 1957)
ailang testRun tests (--package for package mode)
ailang verifyVerify contracts and proof obligations
ailang versionShow version, commit hash and build time

ailang dev — Language-development and diagnostic commands

Reachable as ailang dev <command> and, unchanged, as ailang <command>.

CommandTop-level spellingWhat it does
ailang dev agent-promptailang agent-promptDisplay the AILANG agent prompt
ailang dev ast-editailang ast-editStructural edit of an AILANG declaration
ailang dev axiomsailang axiomsDesign axiom compliance scorecard
ailang dev builtinsailang builtinsInspect the builtin registry
ailang dev cacheailang cache, ailang brainProject brain / semantic cache operations
ailang dev compileailang compileCompile AILANG to Go (emit-go)
ailang dev debugailang debugDebug AST and type information
ailang dev devtools-promptailang devtools-promptDisplay the AILANG dev tools reference (for AI agents)
ailang dev disasmailang disasmDisassemble compiled AILANG
ailang dev doctorailang doctorEnvironment diagnostics (builtins, memory, managed_agents, ...)
ailang dev editorailang editorInstall editor syntax highlighting (vscode, vim, neovim)
ailang dev export-trainingailang export-trainingExport traces as AI training data
ailang dev generate-extension-registryailang generate-extension-registryEmit the static extension dispatch file from [extensions]
ailang dev micro-ragailang micro-rag, ailang microrag, ailang uragMicro-RAG index and retrieval operations
ailang dev piailang piManage pi extensions (install, uninstall, status)
ailang dev policy-checkailang policy-checkEvaluate a policy program against its cases
ailang dev replayailang replayReplay and verify against a recorded trace
ailang dev sandbox-checkailang sandbox-checkDiagnose FS sandbox path resolution (AILANG_FS_SANDBOX)
ailang dev select-bestailang select-bestPick the best candidate from generated variants
ailang dev watchailang watchWatch a file for changes and re-run it

ailang ops — Fleet operations: messages, coordinator, mission, chains, models

Reachable as ailang ops <command> and, unchanged, as ailang <command>.

CommandTop-level spellingWhat it does
ailang ops access-controlailang access-controlAccess control management
ailang ops budgetailang budgetBudget monitoring
ailang ops chainsailang chainsExecution chains, traces, observatory and dashboard queries
ailang ops coordinatorailang coordinatorManage the autonomous agent daemon
ailang ops daemonailang daemonLocal ailang daemon: run, install, uninstall, status
ailang ops design-quorumailang design-quorumN-reviewer design quorum, reject-by-default
ailang ops design-reviewailang design-reviewAI review of a design document
ailang ops execailang execUnified AI execution for programmatic use
ailang ops mcpailang mcpModel Context Protocol server operations
ailang ops messagesailang messages, ailang msgAgent message plane: list, send, read, ack
ailang ops missionailang missionMission registry, iteration, role dispatch and reports
ailang ops modelsailang modelsModel registry: role, source, publish
ailang ops serve-apiailang serve-apiServe AILANG exports as REST endpoints
ailang ops storageailang storageStorage plane status (which backend each store resolved to)
ailang ops workspacesailang workspacesWorkspace management

ailang eval — Benchmarks and eval analysis

Reachable as ailang eval <command> and, unchanged, as ailang <command>.

CommandTop-level spellingWhat it does
ailang eval analyzeailang eval-analyzeAnalyze eval results and generate design docs
ailang eval browser-profileailang browser-profileManage persistent authenticated browser identities
ailang eval censored-pairsailang eval-censored-pairsCensored fmt pairs with treatment/order integrity gates
ailang eval compareailang eval-compareCompare two eval runs
ailang eval eloailang eval-eloPer-language (AILANG vs Python) ELO leaderboard and benchmark difficulty
ailang eval matrixailang eval-matrixPerformance matrix with statistics
ailang eval pairedailang eval-pairedPaired A/B comparison + McNemar (not aggregate rates)
ailang eval publishailang eval-publishPer-release Docusaurus publication of eval results
ailang eval reportailang eval-reportGenerate a comprehensive eval report
ailang eval runailang evalRun one benchmark (the bare ailang eval form)
ailang eval suiteailang eval-suiteRun the full benchmark suite (parallel)
ailang eval summaryailang eval-summarySummarize eval results
ailang eval sweet-spotailang eval-sweet-spotCost-vs-time-vs-success sweet-spot ranking
ailang eval trendailang eval-trendFailure-feedback candidate triage across eval history

Compatibility spellings

Routes the binary still accepts but no longer lists. They exist so an existing caller keeps working; new code should use the canonical spelling.

RouteUse insteadWhat it does
ailang addailang pkg addAdd a dependency (--path, --git or --registry)
ailang binailang pkg binList or uninstall the [bin] command shims (list, uninstall <name>)
ailang dashboardailang chains dashboardDashboard operations for task visualization
ailang eval-chainsailang chains evalLink eval runs to their execution chains
ailang installailang pkg installInstall a package (omit the version for latest); [bin] commands go on PATH
ailang internal-dump-iface, ailang dump-ifaceDump a package's canonical interface JSON (internal)
ailang lockailang pkg lockResolve dependencies and write the lockfile
ailang observatoryailang chains observatoryObservatory analytics
ailang pkg-docsailang pkg docsDisplay a package's AGENT.md (AI usage guide)
ailang publishailang pkg publishPublish the current package to the registry
ailang searchailang pkg searchSearch the registry by keyword or tag
ailang traceailang chains traceDistributed trace management
ailang treeailang pkg treeShow the dependency tree
ailang unpublishailang pkg unpublishRemove a package version from the registry

ailang docs search "query" searches the local design_docs/ or docs/ corpus first, and falls back to GitHub code search when run outside a source checkout. The fallback requires authentication — GITHUB_TOKEN or gh auth login; unauthenticated search is not attempted. --path <dir> forces a local corpus and --no-github (or AILANG_NO_GITHUB_SEARCH) disables the fallback. GitHub results are cached per query for one hour under ~/.ailang/cache/docsearch/github/; a cache entry holds results and metadata only, never tokens.

Startup contract

Language commands — the ones you run to work with AILANG rather than to operate the fleet — open no observatory database and run no git probe at startup. This is a contract with a test behind it (cmd/ailang/commands_probe_test.go counts the probes), not a presentation choice, and it holds for a command's group spelling too: ailang dev builtins is as quiet as ailang builtins.

The language commands are ast-edit, builtins, check, compile, debug, devtools-prompt, disasm, docs, examples, export-training, fmt, help, iface, init, lsp, prompt, repl, replay, run, select-best, test, verify, version, watch.