# Command Reference

{% hint style="info" %}
**Passing Parameters as Environment Variables**

All of the below `sl-python` CLI parameters can be passed as an environment variable by prepending `SL_` to them.

For example,

* the param `buildName` would be set with `SL_BUILDNAME`
* the param `buildSessionId` would be set with `SL_BUILDSESSIONID`
* the param `proxy` would be set with `SL_PROXY`
  {% endhint %}

{% hint style="warning" %}
**Legacy Alias Deprecation Notice**

Starting with **Python Agent 2.8.0**, SeaLights supports standardised CLI parameter naming across technologies.

Legacy parameter aliases remain supported for backward compatibility, but they are planned for future deprecation. Customers are strongly encouraged to migrate to the standardised CLI parameters as part of their regular maintenance and upgrade process. More information can be found in **Configuration Standards**.
{% endhint %}

## Python Agent — Command Reference <a href="#generating-a-session-id" id="generating-a-session-id"></a>

### Generating a Session ID (`config`) <a href="#standard-session-id" id="standard-session-id"></a>

This example is with minimum required CLI Parameters. All available CLI Parameters can be found in the table below.

```bash
##Minimum required CLI parameters
sl-python config \
  --token <token> \
  --appName <app-name> \
  --branchName <branch> \
  --buildName <build> \
  --scanDir <path> \
  --includeFiles <include> \
  --excludeFiles <exclude>
```

#### All CLI Parameters

<table><thead><tr><th width="170.0078125" valign="top">CLI Parameter</th><th width="169.7578125" valign="top">Legacy Alias</th><th>Description</th></tr></thead><tbody><tr><td valign="top"><code>--token</code></td><td valign="top"><code>--token</code></td><td>Access token generated from the Sealights server.</td></tr><tr><td valign="top"><code>--tokenFile</code></td><td valign="top"><code>--tokenfile</code></td><td>Path to file containing access token generated from the SeaLights server.</td></tr><tr><td valign="top"><code>--appName</code></td><td valign="top"><code>--appname</code></td><td>Name of the application.</td></tr><tr><td valign="top"><code>--branchName</code></td><td valign="top"><code>--branchname</code></td><td>The source branch of the application.</td></tr><tr><td valign="top"><code>--buildName</code></td><td valign="top"><code>--buildname</code></td><td>The build label of the current build.</td></tr><tr><td valign="top"><code>--scanDir</code></td><td valign="top"><code>--workspacepath</code></td><td>Path to the workspace where the source code exists.</td></tr><tr><td valign="top"><code>--includeFiles</code></td><td valign="top"><code>--include</code></td><td>Include only files whose paths match one of these patterns.<br>Accepts shell-style wildcards, which must be quoted.<br>If you want to provide multiple patterns, please use a comma between each quoted pattern. For example, "pattern1", "pattern2".</td></tr><tr><td valign="top"><code>--excludeFiles</code></td><td valign="top"><code>--exclude</code></td><td>Omit files whose paths match one of these patterns.<br>Accepts shell-style wildcards, which must be quoted.<br>If you want to provide multiple patterns, please use a comma between each quoted pattern. For example, "pattern1", "pattern2".</td></tr><tr><td valign="top"><code>--buildSessionId</code></td><td valign="top"><code>--buildsessionid</code></td><td>Optional: A user provided session ID (case-sensitive).</td></tr><tr><td valign="top"><code>--proxy</code></td><td valign="top"><code>--proxy</code></td><td>Address of proxy to run connection through.</td></tr><tr><td valign="top"><code>--help</code></td><td valign="top"><code>--help</code></td><td>Show Help message and exit.</td></tr><tr><td valign="top"><code>--quiet</code></td><td valign="top"><code>--quiet</code></td><td>Suppresses console feedback messages only. Does not suppress log output when logging is configured to print to the console. The default value is <code>false</code>.</td></tr></tbody></table>

### Pull Request Session (`prConfig`) <a href="#pull-request-session-id" id="pull-request-session-id"></a>

This example is with minimum required CLI Parameters. All available CLI Parameters can be found in the table below.

```bash
##Minimum required CLI parameters
sl-python prConfig \
  --token <token> \
  --appName <app-name> \
  --pullRequestNumber <pr> \
  --targetBranch <branch> \
  --latestCommit <commit> \
  --repositoryUrl <url> \
  --scanDir <path> \
  --includeFiles <include> \
  --excludeFiles <exclude>
```

#### All CLI Parameters

<table><thead><tr><th width="189.68359375" valign="top">CLI Parameter</th><th width="189.9296875" valign="top">Legacy Alias</th><th>Description</th></tr></thead><tbody><tr><td valign="top"><code>--token</code></td><td valign="top"><code>--token</code></td><td>Access token generated from the Sealights server.</td></tr><tr><td valign="top"><code>--tokenFile</code></td><td valign="top"><code>--tokenfile</code></td><td>Path to file containing access token generated from the SeaLights server.</td></tr><tr><td valign="top"><code>--appName</code></td><td valign="top"><code>--appname</code></td><td>Name of the application.</td></tr><tr><td valign="top"><code>--targetBranch</code></td><td valign="top"><code>--targetbranch</code></td><td>The branch to which this PR will be merged into (already reported to SeaLights).</td></tr><tr><td valign="top"><code>--latestCommit</code></td><td valign="top"><code>--latestcommit</code></td><td>The full SHA of the last commit made to the Pull Request.</td></tr><tr><td valign="top"><code>--pullRequestNumber</code></td><td valign="top"><code>--pullrequestnumber</code></td><td>he number assigned to the Pull Request from the source control.</td></tr><tr><td valign="top"><code>--repositoryUrl</code></td><td valign="top"><code>--repourl</code></td><td>The pull request URL for the PR to be scanned, up until the section before the pullRequestNumber value.</td></tr><tr><td valign="top"><code>--scanDir</code></td><td valign="top"><code>--workspacepath</code></td><td>Path to the workspace where the source code exists.</td></tr><tr><td valign="top"><code>--includeFiles</code></td><td valign="top"><code>--include</code></td><td>Include only files whose paths match one of these patterns.<br>Accepts shell-style wildcards, which must be quoted.</td></tr><tr><td valign="top"><code>--excludeFiles</code></td><td valign="top"><code>--exclude</code></td><td>Omit files whose paths match one of these patterns.<br>Accepts shell-style wildcards, which must be quoted.</td></tr><tr><td valign="top"><code>--buildSessionId</code></td><td valign="top"><code>--buildsessionid</code></td><td>Optional: A user provided session ID (case-sensitive).</td></tr><tr><td valign="top"><code>--proxy</code></td><td valign="top"><code>--proxy</code></td><td>Address of proxy to run connection through.</td></tr><tr><td valign="top"><code>--help</code></td><td valign="top"><code>--help</code></td><td>Show Help message and exit.</td></tr><tr><td valign="top"><code>--quiet</code></td><td valign="top"><code>--quiet</code></td><td>Suppresses console feedback messages only. Does not suppress log output when logging is configured to print to the console. The default value is <code>false</code>.</td></tr></tbody></table>

### Scanning a Build (`scan`) <a href="#pull-request-session-id" id="pull-request-session-id"></a>

This example is with minimum required CLI Parameters. All available CLI Parameters can be found in the table below.

```bash
sl-python scan \
  --token <token> \
  --buildSessionId <id>
```

#### All CLI Parameters

<table><thead><tr><th width="197.7265625">CLI Parameter</th><th width="198.609375">Legacy Alias</th><th>Description</th></tr></thead><tbody><tr><td><code>--token</code></td><td><code>--token</code></td><td>Access token generated from the SeaLights server.</td></tr><tr><td><code>--tokenFile</code></td><td><code>--tokenfile</code></td><td>Path to file containing access token generated from the SeaLights server.</td></tr><tr><td><code>--buildSessionId</code></td><td><code>--buildsessionid</code></td><td>Session ID of configuration created.</td></tr><tr><td><code>--buildSessionIdFile</code></td><td><code>--buildsessionidfile</code></td><td>Path to file containing the Session ID of configuration created.</td></tr><tr><td><code>--scmType</code></td><td><code>--scm</code></td><td><p>Source control used</p><p>Current options are: <code>git</code>, <code>none</code> (Default: <code>none</code>).</p></td></tr><tr><td><code>--scmProvider</code></td><td><code>--scmprovider</code></td><td>The provider name of your Source Control Management (SCM) tool.<br>Values: <code>Github</code>, <code>Bitbucket</code> and <code>Gitlab</code> (Default: <code>Github</code>).</td></tr><tr><td><code>--repositoryUrl</code></td><td><code>--scmbaseurl</code></td><td><p>The URL to the repository which contains the code.</p><p>If not provided, the url of the remote GIT origin will be used.</p><p>Example: <code>https://my.bitbucket.com/projects/ABCD/repos/XYZ/browse/A1</code></p></td></tr><tr><td><code>--scmVersion</code></td><td><code>--scmversion</code></td><td>The version of your Source Control Management (SCM) tool. If left blank, cloud version is assumed. Otherwise, specify the version of your on-premise server.</td></tr><tr><td><code>--proxy</code></td><td><code>--proxy</code></td><td>Address of proxy to run connection through.</td></tr><tr><td><code>--help</code></td><td><code>--help</code></td><td>Show Help message and exit.</td></tr><tr><td><code>--quiet</code></td><td><code>--quiet</code></td><td>Suppresses console feedback messages only. Does not suppress log output when logging is configured to print to the console (Default: <code>false</code>).</td></tr></tbody></table>

### Running Backend Server (`run`) <a href="#pull-request-session-id" id="pull-request-session-id"></a>

This example is with minimum required CLI Parameters. All available CLI Parameters can be found in the table below.

```bash
sl-python run \
  --token <token> \
  --buildSessionId <id> \
  --labId <labid> \
  --testStage <teststage> 
```

#### All CLI Parameters

<table><thead><tr><th width="197.5390625" valign="top">CLI Parameter</th><th width="197.796875" valign="top">Legacy Alias</th><th>Description</th></tr></thead><tbody><tr><td valign="top"><code>--token</code></td><td valign="top"><code>--token</code></td><td>Access token generated from the SeaLights server.</td></tr><tr><td valign="top"><code>--tokenFile</code></td><td valign="top"><code>--tokenfile</code></td><td>Path to file containing access token generated from the SeaLights server.</td></tr><tr><td valign="top"><code>--buildSessionId</code></td><td valign="top"><code>--buildsessionid</code></td><td>Session ID of configuration created.</td></tr><tr><td valign="top"><code>--buildSessionIdFile</code></td><td valign="top"><code>--buildsessionidfile</code></td><td>Path to file containing the Session ID of configuration created.</td></tr><tr><td valign="top"><code>--labId</code></td><td valign="top"><code>--labid</code></td><td>Unique ID for a set of test labs in case multiple labs are running simultaneously (case-sensitive).</td></tr><tr><td valign="top"><code>--testStage</code></td><td valign="top"><code>--teststage</code></td><td>The tests stage (e.g 'integration tests', 'regression'). The default will be 'Unit Tests'.</td></tr><tr><td valign="top"><code>--testGroupId</code></td><td valign="top"><code>--testgroupid</code></td><td>The test group id.</td></tr><tr><td valign="top"><code>--cov-report</code></td><td valign="top"><code>--cov-report</code></td><td>Path to generate XML coverage report.</td></tr><tr><td valign="top"><code>--autoExecution</code></td><td valign="top"></td><td>Run with auto execution (start and end execution).</td></tr><tr><td valign="top"><code>--dropInitFootprints</code></td><td valign="top"></td><td>Drop initial footprints (ignore coverage data before execution starts).</td></tr><tr><td valign="top"><code>--proxy</code></td><td valign="top"><code>--proxy</code></td><td>Address of proxy to run connection through.</td></tr><tr><td valign="top"><code>--help</code></td><td valign="top"><code>--help</code></td><td>Show Help message and exit.</td></tr><tr><td valign="top"><code>--quiet</code></td><td valign="top"><code>--quiet</code></td><td>Suppresses console feedback messages only. Does not suppress log output when logging is configured to print to the console (Default: <code>false</code>).</td></tr></tbody></table>

### Test Listener - Opening a Test Stage (`start`) <a href="#starting-a-test-stage" id="starting-a-test-stage"></a>

This example is with minimum required CLI Parameters. All available CLI Parameters can be found in the table below.

```bash
sl-python start \
  --token <token> \
  --buildSessionId <id> \
  --labId <labid> \
  --testStage <teststage> \
  --testProjectId <testprojectid>
```

#### All CLI Parameters

<table><thead><tr><th width="198.3515625" valign="top">CLI Parameter</th><th width="197.64453125" valign="top">Legacy Alias</th><th>Description</th></tr></thead><tbody><tr><td valign="top"><code>--token</code></td><td valign="top"><code>--token</code></td><td>Access token generated from the SeaLights server.</td></tr><tr><td valign="top"><code>--tokenFile</code></td><td valign="top"><code>--tokenfile</code></td><td>Path to file containing access token generated from the SeaLights server.</td></tr><tr><td valign="top"><code>--buildSessionId</code></td><td valign="top"><code>--buildsessionid</code></td><td>Session ID of configuration created.</td></tr><tr><td valign="top"><code>--buildSessionIdFile</code></td><td valign="top"><code>--buildsessionidfile</code></td><td>Path to file containing the Session ID of configuration created.</td></tr><tr><td valign="top"><code>--labId</code></td><td valign="top"><code>--labid</code></td><td>Unique ID for a set of test labs in case multiple labs are running simultaneously.</td></tr><tr><td valign="top"><code>--testStage</code></td><td valign="top"><code>--teststage</code></td><td>The tests stage (e.g 'integration tests', 'regression'). The default will be 'Unit Tests'.</td></tr><tr><td valign="top"><code>--testProjectId</code></td><td valign="top"><code>--testprojectid</code></td><td>The test project id.</td></tr><tr><td valign="top"><code>--testGroupId</code></td><td valign="top"><code>--testgroupid</code></td><td>The test group id. </td></tr><tr><td valign="top"><code>--prId</code></td><td valign="top"><code>--prid</code></td><td>The PR id.</td></tr><tr><td valign="top"><code>--waitAfterStart</code></td><td valign="top"></td><td>The time to wait after starting the execution.</td></tr><tr><td valign="top"><code>--proxy</code></td><td valign="top"><code>--proxy</code></td><td>Address of proxy to run connection through.</td></tr><tr><td valign="top"><code>--help</code></td><td valign="top"><code>--help</code></td><td>Show Help message and exit.</td></tr><tr><td valign="top"><code>--quiet</code></td><td valign="top"><code>--quiet</code></td><td>Suppresses console feedback messages only. Does not suppress log output when logging is configured to print to the console (Default: <code>false</code>).</td></tr></tbody></table>

### Test Listener - Uploading Report Files (`uploadReports`) <a href="#upload-report-files" id="upload-report-files"></a>

{% hint style="warning" %}
Report files must be JUnit style XML reports.&#x20;
{% endhint %}

This example is with minimum required CLI Parameters. All available CLI Parameters can be found in the table below.

```bash
sl-python uploadReports \
  --token <token> \
  --buildSessionId <id> \
  --labId <labid> \
  --file <reportfile> \
  --filesFolder <reportfilesfolder>
```

#### All CLI Parameters

<table><thead><tr><th width="197.72265625">CLI Parameter</th><th width="197.74609375">Legacy Alias</th><th>Description</th></tr></thead><tbody><tr><td><code>--token</code></td><td><code>--token</code></td><td>Access token generated from the SeaLights server.</td></tr><tr><td><code>--tokenFile</code></td><td><code>--tokenfile</code></td><td>Path to file containing access token generated from the SeaLights server.</td></tr><tr><td><code>--buildSessionId</code></td><td><code>--buildsessionid</code></td><td>Session ID of configuration created.</td></tr><tr><td><code>--buildSessionIdFile</code></td><td><code>--buildsessionidfile</code></td><td>Path to file containing the Session ID of configuration created.</td></tr><tr><td><code>--labId</code></td><td><code>--labid</code></td><td>Unique ID for a set of test labs in case multiple labs are running simultaneously (case-sensitive).</td></tr><tr><td><code>--file</code></td><td><code>--reportfile</code></td><td>Path to report file. This argument can be declared multiple times in order to upload multiple files.</td></tr><tr><td><code>--fileFolder</code></td><td><code>--reportfilesfolder</code></td><td><p>Path to folder that contains nothing but report files. All files in folder will be uploaded.<br>This argument can be declared multiple times in order to upload multiple files from multiple folders containing report files.</p><p>Note: all files in the folder will be uploaded</p></td></tr><tr><td><code>--hasMoreRequests</code></td><td><code>--hasmorerequests</code></td><td>Set to <code>true</code> if test results contains multiple reports (Default: <code>false</code>).</td></tr><tr><td><code>--source</code></td><td><code>--source</code></td><td>The reports provider. If not set, the default will be 'Junit xml report'.</td></tr><tr><td><code>--type</code></td><td><code>--type</code></td><td><p>Name of testing framework type. The report type. If not set, the default will be 'JunitReport':</p><ul><li>JUnitReport - For uploading JUnit test report files.</li><li>commitLog - For uploading git style commit logs.</li></ul></td></tr><tr><td><code>--help</code></td><td><code>--help</code></td><td>Show Help message and exit.</td></tr><tr><td><code>--quiet</code></td><td><code>--quiet</code></td><td>Suppresses console feedback messages only. Does not suppress log output when logging is configured to print to the console (Default: <code>false</code>).</td></tr></tbody></table>

### Test Listener - Closing a Test Stage (`end`) <a href="#ending-a-test-stage" id="ending-a-test-stage"></a>

This example is with minimum required CLI Parameters. All available CLI Parameters can be found in the table below.

```bash
sl-python end \
  --token <token> \
  --buildSessionId <id> \
  --labId <labid>
```

#### All CLI Parameters

<table><thead><tr><th width="197.52734375">CLI Parameter</th><th width="198.2265625">Legacy Alias</th><th>Description</th></tr></thead><tbody><tr><td><code>--token</code></td><td><code>--token</code></td><td>Access token generated from the SeaLights server.</td></tr><tr><td><code>--tokenFile</code></td><td><code>--tokenfile</code></td><td>Path to file containing access token generated from the SeaLights server.</td></tr><tr><td><code>--buildSessionId</code></td><td><code>--buildsessionid</code></td><td>Session ID of configuration created.</td></tr><tr><td><code>--buildSessionIdFile</code></td><td><code>--buildsessionidfile</code></td><td>Path to file containing the Session ID of configuration created.</td></tr><tr><td><code>--labId</code></td><td><code>--labid</code></td><td>Unique ID for a set of test labs in case multiple labs are running simultaneously.</td></tr><tr><td><code>--testGroupId</code></td><td><code>--testgroupid</code></td><td>The test group id.</td></tr><tr><td><code>--waitBeforeEnd</code></td><td></td><td>The time to wait before ending the execution.</td></tr><tr><td><code>--help</code></td><td><code>--help</code></td><td>Show Help message and exit.</td></tr></tbody></table>

### Running Tests via pytest, unittest, nose or behave <a href="#ending-a-test-stage" id="ending-a-test-stage"></a>

These examples are with minimum required CLI Parameters. All available CLI Parameters can be found in the table below.

{% tabs %}
{% tab title="pytest" %}

```bash
sl-python pytest \
  --token <token> \
  --buildSessionId <id> \
  --labId <labid> \
  --testStage <teststage> \
  --testProjectId <testprojectid>
```

{% endtab %}

{% tab title="unittest" %}

```bash
sl-python unittest \
  --token <token> \
  --buildSessionId <id> \
  --labId <labid> \
  --testStage <teststage> \
  --testProjectId <testprojectid>
```

{% endtab %}

{% tab title="nose" %}

```bash
sl-python nose \
  --token <token> \
  --buildSessionId <id> \
  --labId <labid> \
  --testStage <teststage> \
  --testProjectId <testprojectid>
```

{% endtab %}

{% tab title="behave" %}

```bash
sl-python behave \
  --token <token> \
  --buildSessionId <id> \
  --labId <labid> \
  --testStage <teststage> \
  --testProjectId <testprojectid>
```

{% endtab %}
{% endtabs %}

#### All CLI Parameters

<table><thead><tr><th width="198.3515625" valign="top">CLI Parameter</th><th width="197.64453125" valign="top">Legacy Alias</th><th>Description</th></tr></thead><tbody><tr><td valign="top"><code>--token</code></td><td valign="top"><code>--token</code></td><td>Access token generated from the SeaLights server.</td></tr><tr><td valign="top"><code>--tokenFile</code></td><td valign="top"><code>--tokenfile</code></td><td>Path to file containing access token generated from the SeaLights server.</td></tr><tr><td valign="top"><code>--buildSessionId</code></td><td valign="top"><code>--buildsessionid</code></td><td>Session ID of configuration created.</td></tr><tr><td valign="top"><code>--buildSessionIdFile</code></td><td valign="top"><code>--buildsessionidfile</code></td><td>Path to file containing the Session ID of configuration created.</td></tr><tr><td valign="top"><code>--labId</code></td><td valign="top"><code>--labid</code></td><td>Unique ID for a set of test labs in case multiple labs are running simultaneously.</td></tr><tr><td valign="top"><code>--testStage</code></td><td valign="top"><code>--teststage</code></td><td>The tests stage (e.g 'integration tests', 'regression'). The default will be 'Unit Tests'.</td></tr><tr><td valign="top"><code>--testProjectId</code></td><td valign="top"><code>--testprojectid</code></td><td>The test project id.</td></tr><tr><td valign="top"><code>--testGroupId</code></td><td valign="top"><code>--testgroupid</code></td><td>The test group id. </td></tr><tr><td valign="top"><code>--prid</code></td><td valign="top"><code>--prid</code></td><td>The PR id.</td></tr><tr><td valign="top"><code>--cov-report</code></td><td valign="top"><code>--cov-report</code></td><td>Path to generate XML coverage report.</td></tr><tr><td valign="top"><code>--pre-test</code></td><td valign="top"><code>--pre-test</code></td><td>Collect coverage per test.</td></tr><tr><td valign="top"><code>--interval</code></td><td valign="top"><code>--interval</code></td><td>Interval in milliseconds to send data.</td></tr><tr><td valign="top"><code>--disableTia</code></td><td valign="top"><code>--test-selection-disable</code></td><td>A flag to disable the Test Optimization.</td></tr><tr><td valign="top"><code>--test-selection-retry-interval</code></td><td valign="top"><code>--test-selection-retry-interval</code></td><td>Test recommendation retry interval in sec.</td></tr><tr><td valign="top"><code>--test-selection-retry-timeout</code></td><td valign="top"><code>--test-selection-retry-timeout</code></td><td>Test recommendation retry timeout in sec.</td></tr><tr><td valign="top"><code>--proxy</code></td><td valign="top"><code>--proxy</code></td><td>Address of proxy to run connection through.</td></tr><tr><td valign="top"><code>--help</code></td><td valign="top"><code>--help</code></td><td>Show Help message and exit.</td></tr><tr><td valign="top"><code>--quiet</code></td><td valign="top"><code>--quiet</code></td><td>Suppresses console feedback messages only. Does not suppress log output when logging is configured to print to the console (Default: <code>false</code>).</td></tr></tbody></table>

## Logging <a href="#logging" id="logging"></a>

Logging is configured via environment variables. By default, the agent logs at `ERROR` level only.

<table><thead><tr><th width="206">Environment Variable</th><th>Description</th></tr></thead><tbody><tr><td><code>SL_DEBUG</code></td><td>Enables agent logging when set to <code>true</code>. Required for any log output beyond errors.</td></tr><tr><td><code>SL_LOG_LEVEL</code></td><td>Sets the log verbosity: <code>DEBUG</code>, <code>INFO</code>, <code>WARN</code>, <code>ERROR</code> (default: <code>ERROR</code>). Takes effect only when <code>SL_DEBUG=true</code>.</td></tr><tr><td><code>SL_SAVE_LOG_FILE</code></td><td>Persists log output to <code>sealights-python-agent.log</code> when set to <code>true</code>. By default, output is written to <code>stdout</code> only.</td></tr></tbody></table>

{% hint style="info" %}
Enable `SL_DEBUG=true` first, then use `SL_LOG_LEVEL` to control verbosity. Setting `SL_LOG_LEVEL` alone without `SL_DEBUG=true` has no effect.
{% endhint %}

{% tabs %}
{% tab title="Bash" %}
{% code overflow="wrap" %}

```bash
export SL_DEBUG=true
export SL_LOG_LEVEL=DEBUG        # DEBUG | INFO | WARN | ERROR (default: ERROR)
export SL_SAVE_LOG_FILE=true     # Optional: persist logs to sealights-python-agent.log
```

{% endcode %}
{% endtab %}

{% tab title="GitHub Actions" %}
{% code overflow="wrap" %}

```yaml
- name: Run tests with SeaLights logging enabled
  env:
    SL_DEBUG: "true"
    SL_LOG_LEVEL: DEBUG           # DEBUG | INFO | WARN | ERROR (default: ERROR)
    SL_SAVE_LOG_FILE: "true"      # Optional: persist logs to sealights-python-agent.log
  run: |
    sl-python run ...
```

{% endcode %}
{% endtab %}

{% tab title="PowerShell" %}
{% code overflow="wrap" %}

```powershell
$env:SL_DEBUG         = "true"
$env:SL_LOG_LEVEL     = "DEBUG"   # DEBUG | INFO | WARN | ERROR (default: ERROR)
$env:SL_SAVE_LOG_FILE = "true"    # Optional: persist logs to sealights-python-agent.log
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions: 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:

```
GET https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/python-agent/command-reference.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
