Docs/Environment Variables

Environment Variables

Complete reference of all environment variables

Environment Variables

Complete reference of all environment variables supported by Claudear.

Linear Integration

VariableRequiredDefaultDescription
LINEAR_API_KEYYes*-Linear API key for authentication
LINEAR_WEBHOOK_SECRETYes*-Secret for webhook signature verification
LINEAR_TEAM_IDYes*-Single team key (e.g., ENG)
LINEAR_TEAM_IDSNo-Multiple teams, comma-separated (e.g., ENG,INFRA)

*Required if using Linear provider

Per-Team Repository Paths

When using multiple teams, specify a repository for each:

VariableRequiredDescription
LINEAR_{TEAM}_REPOYes*Repository path for team (e.g., LINEAR_ENG_REPO)

*Required when using LINEAR_TEAM_IDS

Linear Workflow States

VariableDefaultDescription
LINEAR_STATE_TODOTodoState name that triggers task pickup
LINEAR_STATE_IN_PROGRESSIn ProgressState name while working
LINEAR_STATE_IN_REVIEWIn ReviewState name after PR creation
LINEAR_STATE_DONEDoneState name for completion

Notion Integration

VariableRequiredDefaultDescription
NOTION_API_KEYYes*-Notion Internal Integration Token
NOTION_DATABASE_IDYes*-Single database ID
NOTION_DATABASE_IDSNo-Multiple databases, comma-separated
NOTION_POLL_INTERVALNo5Seconds between polling

*Required if using Notion provider

Per-Database Repository Paths

When using multiple databases, specify a repository for each:

VariableRequiredDescription
NOTION_{DB_ID}_REPOYes*Repository path for database (uppercase, no hyphens)

*Required when using NOTION_DATABASE_IDS

Example: For database ID 2e4f8bda-3c86-8108-ba21-f53fbb73d9ae, use:

NOTION_2E4F8BDA3C868108BA21F53FBB73D9AE_REPO=/path/to/repo

Notion Status Values

Claudear auto-detects common status names (Todo, In Progress, Done, etc.). For custom status names, use per-database overrides:

VariableDefaultDescription
NOTION_{DB}_STATUS_TODOTodoStatus that triggers task pickup
NOTION_{DB}_STATUS_IN_PROGRESSIn ProgressStatus while working
NOTION_{DB}_STATUS_IN_REVIEWIn ReviewStatus after PR creation
NOTION_{DB}_STATUS_DONEDoneCompletion status

Replace {DB} with the database ID (uppercase, hyphens removed).

Repository

VariableRequiredDefaultDescription
REPO_PATHYes*-Default repository path (single instance)
GITHUB_TOKENYes-GitHub token for PR creation

*Required when using single team/database mode. PRs are created against the default branch (main).

Server

VariableRequiredDefaultDescription
WEBHOOK_PORTNo8000Port for webhook server
WEBHOOK_HOSTNo0.0.0.0Host to bind server to

ngrok

VariableRequiredDefaultDescription
NGROK_AUTHTOKENYes*-ngrok auth token for tunneling

*Required for Linear provider (webhooks need public URL)

Task Management

VariableRequiredDefaultDescription
MAX_CONCURRENT_TASKSNo5Maximum parallel tasks
COMMENT_POLL_INTERVALNo30Seconds between comment polls
BLOCKED_TIMEOUTNo3600Seconds before blocked task times out

Database

VariableRequiredDefaultDescription
DB_PATHNoclaudear.dbPath to SQLite database

Logging

VariableRequiredDefaultDescription
LOG_LEVELNoINFOLogging level

Example: Full Multi-Provider Configuration

# =============================================================================
# LINEAR PROVIDER - Multiple Teams
# =============================================================================
LINEAR_API_KEY=lin_api_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
LINEAR_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
LINEAR_TEAM_IDS=ENG,INFRA,DESIGN

# Per-team repositories
LINEAR_ENG_REPO=/Users/dev/engineering-repo
LINEAR_INFRA_REPO=/Users/dev/infrastructure-repo
LINEAR_DESIGN_REPO=/Users/dev/design-system-repo

# Linear workflow states (optional - defaults shown)
LINEAR_STATE_TODO=Todo
LINEAR_STATE_IN_PROGRESS=In Progress
LINEAR_STATE_IN_REVIEW=In Review
LINEAR_STATE_DONE=Done

# =============================================================================
# NOTION PROVIDER - Multiple Databases
# =============================================================================
NOTION_API_KEY=secret_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
NOTION_DATABASE_IDS=abc123,def456
NOTION_POLL_INTERVAL=5

# Per-database repositories
NOTION_ABC123_REPO=/Users/dev/project-alpha-repo
NOTION_DEF456_REPO=/Users/dev/project-beta-repo

# Notion status values (optional - auto-detected by default)
# Use per-database overrides if needed:
# NOTION_ABC123_STATUS_TODO=Next Up
# NOTION_ABC123_STATUS_DONE=Complete

# =============================================================================
# SHARED SETTINGS
# =============================================================================
GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
NGROK_AUTHTOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# Task settings
MAX_CONCURRENT_TASKS=5
BLOCKED_TIMEOUT=3600

# Server
WEBHOOK_PORT=8000

# Logging
LOG_LEVEL=INFO

Security Notes

  • Never commit .env files to version control
  • Use secrets management in production
  • Rotate API keys periodically
  • Limit API key permissions to minimum required