Problem
The existing Environment Variables docs page covers workflow-level env: scopes and precedence, which is useful for workflow authors. However, there is no centralized reference for the CLI-side and operator-facing environment variables that configure the gh aw tool itself.
These variables are scattered across source code with inline comments (pkg/constants/engine_constants.go, pkg/workflow/features.go, pkg/workflow/action_mode.go, pkg/logger/logger.go, pkg/console/accessibility.go, pkg/cli/update_check.go, etc.) but are not surfaced in any user-facing documentation.
A contributor or operator who wants to know "how do I enable debug logging?" or "how do I override the action mode?" must grep the source code.
Variables Missing from Docs
CLI behavior & debugging
| Variable |
Purpose |
Default |
Source |
DEBUG |
npm-style pattern debug logging (e.g., DEBUG=*, DEBUG=cli:*,workflow:*) |
disabled |
pkg/logger/logger.go:59 |
DEBUG_COLORS |
Set to "0" to disable color in debug output |
"1" (colors on) |
pkg/logger/logger.go:30 |
GH_AW_MCP_SERVER |
If set, disables update checks (detects MCP server subprocess) |
unset |
pkg/cli/update_check.go:97 |
GH_AW_ACTION_MODE |
Override action mode: dev, release, script, or action |
auto-detected |
pkg/workflow/action_mode.go:75 |
GH_AW_FEATURES |
Comma-separated experimental feature flags |
empty (all off) |
pkg/workflow/features.go:56 |
GH_AW_MAX_CONCURRENT_DOWNLOADS |
Max parallel log/artifact downloads |
unspecified |
pkg/cli/logs_orchestrator.go via envutil.GetIntFromEnv() |
ACCESSIBLE |
Non-empty enables accessibility mode (no animations/spinners) |
empty |
pkg/console/accessibility.go:16 |
NO_COLOR |
Disable colored output (https://no-color.org/) |
empty |
pkg/console/accessibility.go:18 |
Model overrides
| Variable |
Purpose |
Source |
GH_AW_MODEL_AGENT_COPILOT |
Default Copilot model for agent runs |
engine_constants.go:159 |
GH_AW_MODEL_AGENT_CLAUDE |
Default Claude model for agent runs |
engine_constants.go:161 |
GH_AW_MODEL_AGENT_CODEX |
Default Codex model for agent runs |
engine_constants.go:163 |
GH_AW_MODEL_AGENT_GEMINI |
Default Gemini model for agent runs |
engine_constants.go:167 |
GH_AW_MODEL_DETECTION_COPILOT |
Default Copilot model for threat detection |
engine_constants.go:169 |
GH_AW_MODEL_DETECTION_CLAUDE |
Default Claude model for threat detection |
engine_constants.go:171 |
GH_AW_MODEL_DETECTION_CODEX |
Default Codex model for threat detection |
engine_constants.go:173 |
GH_AW_MODEL_DETECTION_GEMINI |
Default Gemini model for threat detection |
engine_constants.go:175 |
Guard policy fallbacks
| Variable |
Purpose |
Format |
Source |
GH_AW_GITHUB_BLOCKED_USERS |
Fallback for tools.github.blocked-users |
comma/newline-separated usernames |
engine_constants.go:216 |
GH_AW_GITHUB_APPROVAL_LABELS |
Fallback for tools.github.approval-labels |
comma/newline-separated label names |
engine_constants.go:222 |
GH_AW_GITHUB_TRUSTED_USERS |
Fallback for tools.github.trusted-users |
comma/newline-separated usernames |
engine_constants.go:228 |
Engine secrets (already documented in setup wizard, but not on this page)
| Variable |
Engine |
Source |
COPILOT_GITHUB_TOKEN |
GitHub Copilot |
engine_constants.go:52 |
ANTHROPIC_API_KEY |
Claude |
engine_constants.go:60 |
OPENAI_API_KEY / CODEX_API_KEY |
Codex |
engine_constants.go:69-70 |
GEMINI_API_KEY |
Gemini |
engine_constants.go:78 |
GH_AW_GITHUB_TOKEN |
System (cross-repo ops, user identity) |
engine_constants.go:95 |
GH_AW_AGENT_TOKEN |
System (agent/bot assignment) |
engine_constants.go:101 |
GH_AW_GITHUB_MCP_SERVER_TOKEN |
System (isolated MCP permissions) |
engine_constants.go:107 |
Implementation Plan
-
Extend docs/src/content/docs/reference/environment-variables.md with three new sections after the existing "System-Injected Runtime Variables" section:
- "CLI Configuration Variables" —
DEBUG, DEBUG_COLORS, ACCESSIBLE, NO_COLOR, GH_AW_ACTION_MODE, GH_AW_FEATURES, GH_AW_MAX_CONCURRENT_DOWNLOADS, GH_AW_MCP_SERVER
- "Model Override Variables" — all
GH_AW_MODEL_* vars, with a note that these override model selection from workflow frontmatter
- "Guard Policy Fallback Variables" —
GH_AW_GITHUB_BLOCKED_USERS, GH_AW_GITHUB_APPROVAL_LABELS, GH_AW_GITHUB_TRUSTED_USERS, with a note that these are fallbacks when the corresponding frontmatter field is omitted
-
Add a cross-reference from the "Engine Secrets" section of the setup docs to the new environment variables page.
-
Add a "Related Documentation" entry in the existing page pointing to:
- Engine Configuration reference
- Guard Policies / Tools reference for policy fallback context
-
Format each variable entry with: name, type/format, default, description, and which scope it applies to (CLI-only, Actions-only, or both).
Why This Matters
- Users cannot discover
DEBUG=* for troubleshooting without reading source
- Model overrides via env vars are the only way to change models outside frontmatter (useful for org-wide defaults via Actions variables) but are undocumented
- Guard policy fallback variables are a key security feature for org admins but require reading
engine_constants.go to learn about
Problem
The existing Environment Variables docs page covers workflow-level
env:scopes and precedence, which is useful for workflow authors. However, there is no centralized reference for the CLI-side and operator-facing environment variables that configure thegh awtool itself.These variables are scattered across source code with inline comments (
pkg/constants/engine_constants.go,pkg/workflow/features.go,pkg/workflow/action_mode.go,pkg/logger/logger.go,pkg/console/accessibility.go,pkg/cli/update_check.go, etc.) but are not surfaced in any user-facing documentation.A contributor or operator who wants to know "how do I enable debug logging?" or "how do I override the action mode?" must grep the source code.
Variables Missing from Docs
CLI behavior & debugging
DEBUGDEBUG=*,DEBUG=cli:*,workflow:*)pkg/logger/logger.go:59DEBUG_COLORS"0"to disable color in debug output"1"(colors on)pkg/logger/logger.go:30GH_AW_MCP_SERVERpkg/cli/update_check.go:97GH_AW_ACTION_MODEdev,release,script, oractionpkg/workflow/action_mode.go:75GH_AW_FEATURESpkg/workflow/features.go:56GH_AW_MAX_CONCURRENT_DOWNLOADSpkg/cli/logs_orchestrator.goviaenvutil.GetIntFromEnv()ACCESSIBLEpkg/console/accessibility.go:16NO_COLORpkg/console/accessibility.go:18Model overrides
GH_AW_MODEL_AGENT_COPILOTengine_constants.go:159GH_AW_MODEL_AGENT_CLAUDEengine_constants.go:161GH_AW_MODEL_AGENT_CODEXengine_constants.go:163GH_AW_MODEL_AGENT_GEMINIengine_constants.go:167GH_AW_MODEL_DETECTION_COPILOTengine_constants.go:169GH_AW_MODEL_DETECTION_CLAUDEengine_constants.go:171GH_AW_MODEL_DETECTION_CODEXengine_constants.go:173GH_AW_MODEL_DETECTION_GEMINIengine_constants.go:175Guard policy fallbacks
GH_AW_GITHUB_BLOCKED_USERStools.github.blocked-usersengine_constants.go:216GH_AW_GITHUB_APPROVAL_LABELStools.github.approval-labelsengine_constants.go:222GH_AW_GITHUB_TRUSTED_USERStools.github.trusted-usersengine_constants.go:228Engine secrets (already documented in setup wizard, but not on this page)
COPILOT_GITHUB_TOKENengine_constants.go:52ANTHROPIC_API_KEYengine_constants.go:60OPENAI_API_KEY/CODEX_API_KEYengine_constants.go:69-70GEMINI_API_KEYengine_constants.go:78GH_AW_GITHUB_TOKENengine_constants.go:95GH_AW_AGENT_TOKENengine_constants.go:101GH_AW_GITHUB_MCP_SERVER_TOKENengine_constants.go:107Implementation Plan
Extend
docs/src/content/docs/reference/environment-variables.mdwith three new sections after the existing "System-Injected Runtime Variables" section:DEBUG,DEBUG_COLORS,ACCESSIBLE,NO_COLOR,GH_AW_ACTION_MODE,GH_AW_FEATURES,GH_AW_MAX_CONCURRENT_DOWNLOADS,GH_AW_MCP_SERVERGH_AW_MODEL_*vars, with a note that these override model selection from workflow frontmatterGH_AW_GITHUB_BLOCKED_USERS,GH_AW_GITHUB_APPROVAL_LABELS,GH_AW_GITHUB_TRUSTED_USERS, with a note that these are fallbacks when the corresponding frontmatter field is omittedAdd a cross-reference from the "Engine Secrets" section of the setup docs to the new environment variables page.
Add a "Related Documentation" entry in the existing page pointing to:
Format each variable entry with: name, type/format, default, description, and which scope it applies to (CLI-only, Actions-only, or both).
Why This Matters
DEBUG=*for troubleshooting without reading sourceengine_constants.goto learn about