Environment Variables
Uneven Agent needs credentials to connect to AI providers (API keys, endpoints, etc.). You can provide them in three ways — pick whichever fits your workflow. There is no single "right" method.
/export — Set Variables from the Chat
The fastest way to register a credential without leaving the agent. The variable is saved to a secure global environment file managed by Uneven Agent and is available immediately in the current session and all future ones.
/export <KEY> <value> — Inline syntax
/export ANTHROPIC_API_KEY sk-ant-... /export OPENAI_API_KEY=sk-proj-... /export GEMINI_API_KEY 'AIza...'
/export <KEY> — Interactive prompt
Omit the value and you will be prompted to type it — useful when you want to avoid the key appearing in your terminal history:
/export ANTHROPIC_API_KEY # › Enter the value for ANTHROPIC_API_KEY (or press Enter to cancel): # › •••••••••••••••••••• # ✓ ANTHROPIC_API_KEY saved successfully to the global environment!
Other Ways to Provide Variables
Uneven Agent reads environment variables from multiple sources in order of precedence. Any of the methods below works exactly the same as /export.
Terminal session export
Set a variable in your shell before starting the agent. It will be picked up automatically:
export ANTHROPIC_API_KEY=sk-ant-... uneven
.env file at the project root
Create a .env file at the root of your project. Uneven Agent loads it automatically on startup — no extra configuration required:
ANTHROPIC_API_KEY=sk-ant-... OPENAI_API_KEY=sk-proj-... GEMINI_API_KEY=AIza...
.env to your .gitignore to keep credentials out of your repository.Comparison
| Method | Scope | Persists after restart | Best for |
|---|---|---|---|
/export in chat | Global (all projects) | ✅ Yes | Quick setup without leaving the agent |
Terminal export | Current shell session only | ❌ No | Temporary or CI/CD use |
.env file | Current project only | ✅ Yes | Per-project credentials shared with the team (via secrets manager) |