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

# Environment Variables

> Configure the LoomLoom CLI through environment variables.

| Variable            | Required                       | Description                                                                                             |
| ------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------- |
| `LOOMLOOM_SERVER`   | Yes for a new setup            | Full HTTPS base URL for the intended environment                                                        |
| `LOOMLOOM_TOKEN`    | Yes for authenticated commands | Bearer token issued for that exact environment and platform                                             |
| `LOOMLOOM_PLATFORM` | No                             | Platform selection: `shengsuanyun` or `cogfoundry`; current executable service flows use `shengsuanyun` |
| `LOOMLOOM_VERBOSE`  | No                             | Go-style boolean that enables debug logs on stderr                                                      |

Configure the current production service:

```bash theme={null}
export LOOMLOOM_SERVER="https://loomloom.shengsuanyun.com/loom/v1"
export LOOMLOOM_TOKEN="<your-api-key>"
```

## Precedence

For the server, resolution order is:

1. `--server`
2. `LOOMLOOM_SERVER`
3. Legacy `BATCHJOB_SERVER`
4. The last verified server remembered by the CLI

For the token, resolution order is:

1. `--token`
2. `LOOMLOOM_TOKEN`
3. Legacy `BATCHJOB_TOKEN`

New setups should use only `LOOMLOOM_*`. The remembered local state contains platform/server information, not your bearer token.

## Process-scoped configuration

Set variables for a single command when you do not want to persist them:

```bash theme={null}
LOOMLOOM_SERVER="https://loomloom.shengsuanyun.com/loom/v1" \
LOOMLOOM_TOKEN="<your-api-key>" \
loomloom doctor --output json
```

Do not commit shell profiles or environment files containing real tokens. For `text` versus `json`, timeout, and verbose overrides, see [Command help](/developer-reference/loomloom-cli/command-help).
