cli-battery-pack
A battery pack for building CLI applications in Rust.
Quick Start
cargo bp add cli
Want progress bars too?
cargo bp add cli -F indicators
License
Licensed under either of:
at your option.
Battery pack contents
User Input
Argument parsing and interactive prompts
| Name | Description |
|---|---|
config | XDG/platform config directories (etcetera) |
Terminal Output
Color, hyperlinks, and progress display
| Name | Description |
|---|---|
indicators | Progress bars and spinners (indicatif + console) |
Crates: console, indicatif |
Dependencies
| Name | Description |
|---|---|
anstream | IO stream adapters for writing colored text that will gracefully degrade according to your terminal’s capabilities. |
anstyle | ANSI text styling |
anstyle-hyperlink | ANSI escape code hyperlinks (OSC 8) |
anyhow | Flexible concrete Error type built on std::error::Error |
clap | A simple to use, efficient, and full-featured Command Line Argument Parser |
colorchoice-clap | Clap mixin to override console colors |
dialoguer | A command line prompting library. |
human-panic | Panic messages for humans |
ignore | |
regex | An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs. |
supports-hyperlinks | Detects whether a terminal supports rendering hyperlinks. |
wild | Glob (wildcard) expanded command-line arguments on Windows |
Dev dependencies
| Name | Description |
|---|---|
snapbox | Snapshot testing toolbox |
Templates
| Name | Description |
|---|---|
simple | Minimal CLI with argument parsing |
subcmds | CLI with subcommands |