ast-grep

ast-grep

ast-grep

⚡A CLI tool for code structural search, lint and rewriting. Written in Rust

AI 简介

ast-grep 是一款基于抽象语法树(AST)的命令行代码结构化搜索、检查与重写工具。它支持以类代码语法编写匹配模式,通过 Tree-sitter 解析实现精准的语义级搜索与安全重构,内置 lint 规则定义和自动化 codemod 功能,采用 Rust 编写,兼顾性能与跨语言支持(如 TypeScript、JavaScript、Python 等)。适用于代码审查、大规模重构、规范治理及静态分析流水线集成等工程场景。

Rust
MIT License 最后更新 2026年11月24日活跃
16.7k
Stars
509
Forks
41
Watchers
37
Issues

Star 增长

今日+15
近 7 天+76
近 30 天+352
综合评分43.12
默认分支main