openrewrite/rewrite
Developer ToolsAutomated, repeatable source refactoring for Java and other languages, running prepackaged or custom recipes.
OpenRewrite is an open-source engine for automated, repeatable source-code refactoring. It is aimed at developers who want to clear technical debt—framework migrations, security fixes, stylistic consistency—by applying packaged "recipes" instead of editing files by hand, with the project claiming this can cut hours or days of coding down to minutes README.
How the mechanism works
Recipes operate on OpenRewrite's Lossless Semantic Tree (LST), a type-aware, in-memory model of the source code that preserves formatting details. The LST is rebuilt each time a recipe runs. Because analysis is type-aware, recipe authors can target specific constructs rather than relying on plain text matching LST documentation. Recipes are described as easy to customize, so you can adapt an existing one or write your own README.
Ways to run it
The simplest path runs a single recipe against a single repository. For Java, the documented integrations are the OpenRewrite Gradle plugin and the OpenRewrite Maven plugin, and the project points readers to a quickstart guide for first use quickstart, Gradle plugin, Maven plugin. The project's own README casts OpenRewrite as a per-repository tool; running the same recipes across hundreds or thousands of repositories is the job of the commercial Moderne platform built on top of it README. That platform is a separate product, not part of the open-source engine.
Languages and licensing
The core supports multiple language parsers and base recipes, including Java, Kotlin, Groovy, JavaScript/TypeScript, Python and C# supported languages. Licensing is deliberately split: the core project is Apache-2.0 repository, but the parsers and base recipes for the additional (non-Java) languages are offered under the Moderne Source Available License, which permits running them against your own code at no cost. Proprietary recipes in those ecosystems—large-scale analysis, security remediation and AI tool-calling—require a Moderne commercial license licensing. Teams should confirm which licence covers the recipes and parsers they intend to use, because “open source” here does not uniformly describe every component. The README also states a tiered licensing model, so the boundary matters for redistribution as well as for internal use.
Practical limits
The README does not document rollback, upgrade or undo behaviour; versions and compatibility of plugins are covered in the external documentation rather than the repository page. The evidence supplied here describes scope and licensing, not evaluated migration accuracy or performance in real repositories, so those outcomes remain untested from this material. Review the recipe's description and supported languages before applying it to a codebase, and keep changes under version control so results can be reviewed as ordinary diffs documentation.
Written by AI from the project's README, updated October 30, 2026. The project's own docs are the source of truth.