Skip to main content

Module commands

Module commands 

Source
Expand description

Subcommand implementations for the doiget CLI.

Each module corresponds to a single clap subcommand declared in main.rs. The dispatch table in main.rs calls run(...) on the matching module. Subcommands return anyhow::Result<()>; any error surfaces via the CLI’s top-level error reporter (stderr).

§Phase 1 surface (so far)

  • audit_logdoiget audit-log --verify recomputes the SHA-256 hash chain on the provenance log and reports any mismatches.
  • batchdoiget batch <path> multi-ref orchestrator (rate-bounded).
  • bibdoiget bib <ref> BibTeX exporter (Phase 2 starter).
  • configdoiget config show/path/doctor.
  • csldoiget csl <ref> exports a stored entry as CSL JSON 1.0.
  • fetchdoiget fetch <ref> orchestrator (arXiv E2E + DOI metadata-only).
  • info — prints a stored entry’s Metadata as TOML on stdout.
  • list_recent — prints up to N most-recently-fetched entries.
  • search — case-insensitive substring search over stored metadata.

Other subcommands (serve) land in separate PRs.

Modules§

audit_log
doiget audit-log --verify — re-validate the SHA-256 hash chain.
batch
doiget batch <path> — multi-ref orchestrator.
bib
doiget bib <ref> subcommand — emit a BibTeX entry for a stored entry.
capabilities
doiget capabilities — single-shot inventory JSON for LLM cold-boot (#214).
config
doiget config <action> — config introspection.
csl
doiget csl <ref> — emit a CSL JSON 1.0 array for a stored Metadata.
fetch
doiget fetch <ref> subcommand.
info
doiget info <ref> subcommand — read-only metadata inspection.
list_recent
doiget list-recent [--limit=N] subcommand — read-only most-recent listing.
output
Output-mode resolution for the doiget CLI (ADR-0017, #144; Amendment 1 = #219/#220).
provenance
doiget provenance migrate — one-shot v1 → v2 migration tool (ADR-0024, docs/PROVENANCE_LOG.md §“Schema migration”).
search
doiget search <query> subcommand — case-insensitive substring search over stored metadata.