Expand description
CLI output formatting utilities.
This crate provides utilities for building command-line applications, including output processing, formatting, and other CLI-specific helpers.
§Modules
output- Process command output (head/tail filtering, width truncation, stream merging)help- Typed, configurable CLI help text renderer (CliHelpTemplate,CliHelpStyle,CliHelpData)
§Architecture
This crate focuses on CLI-application-specific functionality. For general-purpose
string and ANSI manipulation, use strs_tools instead.
Distinction:
strs_tools: Generic string/ANSI utilities (any application)cli_fmt: CLI-specific helpers (command-line tools only)
§Examples
use cli_fmt::output::*;
let config = OutputConfig::default()
.with_head( 10 )
.with_width( 80 );
let result = process_output( "stdout text", "stderr text", &config );
println!( "{}", result.content );Modules§
- dependency
- Namespace with dependencies.
- exposed
- Exposed namespace of the module.
- help
- Structured CLI help template: data model + colour-aware renderer. Typed, configurable CLI help text renderer.
- orphan
- Orphan namespace of the module.
- output
- CLI output processing. CLI output processing utilities
- own
- Own namespace of the module.
- prelude
- Prelude to use essentials:
use cli_fmt::prelude::*.