5 releases
Uses new Rust 2024
| 0.1.4 | Aug 15, 2025 |
|---|---|
| 0.1.3 | Jul 23, 2025 |
| 0.1.2 | Jul 17, 2025 |
| 0.1.1 | Jul 17, 2025 |
| 0.1.0 | Jul 17, 2025 |
#231 in Debugging
291 downloads per month
6KB
litcat
litcat is a simple Rust CLI tool for viewing patch and diff files with highlighting. It colors added (+), removed (-), and context lines to make git diffs easier to read in your terminal.
Features
- Colors added lines in green
- Colors removed lines in red
- Colors diff headers and hunk markers
- Reads from a file or standard input (pipe)
Usage
From a patch file
litcat xxx.patch
Accepting stdin
cat diff.patch | litcat
Example Output
- Lines starting with
+(but not+++) are green - Lines starting with
-(but not---) are red - Diff headers (
+++,---) are cyan - Hunk markers (
@@ ... @@) are yellow - All other lines are default color
Installation
1. Build from Source
- Clone the repo:
git clone https://github.com/shan-shaji/litcat.git cd litcat - Build:
cargo build --release - Copy the build to
~/.cargo/bin. - Run as shown above.
2. Install from crates.io
you can install directly using cargo:
cargo install litcat
Dependencies
Dependencies
~1–3MB
~59K SLoC