gen-reflect-config [-hV] [--[no-]exit] [-c=<factoryClass>] [-o=<outputFile>] [@<filename>…​] <classes>…​


Generates a JSON file with the program elements that will be accessed reflectively for the specified @Command classes. The generated JSON file can be passed to the -H:ReflectionConfigurationFiles=/path/to/reflect-config.json option of the native-image GraalVM utility. See


-c, --factory=<factoryClass>

Optionally specify the fully qualified class name of the custom factory to use to instantiate the command class. When omitted, the default picocli factory is used.

-o, --output=<outputFile>

Output file to write the configuration to. If not specified, the configuration is written to the standard output stream.


Specify --exit if you want the application to call System.exit when finished. By default, System.exit is not called.

-h, --help

Show this help message and exit.

-V, --version

Print version information and exit.



One or more argument files containing options.


One or more classes to generate a GraalVM ReflectionConfiguration for.

Exit Codes (if enabled with --exit)


Successful program execution.


A runtime exception occurred while generating man pages.


Usage error: user input for the command was incorrect, e.g., the wrong number of arguments, a bad flag, a bad syntax in a parameter, etc.


java -cp "myapp.jar;picocli-4.5.2.jar;picocli-codegen-4.5.2.jar" picocli.codegen.aot.graalvm.ReflectionConfigGenerator my.pkg.MyClass