Public Command Surface

The public command surface is the set of terminal commands exposed by the canonical codealmanac script and its short ca alias. The package maps both console-script names to codealmanac.cli.main:main, so they share one parser, command behavior, output contract, and exit-code contract [@pyproject]. Parser modules define syntax only; the CLI adapter boundary explains how parsed commands cross into services and workflows.

The root parser registers three command families: run commands, wiki commands, and admin commands [@parser_root]. The admin family delegates to config, setup, diagnostics, update, jobs, and automation parser modules [@parser_admin]. It also exposes --version and lists the visible top-level command names in PUBLIC_COMMAND_METAVAR [@parser_root]. Hidden worker commands exist for internal scheduling and queue execution, but they are removed from visible choices and from rendered syntax guidance [@parser_run] [@syntax_catalog].

Parser failures go through the custom argument parser, which classifies syntax problems before the CLI renderer turns them into user-facing guidance [@parser_argument].

Top-Level Commands#

Command Purpose Main options
init [path] Initialize a local CodeAlmanac wiki [@repo_readme]. --name, --description, --using, --guidance, --json [@parser_run]
ingest <inputs...> Queue ingest work over local material. --wiki, --using, --title, --guidance, --json [@parser_run]
garden Queue wiki improvement work. --wiki, --using, --title, --guidance, --json [@parser_run]
sync Sync recently active transcripts into wiki work. --wiki, --from, --using, --json; subcommand status [@parser_run]
list List registered local wikis. --json [@parser_wiki]
search [query] Search the selected wiki. --wiki, --topic, --mentions, --limit, --slugs, --json [@parser_wiki]
show <page> Show one indexed wiki page. --wiki, --json, --body, --meta, --lead, --links, --backlinks, --files, --topics [@parser_wiki]
topics List, inspect, and mutate topics; no subcommand lists all topics. show, create, describe, link, unlink, rename, delete [@parser_wiki]
health Report graph and source health. --wiki, --json [@parser_wiki]
validate Validate the local wiki and return nonzero when issues exist. --wiki, --json [@parser_wiki]
reindex Force a full index rebuild. --wiki, --json [@parser_wiki]
serve Serve the local wiki viewer and open it in the default browser. --wiki, --host, --port, --no-open; defaults to 127.0.0.1:3927 and opens the browser [@parser_wiki]
tag <page> <topics...> Add topics to a page frontmatter block. --wiki [@parser_wiki]
untag <page> <topics...> Remove topics from a page frontmatter block. --wiki [@parser_wiki]
config Read or write user config values, or apply saved config to machine automation. list, get, set, apply; keys cover auto_commit, harness.default, harness.model, and the automation.<task>.enabled/automation.<task>.every family; see Config keys [@parser_config]
setup Install local agent instructions and scheduled automation. --target, --yes, --runner, --no-auto-commit, --no-telemetry, --skip-instructions, --no-auto-update, --sync-every, --sync-off, --garden-every, --garden-off, --json [@parser_setup]
uninstall Remove setup-owned local artifacts. --yes, --json [@parser_setup]
doctor Check the local install and selected wiki. --wiki, --json [@parser_diagnostics]
update Update the local CLI. --check, --json; --scheduled is hidden [@parser_updates]
jobs Inspect local run records. --wiki, --limit, --json; subcommands show, logs, attach, cancel [@parser_jobs]
automation Report scheduled local automation status. subcommand status; task filters and --json [@parser_automation]

The run commands are covered in the workflow architecture pages. The exact machine-readable output surface is covered by JSON output contract.

automation has no install or uninstall subcommand; its status subcommand only filters and reports scheduled tasks, defaulting to all three when no task names are given [@automation_selection]. Scheduled tasks are changed through config set automation.<task>.enabled and config set automation.<task>.every, which reconcile that task's scheduler entry immediately, or through config apply after a direct edit to ~/.codealmanac/config.toml [@automation_jobs]. See Config keys for the full key set and Setup local automation for the operational path.

Hidden Commands#

Three top-level commands are intentionally hidden from normal help: __run-worker, __run-executor, and __garden-scheduler [@parser_run]. __run-worker requires --cwd and drains queued run work for a repository; for each queued run it spawns __run-executor <run-id>, which claims that one run and actually executes the operation so the worker process can keep draining the queue if the executor is cancelled [@parser_run]. __garden-scheduler is the scheduled garden entrypoint [@parser_run].

The update --scheduled flag is also hidden from help while remaining accepted by the update parser [@parser_updates]. These hidden entries are implementation entrypoints, not public user workflows.

Intentionally Absent Legacy Surface#

The parser rejects removed or unsupported flags because they are not registered. Tests assert that init --root, list --drop, search --include-archive, and search --archived render the CodeAlmanac Unknown option syntax screen rather than silently mapping to legacy behavior [@parser_argument] [@cli_tests].

That absence is part of the surface. New repos use the fixed almanac/ tree, registered repositories are not auto-dropped by list, and archive flags are not part of the current search parser. When adding a command, follow Add a CLI command and keep syntax in the parser family that owns the command.