Back to rankings

openrewrite/rewrite

Javadocs.openrewrite.org

Automated mass refactoring of source code.

javaastabstract-syntax-treerefactoringrefactoring-toolscode-search
Star Growth
Stars
3.6k
Forks
545
Weekly Growth
Issues
200
1k2k3k
Jan 2023Mar 2024May 2025Jul 2026
ArtifactsMavengit clone https://github.com/openrewrite/rewrite.git
README

OpenRewrite Logo

ci Apache 2.0 Maven Central Revved up by Develocity Contributing Guide

Fast, repeatable refactoring for developers

The OpenRewrite project (managed by Moderne) is an open-source automated refactoring ecosystem for source code, enabling developers to effectively eliminate technical debt within their repositories.

It consists of an auto-refactoring engine that runs prepackaged, open source refactoring recipes for common framework migrations, security fixes, and stylistic consistency tasks—reducing your coding effort from hours or days to minutes.

OpenRewrite provides open-source parsers and base recipes for multiple languages, including Java, Kotlin, Groovy, JavaScript/TypeScript, Python, and C#. For Java, the OpenRewrite Gradle Plugin and OpenRewrite Maven Plugin let you run one recipe at a time against a single repository. Recipes are easy to customize, so you can adapt any of them - or even write your own.

Start with our quickstart guide and let OpenRewrite handle the boring parts of software development for you.

Get and stay informed:

OpenRewrite is maintained by Moderne. The core framework is Apache2 licensed and will always be open source, as are many recipes in the catalog. See Licensing for how the framework and recipes are licensed.

Building on OpenRewrite with Moderne

OpenRewrite is built to migrate, secure, and refactor code one repository at a time. Moderne is the commercial platform built on that foundation, running the same recipes across hundreds or thousands of repositories at once. Migrations are a common starting point with OpenRewrite, and the platform expands on this to include large-scale impact analysis, security remediation, and the tools coding agents use to understand and change code across a whole organization. Moderne also extends OpenRewrite from Java to additional languages and from individual developers to teams and coding agents. While the parsers and base recipes for those additional languages are open source, running recipes against them requires a Moderne license.

A lot of this comes down to how the Lossless Semantic Tree (LST) is handled. The LST is OpenRewrite's type-aware model of your source code, built in memory each time a recipe runs. Moderne batch-builds LSTs once and serializes them, so they can be reused across repos and across teams without rebuilding. That same LST gives coding agents pre-computed context, type-aware search, and direct access to OpenRewrite recipes as deterministic tool calls through tools like Prethink, Trigrep, and a local MCP server. Agents work with less token overhead and more accuracy than they would reading a codebase file by file.

See how Moderne and OpenRewrite work in different ways to transform your code:

Moderne

Moderne also includes a multi-repo command line interface (CLI) for building LSTs, running recipes locally, and developing custom recipes across many repositories.

Moderne

Moderne runs a free public service for the benefit of tens of thousands of open source projects. To learn more about how Moderne can help your team, contact us.

Contributing

We appreciate all types of contributions. See the contributing guide for detailed instructions on how to get started.

Related repositories
CyC2018/CS-Notes

:books: 技术面试必备基础知识、Leetcode、计算机操作系统、计算机网络、系统设计

algorithmleetcode
cyc2018.xyz
184.8k50.8k
Snailclimb/JavaGuide

Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发

JavaScriptnpmApache License 2.0javainterview
javaguide.cn
157.2k46.2k
iluwatar/java-design-patterns

Design patterns implemented in Java

JavaMavenOtherjavaprinciples
java-design-patterns.com
94.2k27.4k
Stirling-Tools/Stirling-PDF

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

JavaMavenOtherdockerjava
stirling.com
87.7k7.8k
macrozheng/mall

mall项目是一套电商系统,包括前台商城系统及后台管理系统,基于Spring Boot+MyBatis实现,采用Docker容器化部署。 前台商城系统包含首页门户、商品推荐、商品搜索、商品展示、购物车、订单流程、会员中心、客户服务、帮助中心等模块。 后台管理系统包含商品管理、订单管理、会员管理、促销管理、运营管理、内容管理、统计报表、财务管理、权限管理、设置等模块。

JavaMavenApache License 2.0spring-bootspring-security
macrozheng.com/admin/
84.3k29.8k
spring-projects/spring-boot

Spring Boot helps you to create Spring-powered, production-grade applications and services with absolute minimum fuss.

JavaMavenApache License 2.0javaspring-boot
spring.io/projects/spring-boot
81.1k42k
doocs/advanced-java

😮 Core Interview Questions & Answers For Experienced Java(Backend) Developers | 互联网 Java 工程师进阶知识完全扫盲:涵盖高并发、分布式、高可用、微服务、海量数据处理等领域知识

JavaMavenCreative Commons Attribution Share Alike 4.0 Internationaljavadistributed-systems
java.doocs.org
79k19.2k
elastic/elasticsearch

Free and Open Source, Distributed, RESTful Search Engine

JavaMavenOtherelasticsearchjava
elastic.co/products/elasticsearch
77.6k26.1k
TheAlgorithms/Java

All Algorithms implemented in Java

JavaMavenMIT Licensejavaalgorithms
66k21.2k
kdn251/interviews

Everything you need to know to get the job.

JavaMavenMIT Licensejavainterview
youtube.com/channel/UCKvwPt6BifPP54yzH99ff1g
65.1k12.9k
youngyangyang04/leetcode-master

《代码随想录》LeetCode 刷题攻略:200道经典题目刷题顺序,共60w字的详细图解,视频难点剖析,50余张思维导图,支持C++,Java,Python,Go,JavaScript等多语言版本,从此算法学习不再迷茫!🔥🔥 来看看,你会发现相见恨晚!🚀

Shellleetcodeprogrammer
62k12.3k
azl397985856/leetcode

LeetCode Solutions: A Record of My Problem Solving Journey.( leetcode题解,记录自己的leetcode解题之路。)

JavaScriptnpmOtheralgorithmleetcode
leetcode-solution-leetcode-pp.gitbook.io/leetcode-solution/
55.8k9.4k