thurbox-cli
Working reference indexed by AGENTS.md. The rationale behind these decisions is owned by the docs under docs/; a change that invalidates what this says updates it in the same PR.
What it drives
Sessions are Fleet Tasks (ADR-41); their command line is fleet, not
thurbox-cli. thurbox-cli covers the interface's own files and a running interface:
| Subcommand | What it does |
| --- | --- |
| editor get/set/mode | the editor Ctrl+O opens, in interface.json |
| config validate/show | strict parse of every config file; the effective configuration and where each value comes from |
| version [--check], update [--force] | the running version; the newest release of this major line |
| notify [--test], notify send | which desktop-notification backend would deliver, and a sample; deliver one notification, with an optional --key/--min-interval dedupe |
| perf [--mods] | the perf snapshot a running interface publishes to perf.json |
| mod … | interface mods: where they live, install, sync, check. mod, the deprecated plugin and config first move an interface from its old plugin names to mods/, mods.toml, mods.lock and mod-state.json (kernel::mod_migration), printing one notice to stderr when something moved; when a rewrite cannot be saved the old layout stays and the command fails |
| ui …, schema | bounded requests to a running interface (src/ui_control.rs) |
| doctor | each Fleet settings.toml lists ([fleets.<name>], or fleet on this machine): reachable, version, harnesses and places; the multiplexer when a Fleet runs here; the interface's telemetry export from [telemetry] and the OTEL_* variables, with where each value comes from; and a warning for a left-over hosts.toml, which nothing reads; and mod-leftovers, a warning for an old plugins/, plugins.toml, plugins.lock or plugin-state.json still present. Every check that is not ok carries a fix (JSON) and a fix: line |
| migrate | thurbox 2.x state into Fleet: reads thurbox.db with the system sqlite3 -readonly -json (no SQLite in thurbox's tree), applies each live session as a dispatch: false Task and each cron spawn automation whose time zone is set to UTC as a suspended CronTask through fleet apply --create-only, each labelled with its 2.x id so a second run skips it; removes retired settings.toml keys (keeping settings.toml.v2); prints hosts.toml as [runtimes.mux.places] tables and each agents.toml agent Fleet has no profile for as a harness profile (fleet version --json names Fleet's), never writing Fleet's config; writes thurbox.db.migrated, which silences the startup notice, only when every object was applied. --dry-run changes nothing |
Output and exit codes
- Human text in a terminal, TOON down a pipe;
--json,--pretty,--toon
and --text force one. --fields picks a list's columns; --full keeps
long text whole.
- stdout carries exactly one document. A command whose report is the answer
and still fails (config validate) prints the report and exits 1, with the
reason on stderr.
- A failure that printed nothing is a structured error on stdout:
{"error", "error_kind", "suggestion"} and help next steps.
- Exit codes:
0success,1ran and failed,2usage (clap's own
wording), 3 ambiguous (several running interfaces and none chosen).
- A bare
thurbox-cliprints its help.
Where the code lives
src/bin/thurbox-cli.rs is the entrypoint; src/cli/mod.rs parses and
dispatches; each subcommand is one file under src/cli/.