// Reference

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

chat
/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:

chat
/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!
🔒/export is safe to use. The value is stored only in Uneven Agent's local global environment file on your machine — it is never sent to any server and never appears in version control.

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:

terminal
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:

.env
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-proj-...
GEMINI_API_KEY=AIza...
💡Add .env to your .gitignore to keep credentials out of your repository.

Comparison

MethodScopePersists after restartBest for
/export in chatGlobal (all projects)✅ YesQuick setup without leaving the agent
Terminal exportCurrent shell session only❌ NoTemporary or CI/CD use
.env fileCurrent project only✅ YesPer-project credentials shared with the team (via secrets manager)