
bat
Browse and print file contents with bat, a command-line cat alternative documented in this repository.

About bat
bat is a command-line tool for displaying file contents, described as a cat(1) clone with syntax highlighting and Git integration. It highlights syntax for programming and markup languages, shows Git modifications relative to the index, can display line numbers, and can show non-printable characters with -A/--show-all. By default it sends long output to a pager such as less, but prints plain file contents when piped to another process or file. Highlighting from stdin depends on detection from the first line or an explicit language flag, and line numbers and Git markers can interfere with copying unless plain mode or piping is used.
Key features
- Syntax highlighting for programming and markup languages
- Shows Git modifications relative to index in sidebar
- Displays non-printable characters with -A/--show-all
- Automatic paging of long output via pager like less
- Concatenates files and acts as cat when piped
- Reads from stdin with automatic or explicit language selection
- Functions as cat replacement when output is piped or redirected
- Paging is configurable, including --paging=never to match cat
- Combines with tools such as fzf, find, fd, ripgrep, tail and git
- Stdin highlighting requires detectable syntax or explicit -l flag
- Line numbers and Git markers can interfere with copying without plain mode
- Paging must be disabled for use with tail -f
bat at a glance
- Website
- github.com/sharkdp/bat
- Category
- Software & Utilities › File Utilities
- Type
- Open-source project
- Pricing
- Not confirmed. Check the site
- Open source
- Yes · Source code
- Language
- English
- Last checked
- Oct 5, 2026 · Online when checked
- Listed
- Oct 5, 2026
Guides for File Utilities

bat alternatives
Tools and sites you could use instead, ranked by how closely they match.
fd provides a simple alternative to the find command, according to its project description.
F2 batch-renames files and directories through a cross-platform command-line tool written in Go.
mat2 removes metadata from commonly used file formats and is written in Python, according to its repository description.
Blazing fast terminal file manager written in Rust, based on async I/O.
SCP, SFTP, FTP, S3, SMB, and WebDAV transfers are supported by termscp, a terminal file utility.
fselect finds files using SQL-like queries, according to its project description.
Popular in File Utilities
Well-known listings from the same topic.
bat FAQ
How can I make bat behave like cat without paging?
How do I show non-printable characters?
How do I copy file contents without line numbers and markers?
Tell us and an editor will check it.
Claim the listing and suggest updates yourself. An editor checks every claim first.












