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

# Client configuration

> Environment variables and value order for the agentsfleet client.

# Client configuration

## Synopsis

The client reads command options, environment variables, saved login data, and built-in defaults. A value earlier in the documented order wins.

For authentication, `AGENTSFLEET_API_KEY` overrides the saved login token. The `login` command accepts `--token`, piped input, or browser approval.

## Example with output

```bash theme={"theme":"vesper"}
AGENTSFLEET_API_URL=https://api.agentsfleet.net agentsfleet --version
```

```text theme={"theme":"vesper"}
<varies>
```

## Options

| Name                             | Effect                                                      | Default                       | Valid range                                |
| -------------------------------- | ----------------------------------------------------------- | ----------------------------- | ------------------------------------------ |
| `AGENTSFLEET_API_URL`            | Sets the API base URL.                                      | `https://api.agentsfleet.net` | URL beginning with `http://` or `https://` |
| `AGENTSFLEET_DASHBOARD_URL`      | Sets the browser login URL.                                 | `https://app.agentsfleet.net` | URL beginning with `http://` or `https://` |
| `AGENTSFLEET_API_KEY`            | Authenticates every request and overrides saved login data. | None                          | Valid tenant API key                       |
| `AGENTSFLEET_STATE_DIR`          | Stores local credentials, settings, and telemetry consent.  | `~/.config/agentsfleet`       | Writable directory path                    |
| `NO_COLOR`                       | Disables coloured output when set to `1`.                   | Unset                         | `1` or unset                               |
| `AGENTSFLEET_TELEMETRY_DISABLED` | Disables usage telemetry when set to `1`.                   | Unset                         | `1` or unset                               |
| `DO_NOT_TRACK`                   | Disables usage telemetry when set to `1`.                   | Unset                         | `1` or unset                               |
| `AGENTSFLEET_TELEMETRY_DEBUG`    | Prints telemetry details to standard error when set to `1`. | Unset                         | `1` or unset                               |

The API URL uses this order: `--api`, `AGENTSFLEET_API_URL`, `.env.local`, then the built-in URL.

## Errors

An invalid URL returns exit code `4`. A missing token returns exit code `1`.

A network failure returns exit code `2`. The client does not change saved login data after a network failure.

Do not put tokens in command history. Use `AGENTSFLEET_API_KEY` through your secret manager for unattended commands.

## Related pages

* [Global options](/cli/flags)
* [Command index](/cli/agentsfleet)
* [Install the client](/cli/install)
