Package com.codename1.cli


package com.codename1.cli

Command-line applications: picocli-style annotations that the build turns into a parser, with help, version, subcommands and exit codes.

A class annotated CommandLine.Command is a command; its fields annotated CommandLine.Option and CommandLine.Parameters receive the arguments. The build reads the annotations, generates the code that binds them and writes main, so a command-line tool is a module with commands and nothing else, and it compiles to a native executable for Linux, macOS and Windows like any backend.

The same commands work in a backend with controllers. There the server is the serve subcommand, and the command line with no arguments starts it as before, so maintenance tasks such as a migration or an administrator account ship in the server's own binary.