Reference · 3 min read
Environment variables
Environment variables Miton reads at startup — development overrides, provider keys, and paths. Most configuration belongs in Settings instead.
- Product stage
- Pre-release development
- Last reviewed
- 2026-07-23
- Successful result
- The change is visible in the active project.
Who this is for: developers and power users who configure Miton from a shell, CI job, or .env
file rather than the Settings UI.
Prefer Settings for everyday options (model defaults, budgets, Studio port). Environment variables override file settings only where noted below.
Copy the repository’s .env.example to .env for local development.
Provider keys (BYOK)
Standard provider env vars are read for development convenience. In normal use, store keys in the app’s keychain via Settings → Models.
| Variable | Purpose |
|---|---|
OPENAI_API_KEY |
OpenAI models |
ANTHROPIC_API_KEY |
Anthropic models |
GOOGLE_API_KEY |
Google Gemini models |
MISTRAL_API_KEY |
Mistral models |
OLLAMA_BASE_URL |
Local Ollama endpoint (default http://localhost:11434) |
CUSTOM_API_BASE_URL |
OpenAI-compatible base URL |
CUSTOM_API_KEY |
Key for the custom endpoint |
Managed proxy (when enabled)
| Variable | Purpose |
|---|---|
MITON_PROXY_URL |
Miton Cloud proxy endpoint |
MITON_PROXY_KEY |
Proxy authentication key |
Development paths and logging
| Variable | Default | Purpose |
|---|---|---|
MITON_LOG_LEVEL |
info |
debug, info, warn, error, or silent |
MITON_CONFIG_DIR |
Platform app-data dir | Alternate config root |
Documented in .env.example; use when running from source or automated tests.
Specialist overrides
| Variable | Purpose |
|---|---|
MITON_AST_GREP_BIN |
Path to ast-grep binary for blueprint tooling |
MITON_PDF_FONTS_DIR |
Custom font directory for PDF export |
MITON_REFERRAL_<PLAN_ID> |
Override affiliate URL for a paid-plan id (upper snake case) |
MITON_BROWSER_CDP_ENDPOINT |
Loopback DevTools endpoint for the browser-automation CDP fallback |
MITON_BROWSER_CDP_ENDPOINT deserves a note, because it is the one variable here that widens what
the agent can reach. Browser automation drives the panel by injecting JavaScript; a page whose
Content-Security-Policy refuses inline scripts drops that injection, and the fallback is to run the
same script over Chrome DevTools Protocol instead. Miton never looks for a DevTools endpoint on its
own — pointing it at one is the whole opt-in, because such an endpoint is total control over
whatever is listening on it. Set it only to the debugging port of Miton’s own browser panel
webview (http://127.0.0.1:9222, or the ws:// URL if you already have it). Non-loopback hosts are
refused, and the fallback only ever evaluates against a page already showing the panel’s current URL
— so aiming it at a browser of your own does not let the agent drive your tabs. Unset, the fallback
is inert and a CSP-blocked action is simply reported as failed.
Override hierarchy
Where an env var is supported:
environment variable → .miton/settings.json → user settings.json → default
Not every Settings field has an env counterpart. If a variable is not listed here, configure it in the UI or project settings file.
Security notes
- Env vars are plain text in the process environment — do not commit
.envwith real keys - Production desktop builds use the OS keychain for secrets
MITON_NON_INTERACTIVEand similar CI flags are for automated test harnesses, not daily desktop use