ast-grep

⚡A CLI tool for code structural search, lint and rewriting. Written in Rust (by ast-grep)

Ast-grep Alternatives

Similar projects and alternatives to ast-grep

  1. Svelte

    733 ast-grep VS Svelte

    web development for the rest of us

  2. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  3. excalidraw

    476 ast-grep VS excalidraw

    Virtual whiteboard for sketching hand-drawn like diagrams

  4. ripgrep

    ripgrep recursively searches directories for a regex pattern while respecting your gitignore

  5. core

    387 ast-grep VS core

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web. (by vuejs)

  6. carbon

    384 ast-grep VS carbon

    :black_heart: Create and share beautiful images of your source code

  7. telescope.nvim

    Find, Filter, Preview, Pick. All lua, all the time.

  8. styled-components

    Fast, expressive styling for React. Server components, client components, streaming SSR, React Native—one API.

  9. yew

    214 ast-grep VS yew

    Rust / Wasm framework for creating reliable and efficient web applications

  10. consult

    94 ast-grep VS consult

    :mag: consult.el - Search and navigate via completing-read

  11. difftastic

    a structural diff that understands syntax 🟥🟩

  12. gron

    73 ast-grep VS gron

    Make JSON greppable!

  13. rewrite

    41 ast-grep VS rewrite

    Automated mass refactoring of source code.

  14. sd

    41 ast-grep VS sd

    Intuitive find & replace CLI (sed alternative)

  15. gritql

    11 ast-grep VS gritql

    GritQL is a query language for searching, linting, and modifying code.

  16. fastmod

    9 ast-grep VS fastmod

    A fast partial replacement for the codemod tool. Assists with large-scale codebase refactors via regex-based find and replace with human oversight and occasional intervention.

  17. LibCST

    13 ast-grep VS LibCST

    A concrete syntax tree parser and serializer library for Python that preserves many aspects of Python's abstract syntax tree

  18. semgrep

    109 ast-grep VS semgrep

    Lightweight static analysis for many languages. Find bug variants with patterns that look like source code.

  19. srgn

    8 ast-grep VS srgn

    A grep-like tool which understands source code syntax and allows for manipulation in addition to search

  20. ssr.nvim

    Treesitter based structural search and replace plugin for Neovim.

  21. comby

    3 ast-grep VS comby

    A code rewrite tool for structural search and replace that supports ~every language.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better ast-grep alternative or higher similarity.

ast-grep discussion

Log in or Post with

ast-grep reviews and mentions

Posts with mentions or reviews of ast-grep. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2026-05-07.
  • The Self-Driving Codebase: Full Agent Automation with Otter
    3 projects | dev.to | 7 May 2026
    The previous post covered how we structured the codebase: Effect conventions, ast-grep enforcement, Drift, and CLAUDE.md to collaborate with Claude Code. You describe what you want, review the output, iterate. That works well. This post is about what happens when you step away entirely: giving the agent a list of issues and letting it work through them while you do something else. In autonomous mode, there's no mid-session correction. Anything the enforcement layer doesn't catch compounds across commits which is why clean issue tracking, issue review and end-of-session QA matter more, not less.
  • How we use Effect and ast-grep to make our codebase work better with agents
    3 projects | dev.to | 27 Apr 2026
    We use ast-grep as a structural syntax scanner that operates on the syntax tree of code (using tree-sitter under the hood). You define patterns in a YAML file, and it matches those patterns against the codebase. Critically, it’s run as part of the CI pipeline and configured to exit with an error when a banned pattern is found. And they have to be errors, not warnings. We learned this the hard way. Warnings get completely ignored. An error blocks progress. The agent reads the message, understands what it should have done, and fixes it. Ast-grep lets the codebase enforce taste and architectural decisions automatically, so the human doesn’t have to constantly correct the agent mid-session.
  • Less human AI agents, please
    3 projects | news.ycombinator.com | 21 Apr 2026
    I linked this elsewhere but, the agent could have a skill to use https://ast-grep.github.io/ to perform such mechanical code changes
  • Be intentional about how AI changes your codebase
    2 projects | news.ycombinator.com | 20 Mar 2026
  • Everything Changes, and Nothing Changes
    2 projects | news.ycombinator.com | 28 Feb 2026
    This is an interesting idea! I searched around and it looks like there's [ast-grep](https://ast-grep.github.io/), an AST-aware CLI that can search and refactor code -- and you can expose it to your AI agent using a skill (https://github.com/ast-grep/agent-skill).

    Not exactly symbolic AI, but pretty cool nonetheless.

  • ast-grep: A CLI tool for code structural search, lint and rewriting
    1 project | news.ycombinator.com | 24 Jan 2026
  • AST-Grep
    1 project | news.ycombinator.com | 10 Sep 2025
  • Using ast-grep with a vue project
    1 project | dev.to | 31 Dec 2024
    The amazing ast-grep tool does not support vue and scss by default but can be configured to do so.
  • Mergiraf: a syntax-aware merge driver for Git
    5 projects | news.ycombinator.com | 9 Nov 2024
    Hi! ast-grep[1] author here. It is a tree-sitter based syntax tool to search tool.

    I wonder how you transition from tree-sitter to other builtin parsers? Tree-sitter gave a unified interface to all languages. Using language native parsers will require significant work for various FFI if I am not wrong.

    [1]: https://ast-grep.github.io/

  • Refactoring Python with Tree-sitter and Jedi
    9 projects | news.ycombinator.com | 27 Sep 2024
    How does this compare to https://github.com/ast-grep/ast-grep
  • A note from our sponsor - SaaSHub
    www.saashub.com | 14 Aug 2026
    SaaSHub helps you find the best software and product alternatives Learn more →

Stats

Basic ast-grep repo stats
57
15,504
9.7
1 day ago

ast-grep/ast-grep is an open source project licensed under MIT License which is an OSI approved license.

The primary programming language of ast-grep is Rust.


Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com