Quickstart
Get started with JAIPilot CLI
Install JAIPilot, sign in, and run your first Java testing workflow from a project directory.
-
Install JAIPilot
Install the native CLI on macOS or Linux. No additional runtime installation is required.
Install JAIPilotcurl -fsSL https://raw.githubusercontent.com/JAIPilot/jaipilot/main/install.sh | shUpdate JAIPilotjaipilot updateThe installer verifies the download and installs to ~/.local/bin. Follow its PATH instructions if prompted.
-
Sign in to JAIPilot
Run the command, then complete sign-in in your browser with your JAIPilot account.
Sign injaipilot auth loginYour CLI uses the same account, subscription, and credits as the IntelliJ plugin.
-
Run your first Java testing workflow
Open your Java Git repository. Replace the example with a fully qualified class from your project, then generate focused tests.
Generate tests for a classjaipilot run generate_tests --class com.acme.OrderServiceUse
Read the CLI guidejaipilot workflowsto explore the available outcomes. Review the diff and the reported build, test, and coverage evidence after each run.
Meet a JaCoCo coverage target
Use your project's existing JaCoCo configuration. Check fresh coverage
locally, or sign in with jaipilot auth login and generate
tests to meet a target. Replace com.acme.OrderService with a class
in your project.
Native CLI
For a single-module Maven project with active JaCoCo instrumentation:
jaipilot run improve_coverage --class com.acme.OrderService --coverage-target 80 Maven
Adapter 1.2.1 is available on Maven Central. Run these commands from your project; no plugin installation in the POM is required.
./mvnw com.jaipilot:jaipilot-maven-plugin:1.2.1:check -Djaipilot.coverage.line=80
./mvnw com.jaipilot:jaipilot-maven-plugin:1.2.1:run -Djaipilot.coverage.line=80 Use mvnw.cmd in Windows PowerShell.
check runs without an account or model call. run generates tests when coverage is below target and uses your signed-in account.
Generation starts from a clean Git working tree.
80 means 80%. Explicit targets add requirements and retain stricter
configured JaCoCo minima. JaCoCo must already be active; these commands run
fresh tests and compare its XML counters. Review generated test changes afterward.
Add -Djaipilot.coverage.classes=com.acme.OrderService in
Maven to scope a target to a class. Add -Djaipilot.coverage.branch=70 for a separate branch target.
Tested Maven sample
Fresh class-scoped run on 7 October 2026 using native CLI/adapter 1.2.1 and JDK 21, with an 80% line target:
| Sample | Line coverage | Tests |
|---|---|---|
| Petclinic Owner | 55% → 100% | 7 added; 82 passed |
Maven resolved from Central. The baseline check rejected coverage below target, then generation passed with fresh JaCoCo reports and zero test failures, errors, or skips. Only a new test file was added.
Read the build tool guide ↗