Free & Open Source — v0.26.1
batcat icon

The cat commandwith wings

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.

$0
Forever free
60.5k
GitHub stars
150+
Languages highlighted
MIT
Apache-2.0 license
What batcat does

A better way to read files in the terminal

Everything cat gives you, with color, context and comfort on top. No config needed to start.

Syntax highlighting

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.

Git integration

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.

Built-in pager

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.

Drop-in cat replacement

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.

Themes for any terminal

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.

Safe and open source

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.

Install bat on macOS

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
GUIDE 01

How to open Terminal on Mac

  1. Press ⌘ + Space to open Spotlight.
  2. Type Terminal and press Return.
  3. A prompt opens, ready for the command below.
GUIDE 02

Install via Terminal command

  1. Copy brew install bat above.
  2. Paste it into Terminal, then press Return.
  3. Run 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 binary
Three steps

From install to daily driver

Set batcat up once and it slots into the way you already work in the shell.

01

Install once

Run brew install bat on macOS. The binary lands in your path and needs zero configuration to start.

02

View any file

Type bat main.py to read a file with highlighting, line numbers and Git markers all at once.

03

Make it your cat

Add alias cat="bat" to your shell profile. Every command you know keeps working, now in full color.

batcat vs the plain cat command

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.

$ cat app.rsplain
fn main() { let name = "world"; println!("hello {name}"); }
$ bat app.rswith wings
1 │ fn main() { 2 │ let name = "world"; 3 │ println!("hello {name}"); 4 │ }
One name, two spellings.

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.

Loved by developers

What people say about batcat

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.

Marcus O.
★★★★★

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.

Sophie R.
★★★★★

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.

Daniel K.
★★★★★

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.

Aisha L.
★★★★☆

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.

Ben F.
★★★★★

Open source, native on Apple Silicon and zero bloat. batcat is the first thing I install on any new Mac, right after Homebrew itself.

Claire W.
★★★★★

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.

James M.
★★★★★

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.

Priya N.
★★★★★

Highlighting for 150 plus languages means every file I touch looks right. YAML, Markdown, Dockerfiles, bat handles them all without a single tweak.

Tomas V.
Questions answered

batcat FAQ

The things people search most about bat, the cat command and .bat files, cleared up.

Can I run .bat files on a Mac?
Not directly. A .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.
How do I install bat on macOS?
Open Terminal and run 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.
What is the cat command used for in the macOS terminal?
The cat command prints the contents of one or more files to your terminal. Developers use it to read files quickly or join them together. batcat does the same job and adds color, line numbers and Git markers, so it reads much better for source code.
How can I use bat as a pager?
Point other tools at it. Set 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.
Can I run .bat files in Linux?
A Windows .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.
How do I run a .bat file in the terminal?
On Windows you run a batch file by typing its name in Command Prompt, for example 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.
How do I turn a .txt file into a .bat file?
Write your commands in the text file, then rename it so the extension reads .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.
What is bat in Linux?
bat in Linux is the same cat clone with syntax highlighting and Git integration. On Debian and Ubuntu the binary installs under the name 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.

Give your cat command some wings

Download batcat free and read every file in color. Native on macOS, open source, no ads and no tracking.

v0.26.1 · macOS Intel & Apple Silicon · MIT / Apache-2.0 · ★ 4.8 from 312 ratings