{"name":"GH_CONFIG_DIR","slug":"gh-config-dir","family":"env","title":"Environment variables","noun":"environment variable","description":"Read as a pointer to GitHub CLI credentials: `<GH_CONFIG_DIR>\/hosts.yml`, alongside `~\/.config\/gh\/hosts.yml` and `$XDG_CONFIG_HOME\/gh\/hosts.yml`, is added to the credential file paths collected when Claude Code sets up the Bash sandbox for an evaluation shell grant. A relative value is an error (`GH_CONFIG_DIR holds a relative path`).","description_source":"code","described_by":{"bundle":"2.1.286","author":"claude-opus-5-5"},"presence":{"first_seen":"2.1.261","removed_in":null,"in_current_build":true,"newest_mined":"2.1.288","builds":25,"mined_builds":131,"first_cited":null},"aliases":[],"entries":[],"entries_total":0,"docs":[],"docs_total":0,"gates":[],"related":[{"name":"GH_ENTERPRISE_TOKEN","slug":"gh-enterprise-token","description":"Token Claude Code uses for GitHub API calls to a non-`github.com` host that matches `GH_HOST`, such as the pull request status lookup for the current branch; `GH_ENTERPRISE_TOKEN` is tried before `GITHUB_ENTERPRISE_TOKEN`, and without either it falls back to `gh auth token --hostname <host>`. The auto-mode `gh` queries for repo visibility and branch protection run with it unset, and the agent-proxy `gh` shim runs the real `gh` directly, bypassing the session relay, when it is set."},{"name":"GH_HOST","slug":"gh-host","description":"GitHub Enterprise host name, compared case-insensitively. For a remote whose host matches it, Claude Code's pull request status lookup uses `GH_ENTERPRISE_TOKEN` or `GITHUB_ENTERPRISE_TOKEN` (falling back to `gh auth token --hostname <host>`) and reports a missing `gh` or missing auth; for any other non-`github.com` host it still tries `gh auth token` but skips silently when that gives no token. The auto-mode repo visibility and branch protection `gh` queries force `GH_HOST` to `github.com` (dropping `GH_TOKEN` and `GITHUB_TOKEN` when it named another host), and the agent-proxy `gh` shim runs the real `gh` directly when the target host (from `--hostname`, else `GH_HOST`) is not `github.com`."},{"name":"GH_REPO","slug":"gh-repo","description":"When the GitHub CLI is missing, Claude Code can supply its own limited `gh` that runs `gh api` REST calls through the session's GitHub proxy"},{"name":"GH_TOKEN","slug":"gh-token","description":"gh, aws, gcloud, bq and gsutil get placeholder credentials so they authenticate through the proxy instead of failing."}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/gh-config-dir","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}