Class JavaRewriteRpc

java.lang.Object
org.openrewrite.maven.rpc.JavaRewriteRpc

public class JavaRewriteRpc extends Object
A standalone RPC server application that communicates via stdin/stdout.

This application is designed to be spawned as a subprocess by Python, JavaScript, or any other language that needs to use Java-based OpenRewrite recipes.

Usage:

   java -cp <classpath> org.openrewrite.maven.rpc.JavaRewriteRpc [options]
 

Options:

  • --marketplace=<path> - Path to marketplace CSV file (optional; without it, recipes are resolved by class name from the classpath)
  • --log-file=<path> - Log file for debugging
  • --trace - Enable RPC message tracing

The marketplace CSV must contain columns for recipe metadata and bundle information. Required columns: name, ecosystem, packageName, version

Example marketplace.csv:

 name,displayName,ecosystem,packageName,version
 org.openrewrite.java.ChangeType,Change type,maven,org.openrewrite:rewrite-java,8.73.0
 
  • Constructor Details

    • JavaRewriteRpc

      public JavaRewriteRpc()
  • Method Details

    • main

      public static void main(String[] args)