Running CLI Applications

The seed-cli module provides support for creating applications that are run from the command-line, accepting options and arguments.

Command-line support requires the following dependency in your project:

<dependency>
    <groupId>org.seedstack.seed</groupId>
    <artifactId>seed-cli</artifactId>
</dependency>
Show version
dependencies {
    compile("org.seedstack.seed:seed-cli:3.13.0")
}

The seed-cli dependency provides a launcher that will handle startup and shutdown logic of the command-line application.

Syntax

The first application argument to determine the name of the command-line handler. Further arguments depend on the executed command.

Example of running myCommand with option1 as a capsule:

java -jar app-capsule.jar myCommand --option1

See how to define custom commands, on the next page.

   

On this page


Edit