# Module :: `cli_fmt`
<!--{ generate.module_header.start() }-->
[](https://github.com/emersion/stability-badges#experimental) [](https://github.com/Wandalen/wTools/actions/workflows/workspace_push.yml) [](https://docs.rs/cli_fmt) [](https://discord.gg/m3YfbXpUUY)
<!--{ generate.module_header.end }-->
CLI output formatting utilities for command-line applications.
## Purpose
Provides utilities specifically designed for building command-line applications: output
processing with head/tail filtering, ANSI-aware width truncation, and stream merging.
See [docs/invariant/001_architectural_boundary.md](docs/invariant/001_architectural_boundary.md)
for the `cli_fmt` vs `strs_tools` design boundary.
## Modules
- `output` — Process command output with head/tail filtering, width truncation, and stream merging
- `help` — Render structured CLI help text from typed data with configurable style and TTY-conditional ANSI
## Usage
```rust
use cli_fmt::output::*;
let config = OutputConfig::default()
.with_head( 10 )
.with_width( 80 );
let result = process_output( stdout_str, stderr_str, &config );
println!( "{}", result.content );
```
## Features
- `enabled` — master switch; activates core dependencies
- `output` — CLI output processing (head/tail filtering, width truncation, stream merging)
- `cli_help_template` — typed CLI help renderer (`CliHelpStyle`, `CliHelpData`, `CliHelpTemplate`)
- `ansi_unicode` — grapheme-based Unicode width via `unicode-segmentation` (opt-in)
- `full` — enables all functionality (`enabled` + `output` + `ansi_unicode` + `cli_help_template`)
## License
MIT