You can import the library into your project from Maven Central.
<dependency>
<groupId>com.tinfoiled</groupId>
<artifactId>docopt4s_2.13</artifactId>
<version>0.0.9</version>
</dependency># Build, format and run all tests
mvn spotless:apply clean verifyThe project comes with an example CLI in the testkit module, which you can run:
# From inside the root directory
__cwd=$PWD
function ExampleGo() {
mvn -q -f $__cwd/testkit/pom.xml exec:java \
-Dexec.classpathScope=test \
-Dexec.mainClass=com.tinfoiled.docopt4s.testkit.example.ExampleGo -Dexec.args="$*"
}
# Now you can run the examples in the example CLI
ExampleGo naval_fate ship NOSTRADAMUS move 10 20 --speed=23