batcat reads your files with syntax highlighting, Git markers and paging built in. Run one command, view any file in color, keep every habit you already have with cat.
Everything cat gives you, with color, context and comfort on top. No config needed to start.
batcat colors more than 150 languages out of the box. Rust, Python, JavaScript, YAML and Markdown all read clearly, so you spot structure at a glance instead of squinting at plain text.
Change markers sit right in the gutter. Added, modified and removed lines show up as you view a file, so a quick look tells you what moved since your last commit.
Long files page through less automatically. You get scrolling and search without piping anything, and you can still use batcat as a pager for other tools when you want.
Pipe batcat into a script and it behaves like plain cat. No colors, no decorations, just clean output. Alias cat to batcat and every old habit keeps working.
Two dozen themes ship inside batcat, light and dark. Match your prompt, follow your system appearance, or point it at a custom theme you already love.
batcat only reads files, it never edits them. The full source lives on GitHub under MIT or Apache-2.0, reviewed by thousands of developers and free of trackers or ads.
One Homebrew command puts batcat on your Mac. It runs on Intel and Apple Silicon as a native binary, no extra setup.
$ brew install bat
⌘ + Space to open Spotlight.Terminal and press Return.brew install bat above.Return.bat file.txt and view any file in color.No Homebrew yet? Get it at brew.sh, or grab a prebuilt binary straight from GitHub.
Download binarySet batcat up once and it slots into the way you already work in the shell.
Run brew install bat on macOS. The binary lands in your path and
needs zero configuration to start.
Type bat main.py to read a file with highlighting, line numbers and Git
markers all at once.
Add alias cat="bat" to your shell profile. Every command you know
keeps working, now in full color.
The cat command prints a file to your terminal as raw text. batcat prints the same file with color, line numbers and Git context, so you read code the way you write it.
On macOS the command is bat. On Debian and Ubuntu the same tool
installs as batcat because another package already claimed the short name.
Both run the identical program, so a guide that says bat or batcat means this app.
Real feedback from developers who swapped cat for bat and never looked back.
Installed bat on macOS with one Homebrew line and aliased cat to it that same afternoon. Reading config files with color now feels like the terminal finally grew up.
The Git markers are the feature I did not know I needed. A quick bat on a file shows exactly which lines changed before I even open my editor. Brilliant.
I use bat as a pager for other tools now. Piping output through it beats less every time because everything lands with proper syntax highlighting.
Came here confused about running a .bat file and left understanding the difference. Turns out this bat is far more useful than any Windows batch script.
Great cat replacement and the themes are lovely. Took me a minute to remember it installs as batcat on my Ubuntu box, but once I knew that it just worked.
Open source, native on Apple Silicon and zero bloat. batcat is the first thing I install on any new Mac, right after Homebrew itself.
Reading logs went from painful to easy. batcat pages long files on its own and the line numbers make pointing a teammate to a spot trivial.
As a Rust developer I appreciate a tool built in Rust that respects the cat command it clones. Fast, small and it never gets in my way.
Highlighting for 150 plus languages means every file I touch looks right. YAML, Markdown, Dockerfiles, bat handles them all without a single tweak.
The things people search most about bat, the cat command and .bat files, cleared up.
.bat file is a Windows batch script, and
macOS cannot execute it natively. This batcat is a different thing entirely, a cat command
replacement for viewing files with syntax highlighting. If you meant Windows batch files, you
would need a tool like Wine to run those.brew install bat. Homebrew
downloads a native binary for Intel or Apple Silicon and adds it to your path. No Homebrew?
Grab a prebuilt release from GitHub and drop the binary into a folder on your PATH.export PAGER="bat" in your
shell profile, or pipe output straight through with something like command | bat.
You get highlighted, scrollable output for help pages, logs and diffs with no extra flags..bat script will not run on Linux by default,
since it targets the Windows command prompt. You can rewrite the logic as a shell script, or use
Wine for simple cases. The batcat tool on this page is unrelated to batch files.myscript.bat. On macOS or Linux there is no native runner,
so convert the commands into a shell script instead. To view what a .bat file contains, open it
with bat myscript.bat..bat instead of .txt. On Windows, right-click and rename,
or run ren script.txt script.bat. Use bat script.bat to double-check
the contents before you run it.batcat
because another package uses bat, so you run it with batcat file.txt. Many
people add an alias to call it plain bat again.Download batcat free and read every file in color. Native on macOS, open source, no ads and no tracking.