CLI Contract Inventory

This inventory captures Holon's current CLI surface as compiled from src/main.rs and checked against target/debug/holon --help for holon 0.14.1. It is a stability planning document, not a promise that every listed command is already stable.

The current implementation keeps the CLI in one Rust binary:

Stability levels

See CLI stability policy for the user-facing support policy behind these labels.

LevelMeaningChange policy
stableIntended public surface that users and scripts may reasonably depend on.Avoid breaking changes; require release notes and migration path.
experimentalPublicly reachable but still being shaped.May change before 1.0; prefer warnings or aliases before removal.
internalDebug, runtime, or local-development surface.Not intended for external automation; may change when internals change.
deprecatedKept for compatibility but replaced by another surface.Document replacement and remove only through an explicit deprecation plan.

Cross-cutting CLI contract

SurfaceCurrent behaviorInitial stabilityNotes
Command parserClap-derived command tree with --help and --version at the root.stableCommand and flag names are the highest-value CLI contract.
Help textHuman-readable Clap output.experimentalUseful for users; exact spacing and prose should not be treated as machine-readable.
ErrorsClap validation errors or anyhow errors rendered by the binary runtime.experimentalExit code shape needs explicit tests before declaring stable.
JSON outputScript-facing JSON commands pretty-print JSON to stdout via the shared print_json path.experimentalJSON field shape usually comes from runtime/control-plane structs and needs API inventory alignment.
Human outputrun, solve, serve, debug latency, debug prompt, and some debug/export commands write human text to stdout.experimentalDo not snapshot full prose unless the command is intentionally script-facing.
stderrTracing logs, Clap errors, credential prompt, and some provider/runtime diagnostics.experimentalCredential prompt intentionally writes to stderr.
stdinOnly config credentials set --stdin currently reads from stdin.stable candidateInteraction details need a focused test.
Config/envMost commands load AppConfig; config commands use $HOLON_HOME for offline config paths.experimentalSee configuration reference for the broader env surface.

Command inventory

Root

CommandArgsOptionsOutputInitial stabilityNotes
holon --helpnone-h, --help, -V, --versionhuman help to stdoutstable candidateShould be covered by command-tree snapshot tests.
holon <COMMAND> --helpcommand-dependentcommand-dependenthuman help to stdoutstable candidate for shape; experimental for proseRegenerate cli.md when command shape changes.

Server and daemon

CommandArgsOptionsOutputInitial stabilityNotes
holon servenone--access <local|tunnel|lan|tailnet> default local; --host <HOST>; --listen <LISTEN>; --port <PORT>; --advertise <ADVERTISE>; --token <TOKEN>; --token-file <TOKEN_FILE>long-running server; startup summaries on stdout; logs/tracing on stderrexperimentalNon-loopback/tailnet/lan access requires control token via flag, file, or HOLON_CONTROL_TOKEN.
holon daemon startnonesame ServeOptions as serveJSON daemon lifecycle responsestable candidateInline token is passed to child process via env, not argv.
holon daemon stopnonenoneJSON daemon lifecycle responsestable candidateUses local daemon lifecycle helper.
holon daemon statusnonenoneJSON daemon status responsestable candidateImportant local inspection surface.
holon daemon restartnonesame ServeOptions as serveJSON daemon lifecycle responsestable candidateSame access/token validation as serve.
holon daemon logsnone--tail <TAIL> default 80JSON daemon log responsestable candidatedaemon logs is documented as a local troubleshooting surface.

Offline configuration

These commands operate on persisted config or credential files directly rather than requiring a running daemon.

CommandArgsOptionsOutputInitial stabilityNotes
holon config get<KEY>noneJSON value for the keystable candidateKey set comes from the configuration contract.
holon config set<KEY> <VALUE>noneJSON value after writestable candidateValue parsing is key-specific.
holon config unset<KEY>noneJSON { "key": ..., "status": "unset" }stable candidateStatus string should be locked if scripts depend on it.
holon config listnonenonefull persisted config JSONexperimentalExposes broad config file shape; align with config reference before declaring stable.
holon config schemanonenoneJSON config schema/metadatastable JSONLocked by tests/cli_json_contract.rs; entry objects expose key, kind, description, default, and optional allowed_values.
holon config doctornonenoneJSON provider/system diagnosticsexperimentalDiagnostic shape may evolve as providers change.
holon config models listnonenoneJSON model availability listexperimentalProvider catalog and availability details are still evolving.

Provider configuration

CommandArgsOptionsOutputInitial stabilityNotes
holon config providers set<PROVIDER>--transport <TRANSPORT>; --base-url <BASE_URL>; --credential-source <SOURCE> default none; --credential-kind <KIND> default none; --credential-env <ENV>; --credential-profile <PROFILE>; --credential-external <COMMAND>JSON { "applied_via": "offline_store", "provider": ... }stable candidate for command shape; experimental for provider objectBuilt-in providers may reject incompatible transport overrides.
holon config providers get<PROVIDER>noneJSON provider viewexperimentalOutput uses runtime provider view.
holon config providers listnonenoneJSON array/object of provider viewsexperimentalOutput shape should be reconciled with API/config inventory.
holon config providers remove<PROVIDER>noneJSON { "applied_via": "offline_store", "provider": ..., "status": "removed|not_configured" }stable JSONLocked by tests/cli_json_contract.rs; status strings are script-facing.
holon config providers doctor<PROVIDER>noneJSON provider view plus model-chain diagnosticsexperimentalDiagnostic details may evolve.

Credential configuration

CommandArgsOptionsOutputInitial stabilityNotes
holon config credentials set<PROFILE>required --kind <KIND>; one of --stdin or --material <MATERIAL>JSON { "applied_via": "offline_store", "credential": { "profile": ..., "kind": ..., "configured": true } }stable JSONLocked by tests/cli_json_contract.rs; --stdin prompt goes to stderr; raw --material is intentionally discouraged for secrets.
holon config credentials listnonenoneJSON credential profile list with profile, kind, and configured; credential material is never includedstable JSONLocked by tests/cli_json_contract.rs; must not expose credential material.
holon config credentials remove<PROFILE>noneJSON { "applied_via": "offline_store", "credential": { "profile": ..., "kind": ..., "configured": false } }stable JSONLocked by tests/cli_json_contract.rs; missing profiles return kind: "unknown" and configured: false.

Agent interaction and inspection

These commands require a reachable local control plane unless noted otherwise.

CommandArgsOptionsOutputInitial stabilityNotes
holon prompt<TEXT>--agent <AGENT>JSON control prompt responseexperimentalLightweight prompt path; response shape belongs to control-plane API inventory.
holon tailnone--limit <LIMIT> default 20; --agent <AGENT>JSON recent briefs/log tailstable candidateResult shape should align with brief/output contract.
holon transcriptnone--limit <LIMIT> default 50; --agent <AGENT>JSON transcript entriesstable candidateTranscript entry stability needs API inventory.
holon task run<SUMMARY>required --cmd <CMD>; --workdir <WORKDIR>; --shell <SHELL>; --login <true|false>; --tty; --yield-time-ms <MS>; --max-output-tokens <N>; --agent <AGENT>pretty JSON control-plane responseexperimentalCreates command tasks through the control plane.
holon task status<TASK_ID>--agent <AGENT>pretty JSON TaskStatusSnapshotexperimentalReads task lifecycle state through the task status API.
holon task output<TASK_ID>--block; --timeout-ms <MS>; --agent <AGENT>pretty JSON TaskOutputResultexperimentalOutput preview length follows the task's creation-time --max-output-tokens; this command controls readiness waiting only.
holon task input<TASK_ID>required --text <TEXT>; --agent <AGENT>pretty JSON TaskInputResultexperimentalSends trusted operator text to command-task stdin/TTY or supervised child-agent follow-up input.
holon task stop<TASK_ID>--agent <AGENT>pretty JSON TaskStopResultexperimentalRequests managed-task cancellation through the control plane.
holon work-item listnone--limit <LIMIT> default 50; --agent <AGENT>pretty JSON array of WorkItemRecordexperimentalInitial WorkItem CLI surface is read-only. The JSON schema owner is the HTTP/API WorkItemRecord read model returned by /agents/:agent_id/work-items.
holon work-item get<WORK_ITEM_ID>--agent <AGENT>pretty JSON WorkItemRecordexperimentalReads a single work item through /agents/:agent_id/work-items/:work_item_id; create/update/pick/complete commands are deferred until those mutation API contracts are stabilized.
holon timernonerequired --after-ms <MS>; --every-ms <MS>; --summary <SUMMARY>; --agent <AGENT>pretty JSON control-plane responseexperimentalTimer surface should be aligned with WorkItem/waiting-plane contract.

Agent lifecycle and model selection

CommandArgsOptionsOutputInitial stabilityNotes
holon agent / holon agentsoptional subcommandnonedefaults to agent list JSONstable candidateagents is an alias.
holon agent listnonenoneJSON agent entriesstable candidatePublic multi-agent inspection surface.
holon agent statusoptional [AGENT_ID]noneJSON agent statusstable candidatePositional agent id; defaults to configured default agent.
holon agent create<AGENT_ID>--template <TEMPLATE>pretty JSON control-plane responsestable candidateTemplate identifier contract should align with agent initialization docs.
holon agent startoptional [AGENT_ID]noneJSON lifecycle control responsestable candidateReplacement for deprecated control start.
holon agent stopoptional [AGENT_ID]noneJSON lifecycle control responsestable candidateReplacement for deprecated control stop.
holon agent abortoptional [AGENT_ID]nonepretty JSON control-plane responsestable candidateReplacement for deprecated control abort; shares the lifecycle JSON output path with start/stop.
holon agent model getoptional [AGENT_ID]noneJSON model override/status fragmentstable candidateReads summary.model from agent status.
holon agent model set<MODEL> [AGENT_ID]noneJSON model override responsestable candidatePositional AGENT_ID is tested.
holon agent model clearoptional [AGENT_ID]noneJSON model override responsestable candidateShould share contract with set/get.
holon control<start|stop|abort>--agent <AGENT>pretty JSON lifecycle responsedeprecatedUse `holon agent start

Deprecated holon control compatibility is documented in CLI stability policy. New automation should use the holon agent ... lifecycle commands.

Skills

CommandArgsOptionsOutputInitial stabilityNotes
holon skills listnone--agent <AGENT>JSON installed-skill responseexperimentalSkill discovery/install contract is still active design work.
holon skills install<NAME_OR_PATH>--builtin; --remote; --skill <SKILL>; --copy; --agent <AGENT>pretty JSON control-plane responseexperimentalLocal paths are resolved relative to cwd when they are directories; otherwise treated as named skills.
holon skills uninstall<NAME>--agent <AGENT>pretty JSON control-plane responseexperimentalShares the normalized JSON output path with install/list.

One-shot and solve workflows

CommandArgsOptionsOutputInitial stabilityNotes
holon run<TEXT>--trust <TRUST> default trusted-operator; --json; --agent <AGENT>; --create-agent; --template <TEMPLATE>; --max-turns <N>; --no-wait-for-tasks; --home <HOME>; --workspace-root <PATH>; --cwd <PATH>human render_text() by default; pretty JSON with --jsonstable candidate for command shape; experimental for outputCore user entry point. JSON response shape should be locked before stable automation guidance.
holon solve<REF>--repo <REPO>; --base <BASE>; --goal <GOAL>; --role <ROLE>; --agent <AGENT>; --template <TEMPLATE>; --model <MODEL>; --max-turns <N>; --trust <TRUST> default trusted-operator; --json; --home <HOME>; --workspace <PATH>; --workspace-root <PATH>; --cwd <PATH>; --input <INPUT>; --output <OUTPUT>human render_text() by default; pretty JSON with --jsonexperimentalGitHub/task workflow surface. --workspace and --workspace-root are currently coalesced.

Workspace

CommandArgsOptionsOutputInitial stabilityNotes
holon workspace attach<PATH>--agent <AGENT>JSON attach responsestable candidateWorkspace identity/projection contract is central to runtime stability.
holon workspace exitnone--agent <AGENT>JSON exit responsestable candidateShould align with workspace-binding RFCs.
holon workspace detach<WORKSPACE_ID>--agent <AGENT>JSON detach responsestable candidateWORKSPACE_ID stability belongs to API/runtime inventory.

TUI

CommandArgsOptionsOutputInitial stabilityNotes
holon tuinone--no-alt-screen; --connect <URL>; --token <TOKEN>; --token-file <PATH>; --token-profile <PROFILE>interactive terminal UIexperimental--connect requires exactly one token source. TUI is not the primary stable runtime contract.

Debug utilities

CommandArgsOptionsOutputInitial stabilityNotes
holon debug prompt<TEXT>--agent <AGENT>; --trust <TRUST> default trusted-operatorhuman prompt dumpinternalDebug-only prompt inspection.
holon debug latencynone--agent <AGENT>; --limit <LIMIT> default 10; --events-limit <EVENTS_LIMIT> default 5000human latency reportinternalUseful diagnostics; prose should not be machine contract.
holon debug scheduler-fixturenone--agent <AGENT>; required --output <OUTPUT>writes JSON/JSONL fixture files; prints export summaryinternalFixture file shape may be useful for tests but should be documented separately if stabilized.

Environment and config inputs touched by CLI

This is not the full configuration inventory; it lists environment variables that visibly affect CLI behavior while invoking commands.

InputUsed byCurrent behaviorInitial stability
HOLON_HOMEconfig/credentials and runtime config loadingSelects Holon home/config/credential paths.stable candidate
HOLON_HTTP_ADDRruntime/control-plane commandsSelects local control-plane HTTP address when loading AppConfig.stable candidate
HOLON_CALLBACK_BASE_URLserve, runtime configSets callback base URL default.experimental
HOLON_SOCKET_PATHdaemon/serveSelects local control socket path.experimental
HOLON_WORKSPACE_DIRruntime commandsSets default workspace directory.experimental
HOLON_AGENT_IDcommands with optional --agent / [AGENT_ID]Sets default agent id.stable candidate
HOLON_CONTROL_TOKENserve, daemon, control-plane client configSupplies bearer token/control auth.stable candidate
HOLON_CONTROL_AUTH_MODEcontrol-plane configParses auto, required, or disabled.experimental
HOLON_MODELrun, solve, provider configSets default model; solve --model writes this env var for the process.stable candidate
Provider API-key env varsprovider-backed commandsExamples include OPENAI_API_KEY, ANTHROPIC_AUTH_TOKEN, and configured custom env names.stable candidate for documented provider envs
RUST_LOG and tracing env filterall commandsControls tracing output to stderr.internal

Output contract gaps

  1. JSON responses now share the normalized stdout path for script-facing commands. The remaining output work is assigning schema owners and stability levels to each response shape.
  2. Exit codes now have a baseline process contract. See CLI exit codes. Command-specific business-state promotion to non-zero exits remains intentionally opt-in and must be documented per command.
  3. Machine-readable outputs need schema owners. CLI JSON often mirrors control-plane/runtime structs. The API inventory should decide which fields are stable, diagnostic, or internal.
  4. Human output is mixed with operational summaries. serve, run, solve, and debug commands should clearly state whether their stdout is script-safe.
  5. Deprecated control remains reachable. It should keep compatibility until a removal plan is documented.
  6. Help snapshots are manual. docs/website/reference/cli.md says it is regenerated from holon --help, but there is no checked-in generator or snapshot test.

Tracking issues

The initial Milestone 8 CLI/API stability follow-up work is complete. Phase 2 work remains tracked in the CLI/API Stability Contracts milestone by #1444:

PriorityIssueScope
1#1437Refresh API/CLI contract inventories after Milestone 8 completion.
1#1442Add JSON output schema and golden tests for stable commands.
2#1438Migrate OpenAPI baseline to aide route/type metadata.
2#1439Tighten OpenAPI DTO schemas for stable read models.
2#1440Add WorkItem mutation HTTP lifecycle endpoints.
2#1441Add Timer cancellation lifecycle endpoint.
3#1443Define stable operator-facing event payload subset.

Recommended next contract tests

PriorityTestPurpose
1Clap command tree/help snapshot with normalized whitespaceDetect accidental command/flag drift.
1Parse tests for stable candidate positional args and aliasesLock high-value CLI shape without over-snapshotting prose.
1--json smoke tests for run/solve with a fake provider or fixtureConfirm machine-readable mode remains parseable.
2Config command golden JSON for get, set, unset, schema, provider remove, credential list/removeLock offline scripting surfaces.
2Daemon/status/log JSON shape testsLock local operations surfaces.
2More error behavior tests for missing token and command-specific business statesExtend the baseline exit-code contract where commands promote domain failures to process failures.
3Normalize or document raw HTTP-body commands (task, timer, agent create/abort, skills install/uninstall)Reduce output contract drift.

Follow-up inventory scope

After this CLI inventory is reviewed, continue in this order:

  1. CLI JSON output schemas for stable-candidate commands (#1442).
  2. Control-plane DTO schemas used by CLI task/work-item/timer commands (#1439).
  3. Runtime event payload subset used by tail, transcript, replay, and SSE (#1443).
  4. Rust crate public API, if it is intended to be consumed externally.