Comby
$ comby Community Low Riskcomby 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.
brew install comby Direct comby execution performs fast structural matching locally without needing an MCP wrapper.
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
Provides -json-lines, -match-only, non-interactive execution, and safe read-only diff output by default.
- Supports
-json-linesNDJSON output and-match-only
Leaves files unchanged unless -in-place (-i) is explicitly set; zero network requirements.
- Dry-run diff output is the default behavior
Available via brew and Linux packages, though native Windows support is limited.
- Primarily targets macOS and Linux environments
Simpler template syntax than Tree-sitter queries for balanced-bracket matching across niche languages.
- Language-agnostic balanced delimiter and comment/string awareness
Well-regarded OSS tool (comby-tools/comby) with slower recent release cadence.
- Apache-2.0 OSS repository with stable core parser
Clear syntax reference and interactive examples on comby.dev.
- Documented template grammar and CLI flags at comby.dev
Security, Auth & Guardrails
None required; operates purely on local source files.
100% free, offline, and open-source (Apache-2.0).
# 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
comby 'http.Get(:[url])' '' .go -json-lines -match-only
Scans .go files read-only and outputs NDJSON records for every matched expression.
comby 'fmt.Sprintf(:[args])' 'log.Printf(:[args])' .go
Prints unified diffs to stdout while leaving source files untouched.
Controlled Writes & Previews
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-lineswithout touching disk. - + Works across languages without needing per-language Tree-sitter grammars.
Caveats & Pitfalls
- ! Less semantically precise than full AST tools like
ast-grepfor complex syntax constructs. - ! Limited native Windows support compared to Rust/Go tools.