Skip to main content

Global Configuration

The global configuration file stores user-level defaults that apply across all workspaces and projects. It is the lowest-priority file-based configuration source (above environment variables and built-in defaults).

File Location

~/.config/dorgu/config.yaml

Creating the Global Config

dorgu init --global
This creates the global config file with sensible defaults and walks you through setting your LLM provider and API key.

Managing via CLI

Dorgu provides the dorgu config subcommand for managing global configuration without editing the file directly.
# List all config values
dorgu config list

# Get a specific key
dorgu config get llm.provider

# Set a value
dorgu config set llm.provider openai
dorgu config set llm.api_key sk-...

# Show config file path
dorgu config path

# Reset to defaults
dorgu config reset

Configuration Keys

KeyTypeDescriptionExample
llm.providerstringLLM provider for enhanced analysisopenai, anthropic, gemini, ollama
llm.api_keystringAPI key for the configured LLM providersk-...
llm.modelstringModel override (uses provider default if unset)gpt-4, claude-3-sonnet-20240229
defaults.namespacestringDefault Kubernetes namespace for generated manifestsdefault
defaults.registrystringDefault container image registryghcr.io/my-org
defaults.org_namestringOrganization name used in labels and namingmy-company

Example File

llm:
  provider: "openai"
  api_key: "sk-proj-abc123..."
  model: "gpt-4"

defaults:
  namespace: "default"
  registry: "ghcr.io/my-org"
  org_name: "my-company"
The global config file may contain sensitive values such as API keys. Ensure the file has appropriate permissions (chmod 600 ~/.config/dorgu/config.yaml) and do not commit it to version control.

Precedence

Global config values are overridden by:
  1. CLI flags — always highest priority
  2. App .dorgu.yaml — per-application overrides
  3. Workspace .dorgu.yaml — per-workspace overrides
Global config values override:
  1. Environment variables — for most settings (API keys are an exception; env vars take precedence)
  2. Built-in defaults — the lowest priority
For API keys specifically, environment variables (OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.) take precedence over the global config value. This allows you to store a default key in the config but override it per-session or in CI environments.