ast-grep vs BrontoSource
ast-grep
ast-grep.github.ioBrontoSource
brontosource.devSide by side
| Figure | ast-grep | BrontoSource |
|---|---|---|
| Price from | Free | — |
| Free plan | Yes | — |
| Free trial | — | — |
| Open source | — | — |
| Web | Yes | Yes |
| Windows | Yes | — |
| macOS | Yes | — |
| Linux | Yes | — |
| API | Yes | — |
| Plans published | 1 | 0 |
| Spec score · Code Refactoring Tools | 9.1 (#1) | 7.7 (#11) |
| Purpose | ast-grep is a fast, polyglot tool for structural code search, linting, and rewriting at scale. | Bronto is a tool for automatically performing smart find-and-replace across a codebase. |
| Support | The project directs users with questions or issues to GitHub or Discord and also points to Stack Overflow and Reddit. | Users can contact [email protected] or create an issue on the public GitHub repository. |
Plans
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.
BrontoSource
BrontoSource is a desktop tool for deterministic C++ refactoring across large repositories. Teams define explicit transformation rules and apply them across thousands of files. Documented operations include expression matching, extraction, and inlining for functions, constructors, type aliases, enumerators, namespaces, macros, declarations, types, and lambda captures. The command-line tool accepts Clang arguments, a compilation database, or compile_flags.txt, then can generate Fossil-format edits, merge edit files, and apply changes. BrontoSource describes its output as repeatable, traceable diffs for review. Its homepage reports 100M+ lines transformed safely and 10,000+ files refactored in one transformation. The product is in early access, with access arranged through BrontoSource; its API can also be tried on Compiler Explorer without installation. Pricing is on request. A header-only support library supports CMake 3.10.0+ and Bazel 8.1.1+ and uses 0BSD.