Skip to content
简体中文

切换主题

// 读懂代码库

ast-grep0.50.0

基于语法树的代码搜索与重写

开源 维护中 给 AI 用

一段话结论

ast-grep 是基于语法树的代码搜索与重写。

适合:想让自己的 agent(Claude Code、Codex、Cursor 等)读懂代码库的开发者。

要点:结构化代码搜索/改写

01怎么开始

  1. 1先读官方 README / 文档,确认运行环境和需要的权限。
  2. 2从官方包管理器安装: npm install @ast-grep/clipip install ast-grep-cli
  3. 3把它加到 agent 的 MCP 配置里——Claude Code:claude mcp add;Cursor:.cursor/mcp.json;Codex:~/.codex/config.toml。

crates.io: ast-grepnpm: @ast-grep/cliPyPI: ast-grep-cli

02替代品与对比

并排对比 →

03相关

版本历史 · 收录依据 · 给 AI 读

最近版本

给 AI 读

数据更新于:AI 软件库与热度 · 软件档案 / 需求(北京时间)