Skip to main content

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;
46pub mod follower;
47// Same reason as `docs`: intra-doc links in the module's own header.
48pub mod init;
49// Same reason as `docs`: the module's own header carries intra-doc links.
50pub mod host;
51// Same reason as `docs`: the module's own header carries intra-doc links.
52pub mod join;
53pub mod mcp;
54// Same reason as `docs`: the module's own header carries intra-doc
55// links that must resolve in its scope, not this one.
56pub mod node;
57
58/// One-command proposal from a git checkout.
59pub mod propose;
60
61// Same reason as `docs`: the module's own header carries intra-doc links.
62pub mod prompt;
63pub mod runner;
64
65// Same reason as `docs`: the module's own header carries intra-doc links.
66pub mod restore;
67
68// Same reason as `docs`: the module's own header carries intra-doc links.
69pub mod seed;
70pub mod serve;
71
72// Same reason as `docs`: the module's own header carries intra-doc links.
73pub mod supervise;
74
75/// Colour, and the "did you mean" a refusal needs to be useful.
76pub mod style;
77pub mod surface;
78// Same reason as `docs`: the module's own header carries intra-doc links.
79pub mod tls;
80pub mod triage;
81pub mod upgrade;