Expand description
FathomDB operator CLI — the fathomdb binary: parser plus verb runtime.
Installing this crate gives you the fathomdb command. It is
operator-only and deliberately ships no application query surface: there
is no fathomdb search / get / list. Use one of the SDKs
(the fathomdb facade crate for Rust, or the Python / TypeScript packages)
to read and write data.
Two roots:
fathomdb doctor <verb>— read-only or artifact-producing diagnostics:check-integrity,safe-export,verify-embedder,trace,dump-schema,dump-row-counts,dump-profile,dump-mutations,orphan-provenance,warm-cache,recompute-mean.fathomdb recover --accept-data-loss <flag>— the only lossy, non-bit-preserving root:--truncate-wal,--rebuild-vec0,--rebuild-projections,--excise-source, and the--excise-collection/--excise-record-keypair.
--json is the normative machine-readable contract on every verb; exit
codes are a stable class set (0 clean, 64 data-loss acknowledged, 65
findings, 66 artifact failure, 70 unrecoverable, 71 lock-held).
The CLI is not required for deletion on request. Since 0.8.20 the SDKs
ship purge and erase_source themselves. recover --excise-source
remains the only route into the engine’s reserved _-prefixed provenance
namespace, and --excise-collection / --excise-record-key has no SDK
peer.
This crate enables the operator cargo feature on the fathomdb facade,
which is what un-gates the recovery seam it drives.
Surface owned by dev/interfaces/cli.md; verb semantics by
dev/design/recovery.md. Each verb invokes the corresponding
fathomdb::Engine method and serializes the typed report under a per-verb
JSON discriminator.
Modules§
- exit_
code - Stable exit-code classes for the operator CLI.
Structs§
- Check
Integrity Args - Per-verb argument set for
doctor check-integrity. - Cli
- Top-level CLI invocation.
- Doctor
Args - Wrapper carrying the doctor verb table beneath the
doctorroot. - Dump
Mutations Args - Slice 34 — argument set for
doctor dump-mutations <collection> [--after-id <n>] [--limit <n>] [--json] <db_path>. A read-only operator diagnostic that pages the op-store mutation log over the existingEngine::read_mutationsseam. - Recover
Args - Argument set for the
recoverroot command. - Safe
Export Args - Per-verb argument set for
doctor safe-export. - Simple
Doctor Args - Shared args for doctor verbs whose only options are
--jsonand a required<db_path>positional.cli.md§ Output posture:--jsonis the normative machine-readable contract on every verb. - Trace
Args - Per-verb argument set for
doctor trace. - Verify
Embedder Args - Per-verb argument set for
doctor verify-embedder.cli.md(amended 2026-05-15) locks the invocation asverify-embedder --identity <s> --dimension <n> <db_path>. - Warm
Cache Args - EU-5b —
fathomdb doctor warm-cacheargument set.
Enums§
- CliOutcome
- Outcome classes that map to the stable exit-code matrix in
dev/interfaces/cli.md§ Exit-code classes. - Command
- Root command verbs.
- Doctor
Command - Doctor verb table per
dev/interfaces/cli.md§ Doctor verbs.
Functions§
- effective_
dump_ limit - Resolve the effective
doctor dump-mutationspage limit: the operator’s--limit(or the default when omitted), clamped to the engine page cap [DUMP_MUTATIONS_MAX_LIMIT]. Pure + total so the clamp is unit-pinned without seeding a >1M-row log (tests/parser.rs). - engine_
error_ to_ outcome - Map an
EngineErrorto theCliOutcomeclass perdev/interfaces/cli.md§ Error to exit-code mapping. - engine_
open_ error_ to_ outcome - Map an
EngineOpenErrorto theCliOutcomeclass perdev/interfaces/cli.md§ Error to exit-code mapping. - outcome_
to_ exit_ code - Map an outcome to the stable exit code defined in
cli.md. - run
- Run a parsed CLI command.