>_

bat

agent-ready non-interactive

A cat(1) clone with wings.

How to install bat

brew install bat

bat use case

View and highlight source code files in the terminal with syntax coloring and Git integration for change indicators.

When to use bat

  • When you need to read code files with syntax highlighting for better readability
  • When you want to see Git index changes alongside file content
  • When you need to identify non-printable or hidden characters in a file

When not to use bat

  • When you need plain, uncolored output for piping to other commands (use `cat` instead)
  • When you need to parse or filter file content programmatically (use `cat` or `head`/`tail` with other tools)

bat features

  • · Syntax highlighting for hundreds of programming and markup languages
  • · Git integration showing added, modified, or deleted lines
  • · Show non-printable characters with `-A` flag
  • · Line numbers, paging, and automatic theme detection

Want your agent to find this automatically?

Add the MCP server to your agent config and it will discover tools like bat on its own.

Set up MCP →

Similar tools to bat