Skip to content
SPECIFICTION
Get listed

ast-grep vs Sourcery

ast-grep

ast-grep.github.io

Sourcery

sourcery.ai

Side by side

Figureast-grepSourcery
Price fromFree$12/mo
Free planYesYes
Free trial—Yes
Open source——
WebYesYes
WindowsYesYes
macOSYesYes
LinuxYesYes
APIYesYes
Self-hosted—Yes
Plans published14
Spec score · Code Refactoring Tools9.1 (#1)8.6 (#3)
Custom rulesRules are written in YAML and can combine pattern, kind, regex, relational, and composite matching conditions.Users can define project-wide review rules in a .sourcery.yaml file and use public rulesets such as the Google Python Style Guide.
IntegrationsThe documentation describes editor integrations, including a VS Code extension and language server support for editors such as Vim and Neovim.GitHub, GitLab, GitHub Enterprise Server, self-hosted GitLab, VS Code, Cursor, Windsurf, JetBrains, Jira
SupportThe project directs users with questions or issues to GitHub or Discord and also points to Stack Overflow and Reddit.Support is offered through in-app chat and email, with documentation covering setup, reviews, scanning, IDEs, administration, API, and compliance.
Support channelsThe site links to Discord, Stack Overflow, and Reddit community channels.email, docs
What it doesast-grep is a fast, polyglot tool for structural code search, linting, and large-scale rewriting.Sourcery automatically reviews pull requests and posts summaries, review comments, and suggested fixes.

Plans

ast-grep

  • ast-grepFree

ast-grep pricing →

Sourcery

  • Open SourceFree
  • Pro$12 a month
  • Team$24 a month
  • EnterprisePriced on request

Sourcery pricing →

In their own words

ast-grep

ast-grep is a free, open-source tool for structural code search, linting, and rewriting. It matches patterns against syntax-tree nodes, helping developers locate and change code across a codebase rather than searching plain text. Its CLI can preview and apply rewrites interactively, and scan configurable YAML rules with error, warning, info, or hint severity. Rules can combine pattern, kind, regex, relational, and composite conditions, and CLI commands help create and snapshot-test them. The project says it supports more than 20 languages and can load custom languages. JavaScript and WebAssembly APIs allow programmatic syntax-tree work; a browser playground offers a way to try patterns without local installation. Editor options include a VS Code extension and language-server setups, including for Vim and Neovim. The tool is free, has a web interface, and is distributed through package managers or built from source. Its FAQ notes that some advanced static-analysis information is unsupported, and one rule cannot target multiple languages at once.

Visit ast-grep.github.io

Sourcery

Sourcery reviews pull requests with AI, returning a summary, review comments and suggested fixes within minutes. Users can apply a suggestion as a change and commit it to the pull request. Security checks cover committed secrets, static-analysis vulnerabilities, infrastructure-as-code misconfigurations, dependencies and licenses. The extension works in VS Code, Cursor, Windsurf and JetBrains editors, and Sourcery supports GitHub, GitLab, GitHub Enterprise Server and self-hosted GitLab. Open Source checks security on every pull request; Open Source and Pro also scan twice a week, while Team includes nightly scans. The public REST API, for listing, reading, counting and bulk-updating security findings and groups, is a Team feature. Open Source is free; Pro is $12 a month billed annually, or $15 per developer per month billed monthly. Team is $24 a month billed annually, or $30 per developer per month billed monthly. A 14-day Team-feature trial is available organization-wide after installation, without a credit card. Sourcery says it does not retain customer code after reviews or use it to train models.

Visit sourcery.ai