Comparison
ast-grep-cli vs semgrep
Maintenance, adoption and momentum side by side, from PyPI, GitHub and deps.dev data refreshed every day.
Structural Search and Rewrite code at large scale using precise AST pattern.
Actively maintained. Last release 2 weeks ago, commits in 25 of the last 26 weeks. A safe choice.
$
pip install ast-grep-cliLightweight static analysis for many languages. Find bug variants with patterns that look like source code.
Actively maintained. Last release 6 days ago, commits in 23 of the last 26 weeks. A safe choice.
$
pip install semgrepIn short
- semgrep is the most used: 24M downloads a month, 5.1× more than ast-grep-cli.
- Maintenance is comparable: ast-grep-cli 92, semgrep 85 on Pythie’s Index.
- ast-grep-cli is growing fastest: downloads +23% over the last month.
- Safe default for a new project: semgrep.
Side by side
| Metric | ast-grep-cli | semgrep |
|---|---|---|
| Pythie’s Index | Pythie’s Index: 92 | 85 |