Picocli is a Java framework for building command line applications with support for colors, autocompletion, subcommands, and GraalVM native compilation.
The tool solves the problem of creating polished command line interfaces without boilerplate code. It works by using annotations to declare command structure, options, and parameters; picocli then parses command line arguments and initializes your annotated class with strongly typed data. Applications can execute with a single line of code by implementing Runnable or Callable, or by putting logic in a @Command-annotated method. The framework supports nested subcommands, POSIX-style grouped short options, custom type converters, password prompts, multi-valued fields with arity ranges, and Map options with typed keys and values.
Picocli suits developers building standalone command line tools in Java or JVM languages like Groovy, Kotlin, and Scala who want rich user experience features without dependency overhead. The single-file distribution model allows applications to include picocli in source form, eliminating external dependencies for end users. This is particularly valuable for GraalVM native image compilation, where picocli applications achieve fast startup and low memory footprint as single executables; an annotation processor automatically enables Graal compilation during the build. The framework follows Command Line Interface Guidelines and generates usage help with ANSI colors and styles, TAB autocompletion, and argument file support for handling long command lines.
The project maintains active engagement with users through documented feedback channels and a dedicated wiki. Development shows consistent attention to both the annotation-based and programmatic APIs, with comprehensive documentation covering advanced features like parser tracing for troubleshooting and support for various option prefix styles and parameter arity specifications.