> For the complete documentation index, see [llms.txt](https://docs.sealights.io/knowledgebase/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/java-build-tools-plugins/sealights-gradle-plugin-1/command-reference.md).

# Command Reference

## CLI Commands

```bash
java -jar sl-build-scanner.jar -sbt -configfile <config-file> -executionType <executionType> -workspacepath <project-root> 
```

<table><thead><tr><th width="149.18359375">Command</th><th width="277.4453125">Parameters</th><th>Description</th></tr></thead><tbody><tr><td><code>-sbt</code></td><td>none</td><td>Generate SBT-specific configuration and wire plugin into project</td></tr><tr><td><code>-configfile</code></td><td><code>&#x3C;file></code></td><td>Path to JSON configuration file (<code>sl-config.json</code>)</td></tr><tr><td><code>-workspacepath</code></td><td><code>&#x3C;dir></code></td><td>Root directory of your SBT project</td></tr><tr><td><code>-restoreSbt</code></td><td>none</td><td>Reverts all SBT modifications applied by Build Scanner</td></tr><tr><td><code>-executionType</code></td><td><code>scanonly</code> / <code>testsonly</code> / <code>disabled</code></td><td>Overrides the execution mode defined in JSON config</td></tr><tr><td><code>-logLevel</code></td><td><code>info</code> / <code>debug</code> / <code>warn</code> / <code>error</code></td><td>Sets the log verbosity</td></tr><tr><td><code>-help</code></td><td>none</td><td>Displays CLI usage information</td></tr></tbody></table>

{% hint style="info" %}
**Tip**: Paths (`-configfile`, `-workspacepath`) can be absolute or relative to the current working directory. Use `-restoreSbt` to undo any plugin wiring changes.
{% endhint %}

## SBT Plugin Flags Reference

This table shows the **SBT plugin flags** alongside CLI commands for a quick mapping.

<table><thead><tr><th width="239.41796875">CLI Command / JSON</th><th width="319.80078125">SBT Plugin Flag</th><th>Description</th></tr></thead><tbody><tr><td><code>-executionType scanonly</code></td><td><code>sealightsRunScanOnly := Some(true)</code></td><td>Run only Build Scanner phase, skip tests</td></tr><tr><td><code>-executionType testsonly</code></td><td><code>sealightsRunTestOnly := Some(true)</code></td><td>Run only Test Listener phase, reuse existing scan</td></tr><tr><td><code>-executionType disabled</code></td><td><code>sealightsDisabled := Some(true)</code></td><td>Temporarily disable all SeaLights integration</td></tr><tr><td><code>-configfile &#x3C;file></code></td><td><code>slConfigFile := "&#x3C;file>"</code></td><td>Path to JSON configuration file</td></tr><tr><td><code>-logLevel &#x3C;level></code></td><td><code>sealightsLogLevel := "&#x3C;level>"</code></td><td>Set log verbosity (info/debug/warn/error)</td></tr><tr><td><code>-workspacepath &#x3C;dir></code></td><td>N/A (use working directory)</td><td>Root of SBT project; implicitly used by plugin</td></tr><tr><td><code>-restoreSbt</code></td><td>N/A</td><td>Restore <code>build.sbt</code> to pre-integration state</td></tr></tbody></table>

**Usage Example – Scan Only in SBT**

{% code title="build.sbt" %}

```scala
sealightsRunScanOnly := Some(true)
sbt sealightsRun
```

{% endcode %}

**Usage Example – CLI equivalent**

```bash
java -jar sl-build-scanner.jar -sbt -configfile ./sl-config.json -executionType scanonly -workspacepath ./my-project
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/java-build-tools-plugins/sealights-gradle-plugin-1/command-reference.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
