Command Line
Techniques to help create command line interfaces, such as argument parsers, line editing, or output coloring and formatting
Topic | Relevant Rust Crates |
---|---|
Argument Parsing | clap ⮳, structopt ⮳, argh ⮳ |
Interactive Prompts | dialoguer ⮳, console ⮳ |
Progress Bars | indicatif ⮳, pbr ⮳ |
Table Formatting | prettytable ⮳, term-table ⮳ |
Color Output | ansi_term ⮳, owo-colors ⮳ |
File System Operations | Use std::fs , pathdiff ⮳. |
Process Management | std::process |
Text Manipulation | regex ⮳, grep-cli ⮳, bat ⮳ (for cat like functionality) |
Configuration | config ⮳, serde ⮳ (for serialization) |
Logging | log ⮳, env_logger ⮳ |
Argument Parsing
FIXME
ANSI Terminal Handling
FIXME
Terminal User Interfaces (TUI)
Recipe | Crates | Categories |
---|---|---|
Build Complex TUI |
User Interactions
Recipe | Crates | Categories |
---|---|---|
Ask for Confirmation, Selection, Text Input | ||
Display Progress Bars and Spinners |
Related Topics
- Command Line Utilities.
- Internationalization.
References
- Command Line Applications in Rust (book)⮳.
- Look to the Code⮳ for
Command-Line Rust
(O'Reilly, 2022, ISBN 9781098109417).