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

Comby

$ comby Community Low Risk
Rijnard van Tonder (OSS) · Files & Search · Apache-2.0 · macos / linux

comby matches balanced delimiters, strings, and comments across almost any programming language using simple :[var] templates. It outputs diffs or -json-lines read-only by default and writes to disk only with -in-place.

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

Direct comby execution performs fast structural matching locally without needing an MCP wrapper.

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 22 / 25

Provides -json-lines, -match-only, non-interactive execution, and safe read-only diff output by default.

  • Supports -json-lines NDJSON output and -match-only
Trust & Safety 22 / 25

Leaves files unchanged unless -in-place (-i) is explicitly set; zero network requirements.

  • Dry-run diff output is the default behavior
Setup & Portability 11 / 15

Available via brew and Linux packages, though native Windows support is limited.

  • Primarily targets macOS and Linux environments
Utility & Efficiency 13 / 15

Simpler template syntax than Tree-sitter queries for balanced-bracket matching across niche languages.

  • Language-agnostic balanced delimiter and comment/string awareness
Maintenance & Lineage 8 / 10

Well-regarded OSS tool (comby-tools/comby) with slower recent release cadence.

  • Apache-2.0 OSS repository with stable core parser
Docs & Verifiability 9 / 10

Clear syntax reference and interactive examples on comby.dev.

  • Documented template grammar and CLI flags at comby.dev

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None required; operates purely on local source files.

Side Effects
Read-Only Local Write
Cost & Quotas

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

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Comby Agent Rules
- Run `comby` without `-in-place` first to review diffs or `-json-lines -match-only`.
- Always pass explicit file extension filters (e.g., `.go`, `.py`) so Comby uses the right delimiter rules.

Agent-Ready Command Recipes

Safe Read-Only Queries

Match structural calls as JSON lines
comby 'http.Get(:[url])' '' .go -json-lines -match-only

Scans .go files read-only and outputs NDJSON records for every matched expression.

Preview a structural rewrite diff without writing
comby 'fmt.Sprintf(:[args])' 'log.Printf(:[args])' .go

Prints unified diffs to stdout while leaving source files untouched.

Controlled Writes & Previews

Apply structural rewrite in-place after preview
comby 'legacyCall(:[args])' 'modernCall(:[args])' .py -in-place

Commits the structural transformation to .py files only when -in-place is supplied.

Strengths for Agents

  • + Safe by default: previews diffs and supports -json-lines without touching disk.
  • + Works across languages without needing per-language Tree-sitter grammars.

Caveats & Pitfalls

  • ! Less semantically precise than full AST tools like ast-grep for complex syntax constructs.
  • ! Limited native Windows support compared to Rust/Go tools.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI