// Understand codebases
ast-grep0.50.0
⚡A CLI tool for code structural search, lint and rewriting. Written in Rust
Open source Maintained For agents
IN ONE PARAGRAPH
ast-grep is ⚡A CLI tool for code structural search, lint and rewriting. Written in Rust.
Good for: Developers who want their agent (Claude Code, Codex, Cursor…) to understand codebases.
01How to start
- 1Read the official README for requirements and permissions.
- 2Install it from the official package registry:
npm install @ast-grep/clipip install ast-grep-cli - 3Add it to your agent’s MCP config — Claude Code:
claude mcp add; Cursor:.cursor/mcp.json; Codex:~/.codex/config.toml.
02Alternatives & comparison
Compare side by side →03Related
- ›Hugging Face AI Agents Course · Hugging FaceMultilingual (incl. EN/ZH)
- ›huggingface/agents-course · Hugging FaceEnglish
- ›AI Agents for Beginners · MicrosoftMultilingual (incl. EN/ZH)
- ›Building effective agents · AnthropicEnglish
- ›OpenAI: A practical guide to building agents · OpenAIEnglish
- All tutorials →