finds.dev← search

// the find

sharkdp/bat

★ 59,317 · Rust · Apache-2.0 · updated Jun 2026

A cat(1) clone with wings.

bat is a cat replacement written in Rust that adds syntax highlighting, line numbers, Git diff markers, and automatic paging. It's designed as a drop-in for cat — when piped, it strips decorations and behaves exactly like cat. For anyone who spends time reading files in a terminal, it's the obvious upgrade.

The Git integration is genuinely useful: modified lines show up in the sidebar without any configuration, so you see diffs inline as you read. The automatic pager fallback is well-thought-out — bat detects non-interactive terminals and silently degrades to plain output, meaning you can alias it without breaking scripts. The syntax definition system builds on syntect and Sublime Text .sublime-syntax files, giving it a large, maintainable language library without reimplementing a parser. The `--line-range` flag and fzf integration work exactly as you'd want for previewing search results in large files.

The batcat vs bat naming mess on older Debian/Ubuntu is a real annoyance — it's been a known issue for years and still requires a manual symlink workaround rather than being fixed at the package level. The library API is available but under-documented for embedding use cases; the README mentions it, then points to docs.rs and leaves you there. Custom themes are stuck on the legacy .tmTheme format — newer .sublime-color-scheme files aren't supported, which means you can't use most modern Sublime themes directly. Encoding support stops at UTF-8 and UTF-16; anything else requires a manual iconv step with no built-in fallback.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →