cli-battery-pack 0.1.0

Battery pack for building CLI applications in Rust
docs.rs failed to build cli-battery-pack-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: cli-battery-pack-0.5.0

cli-battery-pack: CLI Battery Pack

A curated collection of crates for building command-line applications in Rust.

Included crates

  • clap — argument parsing with derive macros
  • anyhow — easy error handling for applications
  • thiserror — derive macros for custom error types
  • tracing + tracing-subscriber — structured logging
  • console — terminal styling and colors
  • indicatif — progress bars and spinners
  • dialoguer — interactive prompts

Usage

Add the battery pack: cargo bp add cli

Then use it:

use cli::{clap::Parser, anyhow::Result};

#[derive(Parser)]
struct Args {
    name: String,
}

fn main() -> Result<()> {
    let args = Args::parse();
    println!("Hello, {}!", args.name);
    Ok(())
}