icdiff
$ icdiff Community Low Riskicdiff compares two files or directory trees (-r) side-by-side in the terminal with line numbers and intra-line color highlights. While deterministic and non-interactive, wide side-by-side columns and ANSI sequences make plain diff -u or difft --display json better suited for LLM context.
brew install icdiff Local side-by-side file comparison belongs directly in shell commands (icdiff) or git difftool.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Exits non-interactively with clean status, yet produces wide side-by-side ANSI columns with no --json or built-in --no-color toggle.
- Non-interactive execution with
--colsoverride - Side-by-side ANSI formatting is noisy for LLM parsing
Strictly read-only local comparison script with zero network or write actions.
- Read-only file and directory diffing
Single-file Python script installable via brew, pip, uvx, and distro packages on macOS, Linux, and Windows.
- Pure Python stdlib script with zero external dependencies
Convenient human side-by-side git difftool alternative, though less token-efficient for agents than unified diffs.
- Supports recursive
-rdirectory diffs and--exclude-lines
Long-running community Python utility (jeffkaufman/icdiff) under PSF-2.0 with occasional maintenance releases.
- Mature open-source repo with stable CLI
Clear README and --help covering color maps, --cols, and git-icdiff integration.
- Concise README and built-in
--help
Security, Auth & Guardrails
None required; operates purely on local files and directories.
100% free, offline, and open-source (PSF-2.0).
# icdiff Agent Rules - Always pass `--cols=<width>` (e.g., `--cols=120`) in non-TTY shells where terminal width detection falls back to 80 columns. - Prefer `git diff` or `difft --display json` when agents parse diffs, reserving `icdiff` for human side-by-side review.
Agent-Ready Command Recipes
Safe Read-Only Queries
icdiff --line-numbers --cols=120 a.py b.py
Forces fixed --cols=120 width so non-TTY invocations do not fail terminal width auto-detection.
icdiff -r --cols=120 dir_old dir_new
Compares matching files across dir_old and dir_new read-only.
Strengths for Agents
- + Zero-dependency Python script easy to run via
breworuvx. - + Strictly read-only with recursive
-rdirectory diffing.
Caveats & Pitfalls
- ! Side-by-side column alignment and ANSI color codes waste tokens and hinder machine parsing.
- ! Requires
--colsin headless shells to avoid narrow 80-column wrapping.