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

# CLI auth troubleshooting

> Debug Atoll CLI profiles, environment variables, organization selection, team/project defaults, and JSON mode.

## Check current auth

```bash theme={null}
atoll auth status
atoll config show
```

`config show` reports where each value came from.

## List profiles

```bash theme={null}
atoll auth profiles
```

## Switch profile

```bash theme={null}
atoll auth use agent-a
```

Run a command as another profile without switching:

```bash theme={null}
atoll --profile agent-b issue list
```

If a named profile has no org ID, resource commands fail before making org-scoped requests. Fix it with `atoll config set-org org-uuid --profile agent-b` or pass `--org-id org-uuid` for that command.

## Override org or team

```bash theme={null}
atoll --org-id org-uuid issue list
atoll --team engineering issue list
```

## Environment variables

Profiles are the default persistent configuration for developer and agent machines. Env vars are still supported for CI, containers, and one-off commands, but they must be explicit on multi-profile machines:

```bash theme={null}
ATOLL_ENV_MODE=1 ATOLL_API_KEY=sk_atoll_... ATOLL_ORG_ID=org-uuid atoll issue list
atoll --env-mode issue list
```

If a command reports a context conflict, either choose a profile or remove stale env vars:

```bash theme={null}
unset ATOLL_PROFILE
unset ATOLL_API_KEY
unset ATOLL_ORG_ID
unset ATOLL_TEAM
unset ATOLL_PROJECT
unset ATOLL_BASE_URL
unset ATOLL_ENV_MODE
```

## JSON mode surprises

When using `--json`, diagnostics and errors go to stderr. Parse stdout only.

```bash theme={null}
atoll --json issue list > issues.json
```
