Environment Variables
Reference for environment variables that k13d currently reads.
Default config paths are:
| Platform | Default config path |
| Linux | ${XDG_CONFIG_HOME:-~/.config}/k13d/config.yaml |
| macOS | ~/.config/k13d/config.yaml |
| Windows | %AppData%\\k13d\\config.yaml |
Config & Startup
| Variable | Description | Default |
K13D_CONFIG | Override config.yaml path | ~/.config/k13d/config.yaml on macOS, <XDG config home>/k13d/config.yaml otherwise |
K13D_WEB | Start in Web UI mode | false |
K13D_PORT | Web server port | 8080 |
K13D_NAMESPACE | Initial namespace | cluster default |
K13D_ALL_NAMESPACES | Start with all namespaces | false |
KUBECONFIG | Kubeconfig path used by client-go | client-go default |
K13D_KUBECTL_PATH | Absolute path override for the kubectl binary used by AI tool execution | auto-discover from PATH/common locations |
XDG_CONFIG_HOME | XDG config base directory override | platform default |
Authentication
| Variable | Description | Default |
K13D_AUTH_MODE | token, local, ldap, oidc | token |
K13D_NO_AUTH | Disable authentication | false |
K13D_USERNAME | Default admin username for local auth | admin |
K13D_PASSWORD | Default admin password for local auth | random if omitted |
K13D_JWT_SECRET | JWT signing secret | auto-generated if omitted |
K13D_DEFAULT_ROLE | Default TUI RBAC role | admin |
K13D_CORS_ALLOWED_ORIGINS | Extra allowed CORS origins | none |
GitHub Issue Automation
| Variable | Description | Default |
K13D_GITHUB_AUTOMATION_ENABLED | Enable GitHub issue webhook automation | false |
K13D_GITHUB_AUTOMATION_WEBHOOK_SECRET | Shared secret used to validate X-Hub-Signature-256 | none |
K13D_GITHUB_AUTOMATION_TOKEN | GitHub token used for issue comments, PR creation, and PR reviews | none |
K13D_GITHUB_AUTOMATION_REPO_PATH | Local repository path used as the source worktree repo | none |
K13D_GITHUB_AUTOMATION_TRIGGER_LABEL | Label that allows an issue webhook to queue a job | codex:auto |
K13D_GITHUB_AUTOMATION_REQUIRE_ORG_MEMBER | Require issue authors to be members of the repository owner organization | true |
K13D_GITHUB_AUTOMATION_MENTION_ORG_MEMBERS | Mention organization members when a trusted issue is accepted | true |
K13D_GITHUB_AUTOMATION_MENTION_MAX_MEMBERS | Maximum organization members to mention in one issue comment | 20 |
K13D_GITHUB_AUTOMATION_REVIEW_LANGUAGE | Preferred language for built-in issue/PR review comments and command placeholders | ko |
K13D_GITHUB_AUTOMATION_ALLOW_ISSUE_MERGE | Allow trusted issue comments such as k13d merge 해줘 to merge the linked PR | false |
K13D_GITHUB_AUTOMATION_MERGE_METHOD | GitHub merge method for issue merge commands: merge, squash, or rebase | squash |
K13D_GITHUB_AUTOMATION_WAIT_FOR_CI | Wait for GitHub check runs before review/deploy | true |
K13D_GITHUB_AUTOMATION_AUTO_DEPLOY_PREVIEW | Run the configured preview deployment command after CI succeeds | false |
K13D_GITHUB_AUTOMATION_PREVIEW_URL_BASE | Public base URL used when building preview links | none |
K13D_GITHUB_AUTOMATION_PREVIEW_PATH_PREFIX | Path prefix for branch previews on the main Web server | /previews |
K13D_CODEX_BIN | Codex executable used by scripts/run-agent-review.sh | codex |
K13D_CODEX_REVIEW_MODEL | Optional Codex model override used by scripts/run-agent-review.sh | none |
Storage
| Variable | Description | Default |
K13D_DB_PATH | SQLite database path | <XDG config home>/k13d/audit.db |
K13D_NO_DB | Disable DB-backed persistence | false |
Generic LLM Overrides
These variables override config.yaml values directly:
| Variable | Description |
K13D_LLM_PROVIDER | Active LLM provider |
K13D_LLM_MODEL | Active model |
K13D_LLM_ENDPOINT | Custom API endpoint |
K13D_LLM_API_KEY | API key |
Embedded LLM Removal
Embedded LLM support has been removed from the runtime.
- Use
K13D_LLM_PROVIDER=ollama with OLLAMA_HOST for local inference. - Old
K13D_EMBEDDED_* and K13D_DOWNLOAD_MODEL variables are no longer recognized.
Provider-Specific Fallbacks
If api_key or endpoint is not set in config.yaml, the provider factory also checks:
| Variable | Used For |
OPENAI_API_KEY | openai, fallback for upstage/solar |
LITELLM_API_KEY | litellm |
LITELLM_ENDPOINT | litellm endpoint fallback |
LITELLM_BASE_URL | litellm endpoint fallback alias |
UPSTAGE_API_KEY | upstage / solar |
ANTHROPIC_API_KEY | anthropic |
GOOGLE_API_KEY | gemini |
AZURE_OPENAI_API_KEY | azopenai / azure |
AZURE_OPENAI_ENDPOINT | azopenai / azure endpoint |
OLLAMA_HOST | ollama endpoint fallback |
AWS_ACCESS_KEY_ID | bedrock |
AWS_SECRET_ACCESS_KEY | bedrock |
AWS_SESSION_TOKEN | bedrock |
AWS_REGION | bedrock |
Examples
Web UI With Local Auth
export K13D_WEB=true
export K13D_AUTH_MODE=local
export K13D_USERNAME=admin
export K13D_PASSWORD=changeme
k13d
OpenAI Via Environment Only
export K13D_LLM_PROVIDER=openai
export K13D_LLM_MODEL=gpt-4o
export OPENAI_API_KEY=sk-your-key
k13d --web --auth-mode local
Ollama
export K13D_LLM_PROVIDER=ollama
export K13D_LLM_MODEL=gpt-oss:20b
export OLLAMA_HOST=localhost:11434
k13d
LiteLLM Gateway
If you run LiteLLM with Docker, prefer a pinned stable image tag such as ghcr.io/berriai/litellm:v1.82.3-stable.patch.2 instead of a floating latest tag.
export K13D_LLM_PROVIDER=litellm
export K13D_LLM_MODEL=gpt-4o-mini
export LITELLM_ENDPOINT=http://localhost:4000
export LITELLM_API_KEY=your-master-key # optional if proxy auth is disabled
k13d --web
GitHub Issue Automation
export K13D_GITHUB_AUTOMATION_ENABLED=true
export K13D_GITHUB_AUTOMATION_WEBHOOK_SECRET=replace-me
export K13D_GITHUB_AUTOMATION_TOKEN=ghp_xxx
export K13D_GITHUB_AUTOMATION_REPO_PATH=/absolute/path/to/repo
export K13D_GITHUB_AUTOMATION_TRIGGER_LABEL=codex:auto
export K13D_GITHUB_AUTOMATION_REQUIRE_ORG_MEMBER=true
export K13D_GITHUB_AUTOMATION_MENTION_ORG_MEMBERS=true
export K13D_GITHUB_AUTOMATION_MENTION_MAX_MEMBERS=20
export K13D_GITHUB_AUTOMATION_REVIEW_LANGUAGE=ko
export K13D_GITHUB_AUTOMATION_WAIT_FOR_CI=true
export K13D_GITHUB_AUTOMATION_AUTO_DEPLOY_PREVIEW=true
export K13D_GITHUB_AUTOMATION_PREVIEW_URL_BASE=https://fingerscore.net
k13d --web --auth-mode local
Custom Config Path
export K13D_CONFIG=/etc/k13d/config.yaml
k13d --web
Notes
config.yaml values support shell-style placeholders such as ${OPENAI_API_KEY}. - Environment variables override values loaded from
config.yaml. - Web UI startup logs print
Config File, Config Path Source, and Env Overrides, which is useful when debugging unexpected config values. K13D_AUTH_MODE=ldap and K13D_AUTH_MODE=oidc select those auth paths, but the stock binary does not yet expose every provider-specific LDAP/OIDC field as environment variables. - Variables not listed here are not currently wired into the runtime.