Comparison
ast-grep-cli vs bandit 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 26 of the last 26 weeks. A safe choice.
pip install ast-grep-cliSecurity oriented static analyser for python code.
Maintained. Last release 9 months ago, commits in 10 of the last 26 weeks. Weaker on issue handling and release cadence.
pip install banditLightweight static analysis for many languages. Find bug variants with patterns that look like source code.
Actively maintained. Last release 7 days ago, commits in 23 of the last 26 weeks. A safe choice.
pip install semgrepIn short
- bandit is the most used: 30.7M downloads a month.
- ast-grep-cli is better maintained: Pythie’s Index 93 against 60.
- ast-grep-cli is growing fastest: downloads +19% over the last month.
- Safe default for a new project: bandit, or ast-grep-cli if active maintenance matters most.
Side by side
| Metric | ast-grep-cli | bandit | semgrep |
|---|---|---|---|
| Pythie’s Index | Pythie’s Index: 93 | 60 |