A cat(1) clone with syntax highlighting and Git integration. Key Features • How To Use • Installation • Customization • Project goals, alternatives [English] [中文] [日本語] [한국어] [Русский] Sponsors A special thank you goes to our biggest sponsors: Warp, the intelligent terminal Available on MacOS, Linux, Windows Graphite is the AI developer productivity platform helping teams on GitHub ship higher quality software, faster 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. How to use Display a single file on the terminal bat README.md Display multiple files at once bat src/ * .rs Read from stdin, determine the syntax automatically (note, highlighting will only work if the syntax can be determined from the first line of the file, usually through a shebang such as #!/bin/sh ) curl -s https://sh.rustup.rs | bat Read from stdin, specify the language explicitly yaml2json .travis.yml | json_pp | bat -l json Show and highlight non-printable charac...
First seen: 2025-10-07 20:11
Last seen: 2025-10-08 00:11