Kitten is a Rust-powered reimplementation of the classic Unix cat command — built as part of a broader mission to make Linux tools more Rusty, secure, and modern.
It supports all common cat flags (including -A, -v, -E, -T, -b, -n, -s, -e, and -t) while offering a clean, safe codebase written entirely in Rust.
| Binary | Size | Speed (10MB file) | Relative |
|---|---|---|---|
cat |
40 KB | 3.9 ms | 1.00x |
kitten (release) |
412 KB | 8.0 ms | 2.03x slower |
Benchmarked with hyperfine on a UTF-8 test file.
-n,--number: Number all output lines.-b,--number-nonblank: Number non-blank lines only.-s,--squeeze-blank: Suppress repeated blank lines.-E,--show-ends: Display$at the end of each line.-T,--show-tabs: Display tabs as^I.-v,--show-nonprinting: Show non-printable characters (except tabs/newlines) as^X.-A,--show-all: Equivalent to-v -E -T.-e: Equivalent to-v -E.-t: Equivalent to-v -T.-: Read from standard input (stdin).
Each release includes:
- A precompiled binary:
kitten - An
assets/directory with:helpfile.txtversionfile.txt
To install: Grab the latest release from the Releases page.
tar -xf kitten-v1.0.0-x86_64-linux.tar.gz
cd kitten-v1.0.0
chmod +x kitten
./kitten --help🔥 Note: The
assets/directory must remain alongside the binary for help/version messages to work correctly.
git clone https://github.com/Hunter2718/kitten.git
cd kitten
cargo build --release
./target/release/kitten --helpkitten [FLAGS] [FILES]...-
Number all lines:
kitten -n file.txt
-
Squeeze blank lines and show line ends:
kitten -s -E file.txt
-
Show tabs and non-printable characters:
kitten -t -v file.txt
-
Combine files and stdin:
kitten -A - file1.txt file2.txt
-
Read from standard input:
echo -e "hi\tbye" | kitten -t -
Kitten uses an assets/ directory to display user-facing information.
assets/helpfile.txt: Custom help output for--helpassets/versionfile.txt: Custom version output for--version
These files are required at runtime and are bundled with releases. Keep them next to the binary.
Kitten applies flags in the following order (to match GNU cat behavior):
-ssqueeze blank lines-Tshow tabs-vshow non-printables-Eshow ends-nor-bline numbering
This project is licensed under the MIT License.
Kitten is part of a broader initiative to rewrite essential Linux command-line tools in Rust, improving safety, readability, and long-term maintainability.
This project aims to:
- Deepen the developer’s understanding of systems-level Rust
- Serve as a proof-of-concept for Rust-powered coreutils
- Inspire others to join the Rustification of Linux
Contributions, improvements, bug reports, and feature requests are welcome!
- Fork the repo
- Create a feature branch
- Submit a pull request
Made by me (Hunter2718)
Find me on GitHub: @Hunter2718
For questions, feedback, or ideas, open an issue.