1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//! CLI application scaffolding.
//!
//! # Entry point
//!
//! Downstream tools use [`Application::builder`] to wire their
//! metadata, version info, optional assets + features, and the
//! framework installs:
//!
//! * a `tracing-subscriber` registry (pretty fmt on TTY, JSON
//! otherwise or when `--log-format json` is set),
//! * the `miette` diagnostic + panic hooks (via [`rtb_error::hook`]),
//! * a [`tokio_util::sync::CancellationToken`] bound to `SIGINT` and
//! Unix `SIGTERM`,
//! * clap-based command parsing with built-in subcommands filtered by
//! the runtime [`rtb_app::features::Features`] set.
//!
//! ```ignore
//! use rtb_cli::prelude::*;
//!
//! #[tokio::main]
//! async fn main() -> miette::Result<()> {
//! Application::builder()
//! .metadata(ToolMetadata::builder().name("mytool").summary("a tool").build())
//! .version(VersionInfo::from_env())
//! .build()?
//! .run()
//! .await
//! }
//! ```
//!
//! See `docs/development/specs/2026-04-22-rtb-cli-v0.1.md` for the
//! authoritative contract.
// `deny` (not `forbid`) so submodules registering into
// `linkme::distributed_slice` (the `credentials` and similar
// subtrees) can `#![allow(unsafe_code)]` for the
// `#[link_section]` attribute the macro emits. No hand-rolled
// `unsafe` blocks exist in this crate.
pub use ;
pub use ;
pub use Initialiser;
pub use parse_passthrough;
pub use ;
/// Glob-importable convenience prelude for downstream `fn main()`.