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

# Environment variables

> Every environment variable Pitboard reads, on which systems, and what each changes.

The command line reads your shell's environment. The app reads the one it was started with, not a terminal's: on macOS what launchd gives, which `launchctl setenv` adds to, and on Windows your account's and the machine's variables. Daily renewal gets its scheduler's, plus what [`schedule`](https://docs.usepitboard.com/reference/maintenance-commands#schedule) gives it.

A variable that names a folder must hold a full path: [`home_not_absolute`](https://docs.usepitboard.com/reference/errors#the-pitboard-directory) lists which may be empty. On Windows, a variable's name has no case: `PATH` and `Path` are one variable.

## Variables

| Variable | Systems | Read by | Effect |
| - | - | - | - |
| `HOME` | macOS, Linux | Both | Your home, the `~` in every path of [Files](https://docs.usepitboard.com/reference/files.md). Unset, your account's home. Where it names another folder than your account's own, Pitboard leaves Claude Desktop alone: see [Claude Desktop files](https://docs.usepitboard.com/reference/files.md#claude-desktop-files). |
| `USERPROFILE` | Windows | Both | Your home, as `HOME` is elsewhere. Pitboard's directory and Claude Code's files are found from it. Unset, your account's profile folder. The app looks for `claude` and `codex` in `scoop\shims` there. |
| `PITBOARD_HOME` | All | Both | [Pitboard's directory](https://docs.usepitboard.com/reference/files.md#the-pitboard-directory), in place of `~/.pitboard`, or `%USERPROFILE%\AppData\Local\Pitboard` on Windows. Daily renewal renews the default directory whatever this says. |
| `PITBOARD_NO_ARGV` | macOS | Both | `1`: Pitboard never writes a login on `security`'s argument line. See [Large logins on macOS](https://docs.usepitboard.com/security.md#large-logins-on-macos). On Windows it changes nothing, and `pitboard doctor` warns while it is set. |
| `PITBOARD_API_BASE` | All | Both | For Pitboard's tests. An `http` URL on a loopback IP address gets Pitboard's requests. |
| `PITBOARD_CLAUDE`, `PITBOARD_CODEX`, `PITBOARD_AGY` | All | Both | The `claude`, `codex` or `agy` program to sign in with, in place of the one Pitboard finds. Empty counts as unset. |
| `CLAUDE_CONFIG_DIR` | All | Both | Claude Code's config directory, in place of `~/.claude`. The config file, `.credentials.json`, the locks and `settings.json` follow it, and the keychain or Credential Manager item's name gains a suffix. |
| `CLAUDE_SECURESTORAGE_CONFIG_DIR` | All | Both | The directory that holds `.credentials.json` and the locks and picks the item's suffix, in place of the config directory. Set but empty: `~/.claude` and `Claude Code-credentials`. |
| `CLAUDE_CODE_FORCE_WINDOWS_CREDMAN` | Windows | Both | `1`: Claude Code keeps its login in Credential Manager, with `.credentials.json` behind it, as [Use Pitboard with Claude Code](https://docs.usepitboard.com/guides/claude-code.md#before-you-add-a-claude-code-account) says. Read from the environment and from the `env` of Claude Code's settings. |
| `CLAUDE_CODE_GIT_BASH_PATH` | Windows | Both | The Git Bash that Claude Code runs its status line in, which `pitboard doctor`'s `status line` check names. |
| `USER` | macOS | Both | The keychain account of Claude Code's item and of parked logins. Unset or empty, your login name. With a character other than letters, digits, `.`, `_` and `-`, `claude-code-user`. |
| `USERNAME` | Windows | Both | Your user name, which `pitboard doctor --json` hides. |
| `CLAUDE_CODE_CUSTOM_OAUTH_URL` | All | Both | Not empty: Pitboard does not act on Claude Code. See [Custom OAuth endpoint](#custom-oauth-endpoint). |
| `ANTHROPIC_API_KEY` and nine more | All | Both | Not empty: Claude Code ignores the login Pitboard switches. See [Variables that override the login](#variables-that-override-the-login). |
| `ANTHROPIC_PROFILE`, `ANTHROPIC_FEDERATION_RULE_ID`, `ANTHROPIC_ORGANIZATION_ID` | All | Both | Can make Claude Code sign in with an Anthropic profile, not the login Pitboard switches. See [Anthropic profiles](#anthropic-profiles). |
| `ANTHROPIC_CONFIG_DIR` | All | Both | The folder that holds Claude Code's [Anthropic profiles](#anthropic-profiles). |
| `XDG_CONFIG_HOME` | macOS, Linux | Both | Its `anthropic` folder holds Claude Code's [Anthropic profiles](#anthropic-profiles) while `ANTHROPIC_CONFIG_DIR` is unset. On Linux, where it names a full path, its `systemd/user` folder holds the units of the [renewal schedule](https://docs.usepitboard.com/reference/files.md#renewal-schedule) and the [watch service](https://docs.usepitboard.com/reference/files.md#watch-service). |
| `XDG_RUNTIME_DIR` | Linux | Command line | Where Pitboard finds the session bus, at `bus`, while `DBUS_SESSION_BUS_ADDRESS` is unset. A relative one counts as unset. |
| `WAYLAND_DISPLAY`, `DISPLAY`, `SSH_CONNECTION` | Linux | Command line | Pitboard asks to unlock a locked [login keyring](https://docs.usepitboard.com/reference/files.md#parked-logins) only where `WAYLAND_DISPLAY` or `DISPLAY` is set and `SSH_CONNECTION` is not, as in a terminal of your desktop session. Elsewhere it stops with `credential_store_locked`. Empty counts as unset. |
| `DBUS_SESSION_BUS_ADDRESS` | Linux | Command line | The session bus, where Pitboard reaches your user's systemd and the Secret Service that keeps [parked logins](https://docs.usepitboard.com/reference/files.md#parked-logins). Empty counts as unset. |
| `CLAUDE_CODE_HOVER_REST` | All | Both | `1` or `true`: `pitboard doctor`'s `storage v5` check reads as on. Measured in 2.1.278, the login stays in the keychain. |
| `CODEX_HOME` | All | Both | Codex's directory, in place of `~/.codex`, or on Windows `.codex` in your profile folder. Empty counts as unset. On Windows, one that names no folder stops Codex, and Pitboard refuses with `codex_home_missing`. |
| `CODEX_INSTALL_DIR` | Windows | App | Where Codex's installer put `codex`, which the app looks in after the `PATH`. Unset, `Programs\OpenAI\Codex\bin` in `LOCALAPPDATA`. |
| `LOCALAPPDATA` | Windows | Both | `pitboard doctor --json` writes its path as `%LOCALAPPDATA%`. The app looks for `claude` and `codex` in WinGet's links folder there. |
| `APPDATA` | Windows | App | The app looks for `claude` and `codex` in npm's folder there. |
| `ProgramFiles`, `SystemRoot` | Windows | Both | Where `pitboard doctor` looks for PowerShell 7 and Windows PowerShell, which Claude Code runs its status line in. |
| `PATHEXT` | Windows | Both | The extensions a program found on the `PATH` may have, such as `claude.cmd`. |
| `OneDrive`, `OneDriveCommercial`, `OneDriveConsumer` | Windows | Both | Folders OneDrive syncs, which Pitboard's directory may not be in: see [The Pitboard directory](https://docs.usepitboard.com/reference/files.md#the-pitboard-directory). |
| `SUDO_UID` | macOS, Linux | Both | Not empty, as `sudo` sets it: Pitboard refuses every change with `elevated`. See [Pitboard changes nothing as root](https://docs.usepitboard.com/troubleshooting/refused-changes.md#pitboard-changes-nothing-as-root). |
| `PATH` | All | Both | Where `claude` and `codex` are looked for, in directories named from the root. On macOS, the app asks your login shell for its `PATH` instead, and on Windows it reads the `PATH` your account and the machine set: see [Pitboard cannot find a tool](https://docs.usepitboard.com/troubleshooting/accounts.md#pitboard-cannot-find-a-tool). |
| `SHELL` | macOS | App | The login shell the app asks for its `PATH`. Unset or empty, your account's shell. |
| `NO_COLOR` | All | Command line | Not empty: no colour in the output. For the status line, see [`statusline`](https://docs.usepitboard.com/reference/integration-commands#statusline). |
| `CLICOLOR_FORCE` | All | Command line | Not empty: colour in the output to a file or a pipe too, as [Output](https://docs.usepitboard.com/reference/commands#output) says. `NO_COLOR` wins. |
| `XPC_SERVICE_NAME` | macOS | Command line | Set by launchd. `com.datlechin.pitboard.renew` marks a run of daily renewal. |
| `WSL_DISTRO_NAME` | Linux | Command line | Set by WSL, even empty, as Codex 0.163.0 reads it. `pitboard doctor` says it runs inside WSL, as its `wsl` check. |
| `ALL_PROXY`, `HTTPS_PROXY`, `HTTP_PROXY`, `NO_PROXY`, each also in lower case | All | Both | The proxy for Pitboard's requests. See [Proxies](#proxies). |

## Custom OAuth endpoint

`CLAUDE_CODE_CUSTOM_OAUTH_URL` counts when set in the environment or in an `env` block of Claude Code's settings. As read in Claude Code 2.1.284 and 2.1.289, Claude Code then keeps its login and config under names Pitboard does not read. Pitboard refuses these with `custom_oauth_endpoint`:

* `enroll`, `use`, `forget`, `rename` and `stow` of a Claude Code account, and the same in the app.
* `repair` and `uninstall`.
* `abandon` of a Claude Code switch, and every change while one is interrupted.

Changes to Codex accounts go ahead. The automatic switch decides nothing for Claude Code, and says so with [`custom_oauth_endpoint`](https://docs.usepitboard.com/reference/automatic-switching#when-it-decides-nothing).

## Variables that override the login

As read in Claude Code 2.1.309, each of these makes Claude Code ignore the login Pitboard switches:

`ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, `CLAUDE_CODE_OAUTH_TOKEN`, `CLAUDE_CODE_USE_BEDROCK`, `CLAUDE_CODE_USE_VERTEX`, `CLAUDE_CODE_USE_FOUNDRY`, `CLAUDE_CODE_USE_GATEWAY`, `CLAUDE_CODE_USE_ANTHROPIC_AWS`, `CLAUDE_CODE_USE_ANTHROPIC_GOOGLE_CLOUD`, `CLAUDE_CODE_USE_MANTLE`.

Pitboard reads them from its environment and from Claude Code's settings, along with `apiKeyHelper` and [Claude Code's remote token files](https://docs.usepitboard.com/reference/files.md#claude-code-files). Managed settings that set `forceLoginMethod` to `gateway`, or name a `forceLoginGatewayUrl`, send every session through the Cloud gateway and count the same way. In your own `settings.json`, those two only aim `/login` at a gateway. While any is set, changes to Claude Code accounts go ahead but warn with `auth_overridden`, as does `pitboard doctor`. The automatic switch holds back. A `forceLoginMethod` of `claudeai` or `console` only chooses how Claude Code signs in, and a session still takes the login Pitboard switches.

## Anthropic profiles

As read in Claude Code 2.1.309, a session signs in with an Anthropic profile before the login Pitboard switches:

* The profile `ANTHROPIC_PROFILE` names, where it signs in with `oidc_federation`, or with `user_oauth` and a login in its credentials file.
* With `ANTHROPIC_PROFILE` unset, the federation `ANTHROPIC_FEDERATION_RULE_ID` and `ANTHROPIC_ORGANIZATION_ID` set together.
* Otherwise the active profile, the one `active_config` names or `default`, where it signs in with `oidc_federation`.

Claude Code keeps the profiles in `configs` in `~/.config/anthropic`, or in `anthropic` in `XDG_CONFIG_HOME`. On Windows, they are in `%APPDATA%\Anthropic`. `ANTHROPIC_CONFIG_DIR` names another folder on every system.

Pitboard reads these variables and `ANTHROPIC_CONFIG_DIR` from the `env` of managed settings, of your own `settings.json` and of `~/.claude.json`, in that order, as Claude Code does, and from its own environment where none sets them. A project's settings and a `--settings` file can set them too, and Pitboard does not read those. A profile counts as a [variable that overrides the login](#variables-that-override-the-login) does.

## Proxies

Pitboard's requests go through the proxy these variables name. It does not read the system's proxy settings. On Windows, `pitboard doctor` says where Windows' proxy settings send Codex's requests while `HTTPS_PROXY` is unset.

* Pitboard reads `ALL_PROXY`, `all_proxy`, `HTTPS_PROXY`, `https_proxy`, `HTTP_PROXY`, then `http_proxy`, and takes the first that holds a proxy's address.
* An address with no scheme is `http://`.
* Pitboard goes through `http://` and `https://` proxies, not SOCKS ones: `socks://`, `socks4://`, `socks4a://`, `socks5://` and `socks5h://`.
* While a SOCKS proxy is named, each request to a host outside `NO_PROXY` fails before anything is sent, naming the variable.
* Pitboard then follows no redirect.

`NO_PROXY` lists the hosts Pitboard reaches directly, separated by commas. Pitboard reads `no_proxy` only while `NO_PROXY` is unset. Entries ignore case, and a space is part of an entry.

| Entry | Hosts it names |
| - | - |
| `*` | Every host |
| `*example.com` | Every host ending with `example.com`, `badexample.com` included |
| `.example.com` | Every host ending with `.example.com` |
| `api*` | Every host starting with `api` |
| `10.` | Every host starting with `10.` |
| Anything else | That host alone |

Pitboard reaches these hosts without looking up the proxy's name, which need not resolve.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.