# 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
```
