EveryDev.ai
Subscribe
Home
Tools

4,218+ AI tools

  • New
  • Trending
  • Featured
  • Rate tools
  • Compare
  • Arena
Categories
  • Agents3186
  • Coding2210
  • Infrastructure966
  • Projects660
  • Marketing625
  • Research579
  • MCP518
  • Design497
  • Analytics490
  • Testing382
  • Security360
  • Data320
  • Integration242
  • Prompts239
  • Communication225
  • Extensions210
  • Voice191
  • Learning188
  • Commerce167
  • DevOps145
  • Web99
  • Finance34
AI Tools by Topic
  • AI Coding Assistants
  • Agent Frameworks
  • MCP Servers
  • AI Prompt Tools
  • Vibe Coding Tools
  • AI Design Tools
  • AI Database Tools
  • AI Website Builders
  • AI Testing Tools
  • LLM Evaluations
Follow Us
  • X / Twitter
  • LinkedIn
  • Reddit
  • Discord
  • Threads
  • Bluesky
  • Mastodon
  • YouTube
  • GitHub
  • Instagram
Get Started
  • Users
  • Rate Tools
  • About
  • Editorial Standards
  • Corrections & Disclosures
  • Community Guidelines
  • Advertise
  • Contact Us
  • Newsletter
  • Submit a Tool
  • Start a Discussion
  • Write A Blog
  • Share A Build
  • Terms of Service
  • Privacy Policy
Explore with AI
  • ChatGPT
  • Gemini
  • Claude
  • Grok
  • Perplexity
Agent Experience
  • llms.txt
Theme
With AI, Everyone is a Dev. EveryDev.ai © 2026
    1. Home
    2. Tools
    3. ast-grep
    ast-grep icon

    ast-grep

    Code Intelligence

    A fast CLI tool for structural code search, linting, and rewriting based on abstract syntax trees.

    Visit Website

    At a Glance

    Pricing
    Open Source

    MIT-licensed ast-grep CLI tool for code structural search, lint and rewriting.

    Engagement

    Available On

    Windows
    macOS
    Linux
    Web
    API

    Resources

    WebsiteDocsGitHubllms.txt

    Topics

    Code IntelligenceLinters & FormattersCommand Line Assistants

    Alternatives

    gutcheckjevgrepOnboard-CLI
    Developer
    ast-grepEst. 2022

    Listed Oct 2026

    About ast-grep

    ast-grep (sg) is an open-source, MIT-licensed command-line tool written in Rust for searching, linting, and rewriting code by syntax structure rather than text. Patterns are written like ordinary code and matched against tree-sitter-produced syntax trees across many files. It also offers a Node.js binding for programmatic use.

    What It Is

    ast-grep works like a syntax-aware grep/sed. You write a code pattern, using wildcards such as $MATCH to stand for any single AST node, and the tool finds all code with the same syntactical structure. It can then rewrite the matches with a replacement pattern, either from the command line or interactively.

    Search, Lint, and Rewrite Workflow

    A one-line command can locate and modify code, for example rewriting $A && $A() to $A?.() in TypeScript. For linting, rules are defined in YAML configuration and run with ast-grep scan, producing formatted error reports. The project also documents an interactive codemod mode, a language server, and a testing tool for rules.

    Programmatic Usage and Languages

    The @ast-grep/napi package exposes syntax trees through jQuery-like traversal methods, with opt-in type safety. The site lists 20+ supported languages, and custom tree-sitter parsers can be loaded dynamically. A web playground lets users try patterns in the browser.

    Installation and Intended Users

    It can be installed through npm, pip, cargo, cargo-binstall, Homebrew, Scoop, MacPorts, mise, or built from source. The README says it can help library authors ship breaking-change migrations, tech leads enforce coding practices, and security researchers write rules faster.

    ast-grep - 1

    Community Discussions

    Be the first to start a conversation about ast-grep

    Share your experience with ast-grep, ask questions, or help others learn from your insights.

    Pricing

    OPEN SOURCE

    Open Source

    MIT-licensed ast-grep CLI tool for code structural search, lint and rewriting.

    • CLI for structural search, lint, and rewriting
    • Node.js binding (@ast-grep/napi)
    • Interactive codemod, language server and testing tool
    • 20+ supported languages
    • Install via npm, pip, cargo, homebrew, scoop, MacPorts or mise

    Capabilities

    Key Features

    • Structural code search using AST patterns
    • Code rewriting and codemods
    • YAML-based lint rules via ast-grep scan
    • Interactive mode
    • Language server
    • Rule testing tool
    • Node.js binding (@ast-grep/napi)
    • 20+ supported languages
    • Custom tree-sitter language loading
    • Online playground
    • Parallel multi-core processing

    Integrations

    tree-sitter
    npm
    pip
    Cargo
    Homebrew
    Scoop
    MacPorts
    mise
    API Available
    View Docs

    Ratings & Reviews

    No ratings yet

    Be the first to rate ast-grep and help others make informed decisions.

    Rate other tools you’ve used

    Developer

    ast-grep Team

    A lightning fast code search/rewrite tool!

    Founded 2022

    Used by

    SWC
    Shopify Hydrogen
    Modern.js
    CodeRabbit
    +5 more
    Read more about ast-grep Team
    WebsiteGitHub
    1 tool in directory

    Similar Tools

    gutcheck icon

    gutcheck

    A local CLI tool that applies plain-English semantic questions to lines, logs, diffs, and JSON records — like grep, but for meaning — running entirely on your CPU with no API key required.

    jevgrep icon

    jevgrep

    A CLI tool for coding agents that finds relevant code files and source context by asking natural-language questions about what code does, using Jev for AI-powered relevance judgment.

    Onboard-CLI icon

    Onboard-CLI

    A local-first CLI that turns massive distributed systems into dynamic, visual execution maps using AST parsing and an interactive React Flow canvas.

    Browse all tools

    Related Topics

    Code Intelligence

    AI tools that analyze, generate, and transform code through natural language understanding and programming language comprehension.

    112 tools

    Linters & Formatters

    Automated code quality tools that check style, detect errors, and format code consistently across projects.

    13 tools

    Command Line Assistants

    AI-powered command-line assistants that help developers navigate, search, and execute terminal commands with intelligent suggestions and context awareness.

    261 tools
    Browse all topics
    Back to all toolsSuggest an edit
    ratings
    discussions