bat
CLI>=0.20A cat clone with syntax highlighting and Git integration.
cat with syntax highlighting and line numbers
Recipes
Curated from documentation and usage. Percentages are estimates, not measurements.
View file with syntax highlighting
bat src/main.tsView file with line numbers
bat -n file.txtUse bat as pager for git diff
git diff | bat --language diffInstall
Homebrew
brew install batCargo
cargo install batAgent notes
- When to use
- Viewing source files with readable syntax coloring
- Quick examples
bat src/main.rsbat --language json data.json
Use from an agent
curl -s https://clihub.com/api/tools/bat | jq '.agentHints.provenRecipes[] | {task, command, verified}'Or call get_tool with slug bat on the MCP server at https://clihub.com/mcp.