Navigate:
~$BAT0.2%

bat: cat clone with syntax highlighting

Enhanced cat replacement with syntax highlighting and Git integration for file viewing.

LIVE RANKINGS • 12:18 PM • STEADY
OVERALL
#120
9
DEVELOPER TOOLS
#16
5
30 DAY RANKING TREND
ovr#120
·Devel#16
STARS
57.2K
FORKS
1.5K
7D STARS
+102
7D FORKS
+5
See Repo:
Share:

Learn more about bat

bat is a command-line utility written in Rust that functions as an enhanced version of the Unix cat command. It processes text files and applies syntax highlighting based on file extensions or explicit language specifications, while also integrating with Git to display modification indicators. The tool automatically detects terminal capabilities and can pipe output through pagers like less for large files, falling back to plain text output when used in non-interactive contexts. It supports over 200 programming and markup languages and can be integrated into existing workflows as a drop-in replacement for cat.

bat

1

Git Integration

Displays Git modification markers in the sidebar, showing additions, deletions, and changes relative to the repository index.

2

Automatic Paging

Intelligently switches between paged and plain output based on terminal context, maintaining compatibility with pipes and redirects.

3

Non-printable Characters

Visualizes whitespace, control characters, and other non-printable elements with highlighting and special symbols.



vv0.26.1

Paging improvements for help output and various bug fixes

  • Add paging to '-h' and '--help'
  • Fix hang when using `--list-themes` with an explicit pager
  • Fix negative values of N not being parsed in <N:M> line ranges without `=` flag value separator
  • Fix broken Docker syntax preventing use of custom assets
  • Fix diagnostics attempting to find the version of an executable named builtin when builtin pager is used
vv0.26.0

Windows ARM64 support, paging improvements, and new line range features

  • Add build for windows/ARM64 platform
  • Add paging to `--list-themes`
  • Support negative relative line ranges, e.g. `bat -r:-10` / `bat -r='-10:'`
  • Support context in line ranges, e.g. `bat -r 30::5` / `bat -r 30:40:5`
  • Add built-in 'minus' pager, e.g. `bat --pager=builtin`
vv0.25.0

Terminal title setting, blank line squeezing, and JavaScript syntax improvements

  • Set terminal title to file names when Paging is not Paging::Never
  • `bat --squeeze-blank`/`bat -s` will now squeeze consecutive empty lines
  • `bat --squeeze-limit` to set the maximum number of empty consecutive when using `--squeeze-blank`
  • `PrettyPrinter::squeezeemptylines` to support line squeezing for bat as a library
  • Syntax highlighting for JavaScript files that start with `#!/usr/bin/env bun`


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers