Skip to main content

Crate rtb_cli

Crate rtb_cli 

Source
Expand description

CLI application scaffolding.

§Entry point

Downstream tools use Application::builder to wire their metadata, version info, optional assets + features, and the framework installs:

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.

Re-exports§

pub use application::report_to_exit_code;
pub use application::Application;
pub use application::ApplicationBuilder;
pub use health::HealthCheck;
pub use health::HealthReport;
pub use health::HealthStatus;
pub use init::Initialiser;
pub use passthrough::parse_passthrough;
pub use render::output;
pub use render::OutputMode;

Modules§

application
The Application entry-point type and its hand-rolled typestate builder.
browser
URL opening with a scheme allowlist and input hygiene.
builtins
Built-in commands shipped with rtb-cli.
config_cmd
config CLI subtree — show / get / set / schema / validate.
credentials
credentials CLI subtree — list / add / remove / test / doctor.
health
Health checks — the doctor subcommand’s plug-in point.
init
Initialisers — the init subcommand’s plug-in point.
passthrough
Argument handling for passthrough subcommands.
prelude
Glob-importable convenience prelude for downstream fn main().
render
Output rendering — the seam every v0.4 ops subcommand uses to honour the global --output text|json flag.
runtime
Runtime wiring helpers: tracing registry install, signal binding.
telemetry
telemetry CLI subtree — status / enable / disable / reset.