ast-grep
ast-grep: A strong open-source choice for structural search, codemods, and custom linting. Ranked #9 of 42 in Code Search Tools by our editors (8.4/10); pricing: Open source; best for developers building structural codemods.
At a glance
- Editor score8.4 / 10
- PricingOpen source
- Best forDevelopers building structural codemods
- Paid fromFree
- DeploymentSelf_hosted
- Facts checked20 Sep 2026

Where it wins
- AST patterns support structural search beyond plain-text matching
- Codemods, lint rules, and rewrites cover several code-maintenance workflows
- Works across Windows, macOS, Linux, and three major editors
Where it doesn't
- Self-hosted installation requires local setup and maintenance
- Built-in language support varies by the languages in your codebase
- Structural workflows may be more than needed for simple text search
Our verdict on ast-grep
ast-grep is an open-source command-line tool for developers who need structural code search, linting, rewriting, or codemod work. Instead of matching only plain text, it works with abstract syntax tree patterns and supports regular-expression matching within AST nodes. Its scope covers codebase search, code navigation, code outlines for symbols, imports, and exports, and programmatic AST manipulation through JavaScript and Python APIs. Developers working on Windows, macOS, or Linux can install it locally, with editor integrations for Visual Studio Code, Neovim, and Emacs.
The strongest fit is for teams building repeatable code transformations or custom static-analysis workflows. Code rewriting and interactive codemods support one-off changes as well as larger migrations, while custom YAML lint rules let developers define project-specific checks. The language server adds diagnostic and fix actions, and the online playground provides another way to work with the tool. Multi-language parsing through tree-sitter broadens its use across repositories, although the practical fit depends on whether the relevant languages are among its built-in language support.
ast-grep is distributed as open-source software and installed locally, making it a self-hosted option rather than a paid hosted service with separate tiers. That model suits developers who want direct control over their code-search and rewriting workflow, but it places setup and ongoing maintenance with the user. Choose ast-grep when structural matching, codemods, lint rules, or editor-based fixes are central requirements. For a developer who only needs straightforward text search, its AST-oriented approach may introduce more capability than necessary.
Your product? Our editors can test ast-grep in depth and publish a review, labelled as paid · from $149/mo →
ast-grep pricing
ast-grep fact sheet
| Free plan | Not verified |
|---|---|
| Paid from | Free |
| Indexing scope | Codebase |
| Deployment | Self_hosted |
| Supported languages | Not verified |
| Regex search | Yes |
| Code navigation | Yes |
| IDE extensions | Yes |
| Deployment | Self-hosted |
| Platforms | Windows, macOS, Linux |
| Support | Community, Docs |
| Built for | Solo, Small business, Mid-market, Enterprise (editorial estimate) |
| Integrations | 3 integrations: Visual Studio Code, Neovim, Emacs |
| Pricing | Open source |
| Website | ast-grep.github.io |
| Facts checked | 20 Sep 2026 |
ast-grep integrations
ast-grep lists 3 integrations on its own site.
- Visual Studio Code
- Neovim
- Emacs
Alternatives to ast-grep
- Android Code SearchA free, focused browser for searching and navigating AOSP source.9.3
- LXR Cross ReferencerA focused open-source browser for navigating indexed code across versions and repositories.9.2
- GNU GLOBALA focused, open-source navigator for symbols across C-family codebases.9.0
See all ast-grep alternatives →
Also Ranked In
ast-grep is ranked in 2 of our directories.
Used ast-grep? Be the first to review it
The editor score above is our own research. What this page doesn't have yet is a reader's view — what you used ast-grep for, what worked and what didn't. No stars are seeded and no review is paid for; an editor reads every one before it appears.
Write a reviewTwo minutes · verified accounts only · read by an editor before it appears
Featured on iTechGuides
ast-grep is listed in our Code Search Tools directory. Add the badge to your site — it links back to this page.
<a href="https://www.itechguides.com/products/ast-grep/"><img src="https://www.itechguides.com/best/badge/ast-grep.svg" alt="Featured on iTechGuides" width="230" height="46"></a>
Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026
Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. Bought places stand at the number bought; this page and our disclosure say so. Paying vendors may get a fuller, more detailed review from our editors, and that review can change their score. How we rank.
Last updated · How we research and update

