ast-grep is an excellent free tool — fast structural search and rewrite, driven by patterns you write yourself. act101 does a different job: it gives your AI agent typed refactor operations to execute, then gates every change with a deterministic verdict and a receipt. Here's the honest comparison.
Free, open-source structural search and rewrite. You write a pattern that looks like the code you want to match; ast-grep finds it — or rewrites it — across a broad set of mainstream languages, with a YAML rule system for lint and CI. It is fast, precise, and human-driven: the human writes the pattern, reviews the diff, and owns the result.
One native binary your agent calls through MCP (or you call as a CLI): 183 typed
refactor operations with cross-file consistency across 163 grammars, 42 codebase
analyzers, automatic checkpoints with instant undo — and act gate, which
classifies every change and returns a deterministic MERGE / REVIEW / BLOCK verdict
with a signed receipt.
| Capability | ast-grep | act101 |
|---|---|---|
| Structural (AST-aware) code search | ✓ | ✓ |
| Pattern-based rewrite | ✓ | ✓ |
| Free tier | ✓ (all of it) | ✓ (Builder) |
| Typed refactor operations (extract, inline, move, rename) with cross-file reference updates | — | ✓ 183 ops |
| Automatic checkpoints + instant undo | — | ✓ |
| Merge gate: deterministic MERGE / REVIEW / BLOCK verdict + receipt | — | ✓ |
| Built for AI agents (native MCP server) | — | ✓ |
| Codebase analyzers (coupling, cycles, dead code, hotspots) | — | ✓ 41 |
| Cross-language porting workflow with parity verification | — | ✓ |
Capability rows reflect each tool's documented, shipped surface. If we've got something wrong about ast-grep, tell us: support@act101.ai.
You're a human writing one-off structural searches, codemods, or lint rules by hand, and you review every diff yourself. It's free, fast, and the pattern syntax is a pleasure. act101 is overkill for that job.
An AI agent is making the changes and you need to trust the result: typed operations instead of freehand rewrites, an undo for every change, and a gate that classifies each diff before it merges — with a receipt you can keep.
Not exactly — the overlap is structural search, but the jobs differ. ast-grep is a human-driven pattern tool: you write a pattern, it finds or rewrites matches, and it does that very well. act101 is an execution and verification layer for AI agents. If all you need is grep-like structural search, ast-grep is excellent and free.
No. Builder Edition is free forever and competes head-to-head with ast-grep at $0 — agent-native queries, rename, and fix-auto across 138 grammars, through MCP and the CLI. The $29 Engineering Edition is the commercial tier: the full mutation toolkit, refactor verification with receipts, and a commercial license. See pricing.
Yes. They don't conflict: ast-grep for hand-written pattern search and lint rules, act101 for the changes your agent executes and the gate in front of the merge.
The homepage shows a real act gate session — a refactor clearing to MERGE, a behavior change routed to REVIEW.