Environment variables
DevBoy supports environment variables as an alternative to OS keychain for credential storage. This enables seamless use in CI/CD pipelines, containerized environments, and cloud workspaces where keychain access may be unavailable.
Credential resolution order
When resolving credentials, DevBoy checks sources in this order:
- Environment variables (highest priority)
DEVBOY_{PROVIDER}_TOKEN(prefixed, explicit){PROVIDER}_TOKEN(unprefixed, fallback)
- OS Keychain (macOS Keychain, Windows Credential Manager, Linux Secret Service)
This means environment variables always take priority over keychain values, allowing you to override credentials in CI/CD without modifying your local setup.
Supported environment variables
Provider tokens
Context-scoped tokens
For multi-context setups, you can set tokens per context:
Proxy server tokens
For upstream MCP server proxies:
Proxy server URLs
You can also define proxy URLs via environment variables (no config file needed):
When both URL and TOKEN are set, DevBoy automatically creates the proxy connection without any config file.
Key to environment variable mapping
DevBoy converts credential keys to environment variable names using these rules:
- Convert to UPPERCASE
- Replace
.,/, and-with_ - Add
DEVBOY_prefix (checked first) - Try without prefix (fallback)
Examples
CI/CD examples
GitHub Actions
GitLab CI
Docker
Docker Compose
Kubernetes
Claude Code / Claude Desktop
Add to ~/.claude/claude_desktop_config.json or project .claude/settings.json:
Note: Use
"command": "devboy"if installed globally vianpm install -g @devboy-tools/cli, or specify the full path like"/path/to/devboy"for local builds.
Full context configuration via environment variables
You can define entire contexts (including provider settings) purely through environment variables, without any config file. This is useful for CI/CD, Docker, and Kubernetes deployments.
Pattern
Supported fields
Examples
GitHub context:
GitLab context:
ClickUp context:
Jira context:
Multiple providers in one context:
Complete env-only setup
Run DevBoy MCP with contexts defined entirely via environment:
Or as a one-liner:
Context naming
Context names are converted from UPPERCASE_WITH_UNDERSCORES to lowercase-with-dashes:
PROD→prodMY_PROJECT→my-projectDEV_TEAM_ALPHA→dev-team-alpha
Context-scoped tokens (with config file)
When using contexts defined in config file, you can still set tokens per context via environment:
Resolution for prod context:
DEVBOY_CONTEXTS_PROD_GITHUB_TOKEN(found, used)(skipped)DEVBOY_GITHUB_TOKENKeychain(skipped)
Resolution for staging context (no context-specific var):
DEVBOY_CONTEXTS_STAGING_GITHUB_TOKEN(not found)DEVBOY_GITHUB_TOKEN(found, used)Keychain(skipped)
Special environment variables
DEVBOY_SKIP_KEYCHAIN
Completely disable keychain access (useful for CI where keychain may hang):
When set to 1 or true:
- Disables OS keychain access completely
- Tokens are only read from environment variables
- Write operations go to in-memory storage (not persisted)
DEVBOY_NO_CONFIG
Skip loading the config file, use only environment variables:
When set to 1 or true:
- Config file (
config.toml) is not loaded - All providers and proxies must be defined via environment variables
- Useful for pure env-only deployments (Docker, Kubernetes, CI)
Alternatively, use the --no-config CLI flag:
Full env-only mode
For completely config-free operation, combine both:
Or as a one-liner:
Security best practices
- Never commit tokens to version control
- Use CI/CD secrets (GitHub Secrets, GitLab CI Variables, etc.)
- Prefer prefixed variables (
DEVBOY_*) to avoid conflicts with other tools - Scope variables to specific jobs/stages when possible
- Rotate tokens regularly
- Use short-lived tokens when available (e.g.,
CI_JOB_TOKENin GitLab)
Troubleshooting
Token not found
If DevBoy can't find your token:
Keychain vs environment variable priority
Environment variables always take priority. If you have a token in both keychain and env var, the env var value is used.
To force using keychain:
CI hangs on keychain access
Some CI environments have a keychain that hangs waiting for user input. Use:
This disables keychain completely and only uses environment variables.