diff --git a/engine/Cargo.lock b/engine/Cargo.lock index 633e6eccf..549d00d9f 100644 --- a/engine/Cargo.lock +++ b/engine/Cargo.lock @@ -808,6 +808,7 @@ dependencies = [ "cfg-if", "chrono", "clap", + "clap-cargo", "colored", "console", "console_log", @@ -908,6 +909,7 @@ dependencies = [ "serde_json", "tokio", "tracing-subscriber", + "valuable", ] [[package]] @@ -1319,6 +1321,16 @@ dependencies = [ "clap_derive", ] +[[package]] +name = "clap-cargo" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b2ea69cefa96b848b73ad516ad1d59a195cdf9263087d977f648a818c8b43e" +dependencies = [ + "anstyle", + "clap", +] + [[package]] name = "clap_builder" version = "4.5.9" diff --git a/engine/cli/Cargo.toml b/engine/cli/Cargo.toml index 96b3e77ef..5e68ea00f 100644 --- a/engine/cli/Cargo.toml +++ b/engine/cli/Cargo.toml @@ -27,7 +27,8 @@ base64.workspace = true bstd.workspace = true bytes.workspace = true cfg-if.workspace = true -clap = { workspace = true, features = ["env"] } +clap = { workspace = true, features = ["color", "env"] } +clap-cargo = "0.14.1" colored = "2.1.0" console = "0.15.0" dashmap.workspace = true @@ -100,7 +101,11 @@ sha2 = "0.10.8" tracing = "0.1.40" # Valuable is needed to prevent serializing objects using Debug, and instead use Serialize. # https://github.com/tokio-rs/tracing/issues/1570 -tracing-subscriber = { version = "0.3.18", features = ["json", "env-filter","valuable"] } +tracing-subscriber = { version = "0.3.18", features = [ + "json", + "env-filter", + "valuable", +] } [features] diff --git a/engine/cli/src/commands.rs b/engine/cli/src/commands.rs index 1a8fc861d..412ebdc8e 100644 --- a/engine/cli/src/commands.rs +++ b/engine/cli/src/commands.rs @@ -5,7 +5,8 @@ use clap::{Parser, Subcommand}; use baml_runtime::BamlRuntime; #[derive(Parser, Debug)] -#[command(author, version, about = "A CLI tool for working with the BAML runtime.", long_about = None)] +#[command(author, version, about = "A CLI tool for working with BAML. Learn more at https://docs.boundaryml.com.", long_about = None)] +#[command(styles = clap_cargo::style::CLAP_STYLING)] #[command(propagate_version = true)] pub(crate) struct RuntimeCli { /// Specifies a subcommand to run.