bat

CLI>=0.20

A cat clone with syntax highlighting and Git integration.

cat with syntax highlighting and line numbers

3 curated recipes · not yet executed by the harness#cat#syntax-highlighting#pager#rust

Recipes

Curated from documentation and usage. Percentages are estimates, not measurements.

View file with syntax highlighting

~99% est.
bat src/main.ts

View file with line numbers

~99% est.
bat -n file.txt

Use bat as pager for git diff

~95% est.
git diff | bat --language diff

Install

Homebrewbrew install bat
Cargocargo install bat

Agent notes

When to use
Viewing source files with readable syntax coloring
Quick examples
  • bat src/main.rs
  • bat --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.

Homepage ↗MIT OR Apache-2.00 views