Skip to main content

Crate fathomdb_cli

Crate fathomdb_cli 

Source
Expand description

Operator CLI parser + verb runtime for fathomdb.

Surface owned by dev/interfaces/cli.md. Phase 10a wires the parser scaffold to real engine seam calls: doctor check-integrity, doctor safe-export, doctor trace, recover --rebuild-projections, recover --rebuild-vec0, and recover --excise-source invoke the corresponding fathomdb::Engine methods and serialize the typed report under the per-verb JSON discriminator.

Modules§

exit_code
Stable exit-code classes for the operator CLI.

Structs§

CheckIntegrityArgs
Per-verb argument set for doctor check-integrity.
Cli
Top-level CLI invocation.
DoctorArgs
Wrapper carrying the doctor verb table beneath the doctor root.
DumpMutationsArgs
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 existing Engine::read_mutations seam.
RecoverArgs
Argument set for the recover root command.
SafeExportArgs
Per-verb argument set for doctor safe-export.
SimpleDoctorArgs
Shared args for doctor verbs whose only options are --json and a required <db_path> positional. cli.md § Output posture: --json is the normative machine-readable contract on every verb.
TraceArgs
Per-verb argument set for doctor trace.
VerifyEmbedderArgs
Per-verb argument set for doctor verify-embedder. cli.md (amended 2026-05-15) locks the invocation as verify-embedder --identity <s> --dimension <n> <db_path>.
WarmCacheArgs
EU-5b — fathomdb doctor warm-cache argument 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.
DoctorCommand
Doctor verb table per dev/interfaces/cli.md § Doctor verbs.

Functions§

effective_dump_limit
Resolve the effective doctor dump-mutations page 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 EngineError to the CliOutcome class per dev/interfaces/cli.md § Error to exit-code mapping.
engine_open_error_to_outcome
Map an EngineOpenError to the CliOutcome class per dev/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.