# bat

> cat clone with syntax highlighting and Git integration

**Wikidata**: [Q102403709](https://www.wikidata.org/wiki/Q102403709)  
**Source**: https://4ort.xyz/entity/bat

## Summary
Bat is a free, open-source command-line tool that enhances the Unix `cat` command with syntax highlighting and Git integration. It is designed to improve code readability by displaying files with proper syntax coloring and supports features like line numbers, Git diffs, and pagination. Bat is available for Linux and macOS under the Apache 2.0 and MIT licenses.

## Key Facts
- **Instance of**: Console application, free software.
- **Operating systems**: Linux (inception: 1991-09-17), macOS (inception: 2001-03-24).
- **Licenses**: Apache Software License 2.0, MIT License (as of 2020-11-27).
- **First version**: 0.1.0 (released: 2018-04-22).
- **Latest version**: 0.6.0 (released: 2018-08-28).
- **Source code repository**: [GitHub](https://github.com/sharkdp/bat).
- **Package names**: bat (Ubuntu, Arch Linux, Alpine Linux), rust-bat (Fedora), sys-apps/bat (Gentoo).
- **Programming language**: Rust (as of 2025-07-06).
- **Copyright status**: Copyrighted.

## FAQs
### Q: What problem does bat solve?
A: Bat improves code readability by adding syntax highlighting and Git integration to the standard `cat` command, making it easier to view and navigate files in the terminal.

### Q: Is bat free to use?
A: Yes, bat is free software distributed under the Apache 2.0 and MIT licenses, allowing users to run, study, modify, and distribute it freely.

### Q: Which operating systems does bat support?
A: Bat is available for Linux and macOS.

### Q: How does bat differ from the standard `cat` command?
A: Unlike `cat`, bat provides syntax highlighting, Git integration, line numbers, and pagination, enhancing the readability and functionality of file viewing in the terminal.

### Q: Where can I download bat?
A: Bat can be downloaded from its [GitHub repository](https://github.com/sharkdp/bat) or installed via package managers like Homebrew, apt (Ubuntu), or dnf (Fedora).

## Why It Matters
Bat addresses a common pain point in terminal workflows by combining the simplicity of the `cat` command with modern features like syntax highlighting and Git integration. This makes it particularly useful for developers who frequently work with code in the terminal. By improving readability and adding context (such as Git diffs), bat enhances productivity and reduces errors when reviewing or editing files. Its open-source nature ensures transparency and community-driven development, making it a valuable tool in the developer ecosystem.

## Notable For
- **Syntax highlighting**: Bat supports syntax highlighting for numerous programming languages, making code more readable.
- **Git integration**: It displays Git modifications (additions, deletions) alongside the file content, providing context for version control.
- **Cross-platform support**: Bat is available for both Linux and macOS, ensuring broad compatibility.
- **Active development**: Regular updates (latest version: 0.6.0, released 2018-08-28) indicate ongoing maintenance and improvement.
- **Package availability**: Bat is packaged for major distributions (Ubuntu, Fedora, Arch Linux, etc.), simplifying installation.

## Body
### Overview
Bat is a command-line utility that extends the functionality of the Unix `cat` command. It is designed to improve the readability of files, particularly source code, by adding syntax highlighting and Git integration. The project was created by [sharkdp](https://github.com/sharkdp) and is hosted on GitHub.

### Features
- **Syntax highlighting**: Bat automatically detects and applies syntax highlighting for supported languages.
- **Git integration**: It shows Git modifications (additions, deletions) alongside the file content, providing context for version control.
- **Line numbers**: Bat can display line numbers for easier navigation.
- **Pagination**: It supports pagination for long files, similar to `less` or `more`.
- **Customization**: Users can configure themes, language mappings, and other settings via a configuration file.

### Technical Details
- **Programming language**: Rust (as of 2025-07-06).
- **Licenses**: Apache 2.0 and MIT (as of 2020-11-27).
- **Package names**: bat (Ubuntu, Arch Linux, Alpine Linux), rust-bat (Fedora), sys-apps/bat (Gentoo).
- **Operating systems**: Linux (inception: 1991-09-17), macOS (inception: 2001-03-24).

### Release History
Bat has seen multiple releases since its initial version:
- **0.1.0**: Released on 2018-04-22.
- **0.2.0**: Released on 2018-04-30.
- **0.2.1**: Released on 2018-05-01.
- **0.2.2**: Released on 2018-05-02.
- **0.2.3**: Released on 2018-05-03.
- **0.3.0**: Released on 2018-05-08.
- **0.4.0**: Released on 2018-05-31.
- **0.4.1**: Released on 2018-05-31.
- **0.5.0**: Released on 2018-08-19.
- **0.6.0**: Released on 2018-08-28.

### Availability
Bat is available for installation via:
- **Package managers**: Homebrew, apt (Ubuntu), dnf (Fedora), pacman (Arch Linux), and others.
- **Source code**: [GitHub repository](https://github.com/sharkdp/bat).

Bat’s combination of features and open-source licensing makes it a valuable tool for developers and terminal users.

## References

1. [crates.io](https://crates.io/crates/bat)
2. [2025](https://github.com/EvanLi/Github-Ranking/blob/master/Data/github-ranking-2025-07-06.csv)
3. [Release 0.1.0. 2018](https://github.com/sharkdp/bat/releases/tag/v0.1.0)
4. [Release 0.2.0. 2018](https://github.com/sharkdp/bat/releases/tag/v0.2.0)
5. [Release 0.2.1. 2018](https://github.com/sharkdp/bat/releases/tag/v0.2.1)
6. [Release 0.2.2. 2018](https://github.com/sharkdp/bat/releases/tag/v0.2.2)
7. [Release 0.2.3. 2018](https://github.com/sharkdp/bat/releases/tag/v0.2.3)
8. [Release 0.3.0. 2018](https://github.com/sharkdp/bat/releases/tag/v0.3.0)
9. [Release 0.4.0. 2018](https://github.com/sharkdp/bat/releases/tag/v0.4.0)
10. [Release 0.4.1. 2018](https://github.com/sharkdp/bat/releases/tag/v0.4.1)
11. [Release 0.5.0. 2018](https://github.com/sharkdp/bat/releases/tag/v0.5.0)
12. [Release 0.6.0. 2018](https://github.com/sharkdp/bat/releases/tag/v0.6.0)
13. [Release 0.6.1. 2018](https://github.com/sharkdp/bat/releases/tag/v0.6.1)
14. [Release 0.7.0. 2018](https://github.com/sharkdp/bat/releases/tag/v0.7.0)
15. [Release 0.7.1. 2018](https://github.com/sharkdp/bat/releases/tag/v0.7.1)
16. [Release 0.8.0. 2018](https://github.com/sharkdp/bat/releases/tag/v0.8.0)
17. [Release 0.9.0. 2018](https://github.com/sharkdp/bat/releases/tag/v0.9.0)
18. [Release 0.10.0. 2019](https://github.com/sharkdp/bat/releases/tag/v0.10.0)
19. [Release 0.11.0. 2019](https://github.com/sharkdp/bat/releases/tag/v0.11.0)
20. [Release 0.12.0. 2019](https://github.com/sharkdp/bat/releases/tag/v0.12.0)
21. [Release 0.12.1. 2019](https://github.com/sharkdp/bat/releases/tag/v0.12.1)
22. [Release 0.13.0. 2020](https://github.com/sharkdp/bat/releases/tag/v0.13.0)
23. [Release 0.14.0. 2020](https://github.com/sharkdp/bat/releases/tag/v0.14.0)
24. [Release 0.15.0. 2020](https://github.com/sharkdp/bat/releases/tag/v0.15.0)
25. [Release 0.15.1. 2020](https://github.com/sharkdp/bat/releases/tag/v0.15.1)
26. [Release 0.15.2. 2020](https://github.com/sharkdp/bat/releases/tag/v0.15.2)
27. [Release 0.15.3. 2020](https://github.com/sharkdp/bat/releases/tag/v0.15.3)
28. [Release 0.15.4. 2020](https://github.com/sharkdp/bat/releases/tag/v0.15.4)
29. [Release 0.16.0. 2020](https://github.com/sharkdp/bat/releases/tag/v0.16.0)
30. [Release 0.17.0. 2020](https://github.com/sharkdp/bat/releases/tag/v0.17.0)
31. [Release 0.17.1. 2020](https://github.com/sharkdp/bat/releases/tag/v0.17.1)
32. [Release v0.18.0](https://github.com/sharkdp/bat/releases/tag/v0.18.0)
33. [Release v0.18.1](https://github.com/sharkdp/bat/releases/tag/v0.18.1)
34. [Release v0.18.3](https://github.com/sharkdp/bat/releases/tag/v0.18.3)
35. [Release v0.19.0](https://github.com/sharkdp/bat/releases/tag/v0.19.0)
36. [Release v0.20.0](https://github.com/sharkdp/bat/releases/tag/v0.20.0)
37. [Release v0.21.0](https://github.com/sharkdp/bat/releases/tag/v0.21.0)
38. [Release v0.22.0](https://github.com/sharkdp/bat/releases/tag/v0.22.0)
39. [Release v0.22.1](https://github.com/sharkdp/bat/releases/tag/v0.22.1)
40. [Release 0.18.2. 2021](https://github.com/sharkdp/bat/releases/tag/v0.18.2)
41. [Release 0.23.0. 2023](https://github.com/sharkdp/bat/releases/tag/v0.23.0)
42. [Release 0.24.0. 2023](https://github.com/sharkdp/bat/releases/tag/v0.24.0)
43. [Release v0.25.0 · sharkdp/bat](https://github.com/sharkdp/bat/releases/tag/v0.25.0)
44. [Release v0.26.0 · sharkdp/bat](https://github.com/sharkdp/bat/releases/tag/v0.26.0)
45. [Release v0.26.1 · sharkdp/bat](https://github.com/sharkdp/bat/releases/tag/v0.26.1)
46. [Source](https://github.com/sharkdp/bat)