Skip to content
Agents tracked: 440 Downloads (7d): 202M down 19.5% GitHub stars: 10.4M Releases (7d): 607 Agent status: all upSince last limit reset: Claude 28d · Codex 0d Updated Oct 21, 2026

ast-grep

Searches and rewrites code at scale with AST patterns.

Linting and formatting npm MIT

Used in agent projects
8
0.2% of 4,818 JS/TS repos built with AI coding agents
Gid Score
58 /100
#878 of 3,794 tools, #18 in linting and formatting · ranking
In the catalog because
Public numbers
downloads and GitHub stars, added Oct 13, 2026; too rare in our project count to rank by use
Downloads
2.2M
npm, last 7 days, @ast-grep/cli
GitHub stars
16.3K
481 forks · last push Oct 20, 2026

How ast-grep is used

ast-grep joined the catalog on its public numbers (2,224,128 downloads a week on npm and 16,291 GitHub stars), not on our project count: it is a dependency in 13 public GitHub projects of our scan, 8 of them set up for AI coding agents. Projects that use it most often also use Knip (53.8%), Vitest (61.5%), yaml (38.5%).

ast-grep popularity over time

Top tools by Gid Score

ast-grep: downloads per weeknpm, @ast-grep/cli 1,052,135
ast-grep: GitHub starsast-grep/ast-grep 16,291

Gid Score 58: downloads 71, use in agent projects 21, GitHub stars 58, downloads trend 89 (each 0-100). How it is calculated.

Often used with ast-grep

Knip53.8% of ast-grep projects · 23.4× more than average
Vitest61.5% of ast-grep projects · 3.0× more than average
yaml38.5% of ast-grep projects · 12.4× more than average
Prettier53.8% of ast-grep projects · 2.6× more than average
TypeScript84.6% of ast-grep projects · 1.5× more than average
fast-check30.8% of ast-grep projects · 34.7× more than average
oxlint30.8% of ast-grep projects · 10.2× more than average
ESLint61.5% of ast-grep projects · 1.7× more than average

By coding agent

Claude Code0.2% of projects set up for it
GitHub Copilot0.2% of projects set up for it
OpenAI Codex1.3% of projects set up for it

Share of public repos configured for each agent that list ast-grep as a dependency.

How ast-grep is funded

Most funded tools

GitHub Sponsors

@HerringtonDarkholme32 current sponsors

GitHub shows how many people and companies sponsor an account, not how much they pay. Sponsors of a person back all of their work, which here includes Element Plus.

Ways to fund ast-grep

GitHub Sponsors

As the maintainers list them in FUNDING.yml on GitHub. Checked Oct 20, 2026.

Agent Skills for ast-grep

ast-grep from code-yeongyu/oh-my-openagentSearches and rewrites code by AST shape across 25 languages. Use when the target is a syntax pattern (every call/class/import shaped like X, a codemod, a YAML … has scripts
npx skills add code-yeongyu/oh-my-openagent --skill ast-grep
ast-grep from vinhnx/VTCodeUse for ast-grep project setup, rule authoring, rule debugging, and structural search workflows.
npx skills add vinhnx/VTCode --skill ast-grep

Skills teach your coding agent how to use ast-grep well. Official means the pack comes from the same GitHub account as ast-grep. Read a skill before installing it: it can include scripts. All Agent Skills

Install

Packagenpm install @ast-grep/cli
Main stacksTypeScript / JavaScript (8), Rust (3), Python (1), Next.js (1)
Example projectsgetsentry/toolkit, OneOfOne/dotfiles, jcosta33/sourdaw, CodySwannGT/lisa

Alternatives to ast-grep

All linting and formatting

In our scan, none of the most used tools in Linting and formatting does the same job as ast-grep: they are add-ons, companions or tools for a different task.

More in Linting and formatting: ESLint Prettier Biome oxlint oxfmt Knip stylelint ESLint Import Resolver TypeScript

Is ast-grep right for your project? Ask AgentGid →