Bat icon
Bat icon

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.

Bat screenshot 1

Cost / License

  • Free
  • Open Source

Platforms

  • Mac
  • Windows
  • Linux
  • BSD
  • FreeBSD
  • MacPorts
  • Homebrew
  • Chocolatey
  • OpenBSD
-
No reviews
16likes
2comments

Features

Suggest and vote on features
  1.  Syntax Highlighting
  2.  Command line interface
  3.  File pager
  4.  Terminal-based
  5. Git icon  Git integration
  6.  Merge Files

 Tags

  • paging
  • concatenative
  • show-non-printable-characters
  • pager
  • command-line-tool

Bat News & Activities

Highlights All activities

Recent News

Show more news

Recent activities

  • kramermillay, niksavc, PredatorQ and POX liked Bat
  • POX updated Bat
  • RKitSeal liked Bat
  • NuncioBitis reviewed Bat  

    This is really cool - a replacement for cat and less! And with highlighting! Awesome!

  • NuncioBitis replied to a comment / review on Bat
  • NuncioBitis liked Bat
Show all activities

Bat information

  • Developed by

    DE flagDavid Peter
  • Licensing

    Open Source (Apache-2.0) and Free product.
  • Written in

  • Alternatives

    4 alternatives listed
  • Supported Languages

    • English

AlternativeTo Categories

File ManagementOS & Utilities

GitHub repository

  •  56,214 Stars
  •  1,425 Forks
  •  329 Open Issues
  •   Updated  
View on GitHub

Popular alternatives

View all

Our users have written 2 comments and reviews about Bat, and it has gotten 16 likes

Bat was added to AlternativeTo by C.A. on and this page was last updated .

Comments and Reviews

   
 Post comment/review
Top Positive Comment
78540
1

It is portable, fully featured and easy to install on any platform as long as you have Cargo installed.

Nuncio Bitis

For Windows you don't even need that!

Nuncio Bitis
0

This is really cool - a replacement for cat and less! And with highlighting! Awesome!

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.

List by Basic Pixel with 41 apps, updated

A list with 31 apps by mr_roose without a description.

List by roose with 31 apps, updated

A list with 20 apps by kaekazeh without a description.

List by kaekazeh with 20 apps, updated

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.

Official Links