Complete reference for all OpenQA environment variables.
Quick Setup
Copy the example file and edit it:
cp .env.example .env
# Edit .env with your values
LLM Configuration
| Variable | Default | Description |
|---|
| LLM_PROVIDER | openai | LLM provider: openai, anthropic, or ollama |
| OPENAI_API_KEY | - | OpenAI API key (required if using OpenAI) |
| ANTHROPIC_API_KEY | - | Anthropic API key (required if using Anthropic) |
| OLLAMA_BASE_URL | http://localhost:11434 | Ollama server URL (if using Ollama) |
Target Application
| Variable | Default | Description |
|---|
| SAAS_URL | - | URL of the application to test |
| SAAS_AUTH_TYPE | none | Authentication type: none, basic, or session |
| SAAS_USERNAME | - | Username for authentication |
| SAAS_PASSWORD | - | Password for authentication |
GitHub Integration
| Variable | Default | Description |
|---|
| GITHUB_TOKEN | - | GitHub personal access token |
| GITHUB_OWNER | - | GitHub repository owner/organization |
| GITHUB_REPO | - | GitHub repository name |
GitLab Integration
| Variable | Default | Description |
|---|
| GITLAB_TOKEN | - | GitLab personal access token |
| GITLAB_PROJECT_ID | - | GitLab project ID |
| GITLAB_URL | https://gitlab.com | GitLab instance URL |
Agent Behavior
| Variable | Default | Description |
|---|
| AGENT_INTERVAL_MS | 3600000 | Time between test sessions (ms). Default: 1 hour |
| AGENT_MAX_ITERATIONS | 20 | Maximum actions per test session |
| AGENT_AUTO_START | true | Start testing automatically on launch |
Web UI
| Variable | Default | Description |
|---|
| WEB_PORT | 3000 | Port for the web interface |
| WEB_HOST | 0.0.0.0 | Host to bind the web server |
Database
| Variable | Default | Description |
|---|
| DB_PATH | ./data/openqa.db | Path to SQLite database file |
Git Listener
| Variable | Default | Description |
|---|
| GIT_LISTENER_ENABLED | false | Enable automatic testing on git events |
| GIT_LISTENER_POLL_INTERVAL | 60000 | Polling interval for git events (ms) |
Example .env File
# LLM Configuration
LLM_PROVIDER=openai
OPENAI_API_KEY=sk-your-api-key-here
# Target Application
SAAS_URL=https://your-app.com
SAAS_AUTH_TYPE=session
SAAS_USERNAME=test@example.com
SAAS_PASSWORD=testpassword
# GitHub Integration (Optional)
GITHUB_TOKEN=ghp_your-token
GITHUB_OWNER=your-username
GITHUB_REPO=your-repo
# Agent Behavior
AGENT_INTERVAL_MS=3600000
AGENT_MAX_ITERATIONS=20
AGENT_AUTO_START=true
# Web UI
WEB_PORT=3000
WEB_HOST=0.0.0.0
# Database
DB_PATH=./data/openqa.db
# Git Listener (Optional)
GIT_LISTENER_ENABLED=true
GIT_LISTENER_POLL_INTERVAL=60000
Next Steps