Bat
File viewing and concatenation tool featuring syntax highlighting for numerous languages, Git integration to display code modifications, configurable paging, non-printable character visibility, fast performance, and compatibility with major Unix systems.
Cost / License
- Free
- Open Source
Platforms
- Mac
- Windows
- Linux
- BSD
- FreeBSD
- MacPorts
- Homebrew
- Chocolatey
- OpenBSD
Features
- Syntax Highlighting
- Command line interface
- File pager
- Terminal-based
Git integration
- Merge Files
Tags
- paging
- concatenative
- show-non-printable-characters
- pager
- command-line-tool
Bat News & Activities
Recent News
- Fla published news article about Bat
Bat v0.26.0 adds Windows/ARM64 support, paging improvements, and bug fixesBat version 0.26.0 introduces build support for Windows/ARM64 platforms, significantly broadening i...
Recent activities
Bat information
Featured in Lists
This is a list of my favorite Linux programs (GUI / CLI) that I use daily. Not all of these apps are Linux exclusive.
A list with 31 apps by mr_roose without a description.
A list with 20 apps by kaekazeh without a description.
What is Bat?
A cat(1) clone with syntax highlighting and Git integration.
- Syntax highlighting: bat supports syntax highlighting for a large number of programming and markup languages.
- Git integration: bat communicates with git to show modifications with respect to the index (see left side bar).
- Show non-printable characters: You can use the -A/--show-all option to show and highlight non-printable characters.
Automatic paging
By default, bat pipes its own output to a pager (e.g., less) if the output is too large for one screen. If you would rather bat work like cat all the time (never page output), you can set --paging=never as an option, either on the command line or in your configuration file. If you intend to alias cat to bat in your shell configuration, you can use alias cat='bat --paging=never' to preserve the default behavior.
File concatenation
Even with a pager set, you can still use bat to concatenate files. Whenever bat detects a non-interactive terminal (i.e., when you pipe into another process or into a file), bat will act as a drop-in replacement for cat and fall back to printing the plain file contents, regardless of the --pager option's value.



Comments and Reviews
It is portable, fully featured and easy to install on any platform as long as you have Cargo installed.
For Windows you don't even need that!
This is really cool - a replacement for cat and less! And with highlighting! Awesome!