bat is a cat(1) clone with syntax highlighting and Git integration, written in Rust by David Peter. It supports syntax highlighting for hundreds of languages, shows Git modifications in the gutter, displays non-printable characters, and integrates with less for paging long files.
It is one of the most popular Rust CLI tools — a daily-driver upgrade for anyone who reads code from the terminal.
A cat clone with wings. Syntax highlighting, git integration, line numbers, paging built in.
✨ Features
Hundreds of language definitions from syntect. Code reads like in an editor, in the terminal.
+/-/~ markers in the gutter show modifications, additions, deletions vs HEAD.
Pipes through less by default for long files. --paging=never restores cat-like behavior.
Numbers shown by default. Optional grid, header, ANSI plain modes for scripting.
Bundled themes for dark, light, and high-contrast terminals. Bring your own TextMate theme.