choir_cli/lib.rs
1//! Shared pieces of the `choir` command line.
2//!
3//! The binary lives in `main.rs`; this library exists so the agent-facing
4//! surface can be described once as data and rendered into every place
5//! that documents it, with a test able to check that none of them have
6//! drifted.
7//!
8//! # Examples
9//!
10//! ```
11//! let usage = choir_cli::surface::usage();
12//! assert!(usage.starts_with("usage:\n"));
13//! // Grouped: a section heading, and the command names under it.
14//! assert!(usage.contains("\nreview\n"));
15//! assert!(usage.contains("verdict"));
16//! ```
17//!
18//! # Where this sits
19//!
20//! `docs/architecture.md` is the map of the whole workspace.
21//! This crate is the `choir` binary, and the surface table every generated document is rendered from.
22//!
23//! It builds on [`choir_fs`], [`choir_hash`], [`choir_identity`], [`choir_node`], [`choir_oplog`] and [`choir_view`].
24//!
25//! The complete surface, rendered from the table in
26//! [`surface`] and included here so the two cannot disagree:
27//!
28#![doc = include_str!("../../../docs/using/cli.md")]
29
30/// Regenerating the readable half of an ACL file (D46).
31pub mod acl;
32
33// Same reason as `docs`: the module's own header carries intra-doc links.
34pub mod backup;
35// Deliberately no `///` here, unlike some of its neighbours. A doc
36// comment written on the `pub mod` line is merged with the module's own
37// `//!` header, and the merged text resolves its intra-doc links in
38// *this* module's scope rather than in `docs`'s -- so `docs`'s header
39// linking to `docs::target_dir_from_metadata` became an unresolved link
40// and, under the workspace's `deny`, failed `cargo doc` outright. The
41// module documents itself.
42pub mod docs;
43// Same reason as `docs` above: this module's own header carries an
44// intra-doc link, and a `///` here would resolve it in the wrong scope.
45pub mod doctor;
46// Same reason as `docs`: intra-doc links in the module's own header.
47pub mod init;
48// Same reason as `docs`: the module's own header carries intra-doc links.
49pub mod host;
50// Same reason as `docs`: the module's own header carries intra-doc links.
51pub mod join;
52pub mod mcp;
53// Same reason as `docs`: the module's own header carries intra-doc
54// links that must resolve in its scope, not this one.
55pub mod node;
56
57/// One-command proposal from a git checkout.
58pub mod propose;
59
60// Same reason as `docs`: the module's own header carries intra-doc links.
61pub mod prompt;
62pub mod runner;
63
64// Same reason as `docs`: the module's own header carries intra-doc links.
65pub mod restore;
66
67// Same reason as `docs`: the module's own header carries intra-doc links.
68pub mod serve;
69
70// Same reason as `docs`: the module's own header carries intra-doc links.
71pub mod supervise;
72
73/// Colour, and the "did you mean" a refusal needs to be useful.
74pub mod style;
75pub mod surface;
76// Same reason as `docs`: the module's own header carries intra-doc links.
77pub mod tls;
78pub mod triage;
79
80/// `SYNC.md`'s checks over a served log page.
81pub mod verify;