Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

bat

$ bat Community Low Risk
sharkdp (OSS) · Files & Search · MIT / Apache-2.0 · macos / linux / windows

bat reads local files with line numbers, git-diff markers, and syntax highlighting. When piped (or given --paging=never --style=plain), it streams clean text without invoking a pager, while -r START:END lets agents inspect bounded line slices.

FCRS-1.0 Score
89 /100
Good
Medium Confidence
Zero-Friction Install
brew install bat
CLI vs MCP Decision CLI Preferred vs MCP

Local file slicing with bat -r or sed/head has zero RPC overhead; no MCP server is needed.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
✓ Read-Only Mode
✓ NO_COLOR Clean
— Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 20 / 25

Auto-degrades to plain output on non-TTY pipes and supports --paging=never, --color=never, and -r line ranges, though no --json.

  • Supports --paging=never, --color=never, and --style=plain
Trust & Safety 25 / 25

Strictly read-only local file viewer with zero network or write side effects.

  • Pure read-only file inspection
Setup & Portability 15 / 15

Single Rust binary distributed across brew, cargo, apt (batcat), and Windows.

  • Cross-platform static binary
Utility & Efficiency 12 / 15

Convenient -r range slicing and line numbers, though plain sed -n or nl is leaner for agents.

  • -r START:END avoids reading entire large files
Maintenance & Lineage 9 / 10

Maintained under sharkdp/bat with rock-solid stability.

  • Widely adopted OSS project under MIT / Apache-2.0
Docs & Verifiability 8 / 10

Clear README, man page, and --help.

  • Well-documented CLI flags and style options

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None required; reads local files only.

Side Effects
Read-Only
Cost & Quotas

100% free, offline, and open-source (MIT / Apache-2.0).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# bat Agent Rules
- Always pass `--paging=never --color=never` (and `-r START:END` on large files) to prevent pager hangs or ANSI noise.
- Use `--style=plain` or `--style=numbers` to avoid decorative box-drawing tokens.

Agent-Ready Command Recipes

Safe Read-Only Queries

Read a bounded line range without pager or ANSI codes
bat --paging=never --style=numbers --color=never -r 1:120 src/index.ts

Prints lines 1–120 with plain line numbers and zero interactive pager risk.

Strengths for Agents

  • + Strictly read-only with bounded -r line-range slicing and automatic non-TTY plain fallback.
  • + Cross-platform Rust binary available on virtually every dev machine.

Caveats & Pitfalls

  • ! Default grid/header decorations waste tokens unless --style=plain or --style=numbers is passed.
  • ! Installed as batcat on Debian/Ubuntu.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI