> ## Documentation Index
> Fetch the complete documentation index at: https://docs.diffblue.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI reference

> Commands, environment variables, and usage examples for the Diffblue Agents CLI

## Commands

```
diffblue-agents [command] [options]
```

| Command                      | Description                                     |
| ---------------------------- | ----------------------------------------------- |
| `help`                       | Show help message                               |
| `version`                    | Show the version of this application            |
| `workflows`                  | Show available workflows and their requirements |
| `run <NAME or ID> [ARGS...]` | Run a workflow with optional arguments          |
| `install`                    | Configure an AI coding agent interactively      |
| `license`                    | Show license status, licensed agents, and quota |
| `license activate <KEY>`     | Activate a license key                          |
| `license deactivate`         | Deactivate the current license                  |

## Environment variables

| Variable                                     | Description                                                                                                                                                                               | Default     |
| -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| `DIFFBLUE_AGENTS_SERVER_SCHEME`              | Server communication protocol                                                                                                                                                             |             |
| `DIFFBLUE_AGENTS_SERVER_NAME`                | Server host                                                                                                                                                                               | `localhost` |
| `DIFFBLUE_AGENTS_SERVER_PORT`                | Server port override (normally auto-assigned; see `.diffblue/server.json`)                                                                                                                |             |
| `DIFFBLUE_AGENTS_SERVER_REQUEST_TIMEOUT`     | Request timeout in ms                                                                                                                                                                     | `5000`      |
| `DIFFBLUE_AGENTS_JAVA_HOME`                  | Java installation for building and testing target projects                                                                                                                                |             |
| `DIFFBLUE_AGENTS_PLATFORM`                   | Agent platform: `claude`, `copilot`, `gemini`, or `opencode`                                                                                                                              | `claude`    |
| `DIFFBLUE_AGENTS_CLAUDE_CLI_PATH`            | Path to Claude CLI executable                                                                                                                                                             | `claude`    |
| `DIFFBLUE_AGENTS_CLI_MAX_TURNS`              | Max agent turns per CLI invocation (Claude and Copilot only; ignored by Gemini and OpenCode)                                                                                              | `25`        |
| `DIFFBLUE_AGENTS_AGENT_TIMEOUT`              | CLI agent process timeout, ISO-8601                                                                                                                                                       | `PT20M`     |
| `DIFFBLUE_AGENTS_PLANNING_DETECTION_TIMEOUT` | Planning detection step timeout, ISO-8601                                                                                                                                                 | `PT20M`     |
| `DIFFBLUE_AGENTS_TEST_GENERATION_TIMEOUT`    | Per work-unit test generation timeout, ISO-8601                                                                                                                                           | `PT10M`     |
| `DIFFBLUE_AGENTS_PROCESS_TIMEOUT`            | Default subprocess timeout (utility commands), ISO-8601                                                                                                                                   | `PT2M`      |
| `DIFFBLUE_AGENTS_COVERAGE_TEST_TIMEOUT`      | Test execution timeout during coverage measurement, ISO-8601                                                                                                                              | `PT5M`      |
| `DIFFBLUE_AGENTS_COPILOT_CLI_PATH`           | Path to Copilot CLI executable                                                                                                                                                            | `copilot`   |
| `DIFFBLUE_AGENTS_GEMINI_CLI_PATH`            | Path to Gemini CLI executable                                                                                                                                                             | `gemini`    |
| `DIFFBLUE_AGENTS_OPENCODE_CLI_PATH`          | Path to OpenCode CLI executable                                                                                                                                                           | `opencode`  |
| `DIFFBLUE_AGENTS_OPENCODE_MODEL`             | OpenCode model override in `provider/model` form (for example, `anthropic/claude-sonnet-4-6`). When unset, Diffblue Agents picks the first available model from a built-in fallback list. |             |
| `DIFFBLUE_AGENTS_GIT_SIGNING`                | Enable git commit/tag signing                                                                                                                                                             | `true`      |

## Examples

List available workflows:

```bash theme={null}
diffblue-agents workflows
```

Run a workflow:

```bash theme={null}
diffblue-agents run regression-unit-tests
```

Run on a custom server port:

```bash theme={null}
DIFFBLUE_AGENTS_SERVER_PORT=8081 diffblue-agents run regression-unit-tests
```
