Skip to main content

Module cli

Module cli 

Source
Expand description

CLI dispatch layer for codescout artifact* subcommands.

Each verb translates clap-parsed args into a serde_json::Value shaped like the corresponding librarian-mcp tool’s input, calls the tool, and routes the response through format::print.

Modules§

artifact
codescout artifact <verb> — find/get/graph/state-at/create/update/move/link.
artifact_augment
codescout artifact-augment <id> — attach or merge augmentation params/prompt.
artifact_event
codescout artifact-event <verb> — create / list.
artifact_refresh
codescout artifact-refresh <verb> — gather / list-stale.
audit_doc_refs
codescout audit-doc-refs — CLI wrapper over the librarian audit_doc_refs tool. Exists so CI gates and other non-MCP callers can run the audit without going through the MCP server.
doctor
cargo run -- doctor — invoke the librarian catalog drift scanner.
format
Output formatter for the CLI. Pretty by default, JSON via --json.

Structs§

CommonOpts
Flags shared by every CLI subcommand.

Functions§

exit_with
Print result and exit with the right code. JSON mode wraps errors so hooks can parse them; pretty mode writes to stderr.
open_ctx
Build the librarian-mcp ToolContext. Honors --project by setting LIBRARIAN_CWD before delegating to the shared bootstrap.
read_at_or_stdin
Resolve a CLI string that may be @<path>, - (stdin), or a literal value.