Rust reimplementation of lolcat maintained by skyline69. It sticks to the standard library while matching the original help surface.
- Streams stdin or multiple files (treating
-as stdin) with the familiar rainbow gradient. - Supports the classic flags (
--spread,--freq,--seed,--animate, etc.) plus a--debugmode for diagnostics. - Detects truecolor terminals automatically while allowing explicit
--truecolor/--forceoverrides. - Handles
Broken pipe/SIGPIPEsituations gracefully so pipelines likemacchina | lolcat -t --animate 1 | head -n1exit cleanly. - Includes unit and integration tests to lock in parser behavior and CLI regressions.
Install with the following command:
cargo install neo-lolcatcargo build --releaseOptimized binaries are emitted to target/release/lolcat. The release profile enables opt-level=3, fat LTO, single codegen unit, and panic = "abort" for maximum throughput.
cargo fmt
cargo test
cargo clippy -- -D warningsThe integration suite under tests/cli.rs spawns the compiled binary and checks help/version output plus forced-color pipelines; tests/stress.rs feeds random binary data to guard against crashes. For longer runs, scripts/stress.sh streams configurable amounts of random data through the release binary (requires Python 3).
A GitHub Actions workflow (.github/workflows/ci.yml) runs fmt, clippy, unit + integration tests, and a release build on every push/PR to keep the binary stable across toolchains.
Usage: lolcat [OPTION]... [FILE]...
Concatenate FILE(s), or standard input, to standard output.
With no FILE, or when FILE is -, read standard input.
Refer to lolcat --help for the complete flag list and examples. Use --debug or the legacy LOLCAT_DEBUG=1 environment variable to see internal diagnostics when troubleshooting terminal quirks.