Service-Lint CLI Usage
The Service-Lint CLI runs the same checks as the Maven plugin without requiring a Maven build. It’s useful for ad-hoc checks, scripting, and CI steps that aren’t Maven-driven.
Prerequisites
-
Java 17 or higher.
-
The
service-lint-clijar (built withmvn clean package, produced atservice-lint-cli/target/service-lint-cli-<version>.jar).
Interactive Mode
Start the shell with no arguments:
java -jar service-lint-cli-1.4.4.jar
Then run commands at the prompt:
service-lint:> check
service-lint:> list-rules
service-lint:> help
Direct Command Execution
Pass the command (and options) as arguments — ideal for CI/CD:
# Check the current directory
java -jar service-lint-cli-1.4.4.jar check
# Check a specific directory
java -jar service-lint-cli-1.4.4.jar check --project-path /path/to/project
# Use a specific configuration file
java -jar service-lint-cli-1.4.4.jar check --config-file /path/to/servicelint-config.yml
# Disable specific rules (comma-separated, case-insensitive)
java -jar service-lint-cli-1.4.4.jar check --disable-rules ChangelogVersion,DependencyUpdates
# Run sequentially (disable parallel execution)
java -jar service-lint-cli-1.4.4.jar check --parallel false
# List all available rules
java -jar service-lint-cli-1.4.4.jar list-rules
Commands
check
Runs Service-Lint rules against a project.
| Option | Description | Default |
|---|---|---|
|
Path to the project to check. |
current directory ( |
|
Path to the configuration file. |
|
|
Execute rules in parallel. Set |
|
|
Comma-separated rule names to disable (case-insensitive). |
(empty) |
Exit Codes
-
0 — Success (no ERROR-level violations).
-
1 — Failure (one or more ERROR-level violations found).
WARNING and INFO violations are reported but do not affect the exit code. This makes the CLI easy to gate CI on. See Understanding Reports for details.