Comparison

ast-grep vs pre-commit

On the evidence we track, pre-commit leads this comparison with a composite score of 68/100. Scores are only directly comparable because these tools share a category; the full breakdown and every source is below.

Machine formatsJSONMarkdownGraphQLor send Accept: application/json
ast-grep60
pre-commit68
Score
Vioscale score
ast-grep60 / 100low · 45%
pre-commit68 / 100medium · 73%
Pricing
Free tier
ast-grep
pre-commit
Model
ast-grepcommercial
pre-commitcommercial
Price level
ast-grepfree
pre-commitfree
Transparent
ast-grep
pre-commit
Reliability
Status page
ast-grep
pre-commit
Adoption
Dependent repos
ast-grep177
pre-commit35,684
Github stars
ast-grep15,649
pre-commit15,536
Package downloads weekly
ast-grep
pre-commit42,454,729
Activity
Commits last 30d
ast-grep49
pre-commit13
Release
Cadence days
ast-grep14
pre-commit57
History
ast-grep20 items
pre-commit20 items
License
Spdx
ast-grepMIT
pre-commitMIT
Language
Primary
ast-grepRust
pre-commitPython

Capabilities

Feature-by-feature on the axes that matter for code quality tools. “-” means undocumented, not absent.

Core
Function
ast-grepStatic analyzer
pre-commitMeta-runner
Language scope
ast-grepMulti-language
pre-commitMulti-language
Implementation language
ast-grepRust
pre-commitPython
Capability
Autofix
ast-grep
pre-commit
Config
Config model
ast-grepRule packs
pre-commitConfig file
Extensibility
Custom rules
ast-grep
pre-commit
Deployment
Deployment
ast-grepCLI-local
pre-commitCLI-local
Delivery
Editor integration
ast-grep
pre-commit
CI / VCS gating
ast-grep-
pre-commit
Insight
Code metrics
ast-grep-
pre-commit
Performance
Incremental / monorepo aware
ast-grep-
pre-commit
Licensing
Open-source
ast-grepOSS
pre-commitOSS
Commercial
Pricing model
ast-grepFree
pre-commitFree

What each one is

The product in its own terms, so the numbers below have context.

ast-grep

A structural code search and rewriting tool that uses AST analysis to locate and modify code patterns across thousands of files, with support for linting and programmatic access via Node.js bindings.

Independently observed

pre-commit

Leader

A framework that automates the execution of code quality checks as git pre-commit hooks, eliminating the need for developers to manually install language-specific dependencies on their machines to run linters and formatters written in any programming language.

Independently observed

Pricing

List pricing as published by each vendor, with the date we read it. Always verify at the source before you buy.

ast-grep

Open sourceFree tier
as of verify ↗

pre-commit

Leader
Free
as of verify ↗

Platform & deployment

Where each product runs and how it can be hosted. A dash means undocumented, not unsupported.

Platforms
CLI
ast-grep
pre-commit
Deployment
Self-hosted
ast-grep
pre-commit

Comparison generated from independently-sourced facts. Every value links to its source and retrieval date. See the method.