Environment Variables
Complete reference of all environment variables
Environment Variables
Complete reference of all environment variables supported by Clotion.
Notion Integration
| Variable | Required | Default | Description |
|---|
NOTION_API_KEY | Yes | - | Notion integration token (starts with secret_) |
NOTION_DATABASE_ID | Yes | - | 32-character database ID |
NOTION_STATUS_BACKLOG | No | Backlog | Status name for backlog items |
NOTION_STATUS_TODO | No | Todo | Status name that triggers task pickup |
NOTION_STATUS_IN_PROGRESS | No | In Progress | Status name while working |
NOTION_STATUS_IN_REVIEW | No | In Review | Status name after PR creation |
NOTION_STATUS_DONE | No | Done | Status name for completion |
Repository
| Variable | Required | Default | Description |
|---|
REPO_PATH | Yes | - | Absolute path to git repository |
WORKTREES_DIR | No | {REPO_PATH}/.worktrees | Directory for git worktrees |
BASE_BRANCH | No | main | Branch to create PRs against |
Polling
| Variable | Required | Default | Description |
|---|
POLL_INTERVAL | No | 10 | Seconds between database polls |
COMMENT_POLL_INTERVAL | No | 30 | Seconds between comment polls for blocked tasks |
Task Management
| Variable | Required | Default | Description |
|---|
MAX_CONCURRENT_TASKS | No | 5 | Maximum parallel tasks |
BLOCKED_TIMEOUT | No | 3600 | Seconds before blocked task times out |
TASK_TIMEOUT | No | 7200 | Maximum seconds for a single task |
Claude Code
| Variable | Required | Default | Description |
|---|
CLAUDE_MODEL | No | (default) | Model to use for Claude Code |
CLAUDE_MAX_TOKENS | No | (default) | Max tokens per response |
Database
| Variable | Required | Default | Description |
|---|
DATABASE_PATH | No | clotion.db | Path to SQLite database |
Logging
| Variable | Required | Default | Description |
|---|
LOG_LEVEL | No | INFO | Logging level |
LOG_FORMAT | No | text | Log format (text or json) |
LOG_FILE | No | - | File to write logs (optional) |
Example .env File
# Required
NOTION_API_KEY=secret_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
NOTION_DATABASE_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
REPO_PATH=/Users/yourname/projects/myapp
# Optional - Notion Status Names
NOTION_STATUS_BACKLOG=Backlog
NOTION_STATUS_TODO=Todo
NOTION_STATUS_IN_PROGRESS=In Progress
NOTION_STATUS_IN_REVIEW=In Review
NOTION_STATUS_DONE=Done
# Optional - Polling
POLL_INTERVAL=10
COMMENT_POLL_INTERVAL=30
# Optional - Task Management
MAX_CONCURRENT_TASKS=3
BLOCKED_TIMEOUT=7200
TASK_TIMEOUT=14400
# Optional - Repository
BASE_BRANCH=main
# Optional - Logging
LOG_LEVEL=INFO
Environment Variable Priority
Variables are loaded in this order (later overrides earlier):
- System environment variables
.env file in current directory
.env file in ~/.config/clotion/
- Command-line arguments
Security Notes
- Never commit
.env files to version control
- Use secrets management in production
- Rotate API keys periodically
- Keep your Notion integration token private
Differences from Claudear
If you're migrating from Claudear (Linear-based), note these changes:
| Claudear | Clotion |
|---|
LINEAR_API_KEY | NOTION_API_KEY |
LINEAR_WEBHOOK_SECRET | Not needed |
LINEAR_TEAM_ID | NOTION_DATABASE_ID |
LINEAR_STATE_* | NOTION_STATUS_* |
NGROK_AUTHTOKEN | Not needed |
WEBHOOK_PORT | Not needed |
WEBHOOK_HOST | Not needed |
Clotion uses polling instead of webhooks, so ngrok and webhook configuration are not required.