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

# Environment variables

> TALKVALUE_TOKEN, TALKVALUE_PROFILE, TALKVALUE_API_URL, and the rest of the CLI environment surface.

The CLI reads its configuration from environment variables at startup. They're the right place to set credentials and overrides in CI, Docker, or shell scripts that drive multiple commands.

## Reference

| Variable                 | Description                                                                                                             |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------- |
| `TALKVALUE_TOKEN`        | API token used for every request. When set, it takes precedence over any saved profile and skips `auth login` entirely. |
| `TALKVALUE_PROFILE`      | Name of the saved profile to use as the default. Overridden by `--profile`.                                             |
| `TALKVALUE_API_URL`      | Override the TalkValue data API base URL. Used for staging environments.                                                |
| `TALKVALUE_AUTH_API_URL` | Override the auth server base URL used by `auth login` / token refresh.                                                 |
| `NO_COLOR`               | When set to any value, disables ANSI color in table output. Same as `--no-color`.                                       |
| `FORCE_COLOR`            | When set to any value, forces ANSI color even when stdout is not a TTY (for example, CI logs).                          |

## Order of precedence

For overlapping settings, CLI flags win over environment variables, which win over saved profiles or defaults:

| Setting       | Flag                  | Env var                    | Default                 |
| ------------- | --------------------- | -------------------------- | ----------------------- |
| Auth profile  | `--profile <name>`    | `TALKVALUE_PROFILE`        | Active profile          |
| API base URL  | `--api-url <url>`     | `TALKVALUE_API_URL`        | Built-in production URL |
| Color         | `--no-color`          | `NO_COLOR` / `FORCE_COLOR` | Auto-detect TTY         |
| Output format | `--format` / `--json` | —                          | Auto-detect TTY         |

API tokens are the exception. `TALKVALUE_TOKEN` in the environment always overrides any saved profile and has no flag equivalent. See [Authentication](/cli/authentication).

## Common setups

### CI environment

```bash theme={null}
export TALKVALUE_TOKEN=<your-token>
talkvalue path person list --json
```

The token replaces interactive login. Store it in your CI provider's secret store.

### Docker

```dockerfile theme={null}
ENV TALKVALUE_TOKEN=<your-token>
RUN talkvalue path overview --json > /tmp/overview.json
```

Inject the token at build or run time depending on your secrets workflow.

### Multiple profiles in one shell

```bash theme={null}
export TALKVALUE_PROFILE=staging
talkvalue path person list             # staging org
talkvalue path person list --profile prod   # prod org for this command only
```

### Staging API

```bash theme={null}
export TALKVALUE_API_URL=https://staging.example.trytalkvalue.com
export TALKVALUE_AUTH_API_URL=https://staging-auth.example.trytalkvalue.com
talkvalue auth login
```

## Related

* [Authentication](/cli/authentication). `TALKVALUE_TOKEN` vs profiles, precedence rules.
* [Global flags](/cli/global-flags). Flag equivalents for the env vars above.
* [Output format](/cli/output-format). How color and format auto-detection work.
