Picocli is a framework for creating Java command line applications with almost zero code.
The project contains multiple modules, but most applications only need a few of them. The table below shows the JPMS module name and the Maven coordinates for all modules in the project.
JPMS module name | Maven coordinates (without version) |
---|---|
info.picocli |
info.picocli:picocli |
info.picocli.codegen |
info.picocli:picocli-codegen |
info.picocli.groovy |
info.picocli:picocli-groovy |
info.picocli.shell.jline2 |
info.picocli:picocli-shell-jline2 |
info.picocli.shell.jline3 |
info.picocli:picocli-shell-jline3 |
info.picocli.spring.boot |
info.picocli:picocli-spring-boot-starter |
Most application will only need the main picocli
module, but
we recommend also configuring
the picocli-codegen
module as an annotation processor for your project.
This provides compile-time error checking and
generates GraalVM
configuration files under
META-INF/native-image/picocli-generated/$project
during compilation,
to be included in the application jar.
This in turn facilitates converting your command line application to a native image.
The picocli-groovy
module allows
Groovy scripts to use picocli
annotations for even more compact code.
The picocli-shell-jline2
and picocli-shell-jline3
modules
are of interest to applications that want to provide an interactive shell-like console.
The picocli-spring-boot-starter
module provides Spring integration.
Particularly, it allows for @Autowired
or
@javax.inject
-annotated program elements in picocli components
(commands, subcommands, type converters, default providers, etc.)
to be injected with values from Spring's Application Context.
Module | Description |
---|---|
info.picocli |
Defines API and implementation for parsing command line arguments and creating command line (CLI) applications.
|
info.picocli.codegen |
Defines a picocli annotation processor API and implementation,
and tools for generating GraalVM configuration files and man-page documentation.
|
info.picocli.groovy |
Defines API and implementation for building command line (CLI) applications with Groovy scripts.
|
info.picocli.shell.jline2 |
Defines picocli-based implementations of JLine 2 APIs
for building interactive command line (REPL) applications.
|
info.picocli.shell.jline3 |
Defines picocli-based implementations of JLine 3 APIs
for building interactive command line (REPL) applications.
|
info.picocli.spring.boot |
Defines Spring-based implementations of picocli APIs and picocli-based implementations
of Spring APIs for integrating picocli with Spring Boot and Spring Boot AutoConfiguration.
|