Skip to content

ast-grep

Repository: ast-grep/ast-grepDescription: A CLI tool for code structural search, lint, and rewrite based on Abstract Syntax Tree (AST). Key Features:

  • Structural Search: Search code patterns using a concise syntax instead of regex.
  • Built-in Linter: Create custom linting rules with simple YAML files.
  • Safe Rewriting: Perform large-scale code refactoring with AST-level precision.
  • Multi-language Support: Supports JavaScript, TypeScript, Python, Rust, Go, and more. Primary Use Cases: Refactoring, custom linting, code exploration. Tags: #developer-tools #ast #refactoring #linting Added: 2026-06-18 Source: GitHub

Notes / Why Notable

ast-grep provides a much more robust alternative to grep or sed for code manipulation because it understands the structure of the code, making it less prone to errors caused by formatting differences or complex nested structures.

Maintained with Yeda — Karpathy LLM Wiki paradigm.