Docs/Configuration

Configuration

Complete environment variable reference

Configuration

Claudear is configured via environment variables in a .env file. It auto-detects which providers to enable based on the variables you configure.

Important: The .env file must be in the current working directory when you run claudear. Always run the command from the cloned repository folder where your .env file is located.

Setup

Copy the example configuration and edit it:

cp .env.example .env

Single Provider Setup

Linear (Single Team)

# Linear Integration
LINEAR_API_KEY=lin_api_xxxxx
LINEAR_WEBHOOK_SECRET=whsec_xxxxx
LINEAR_TEAM_ID=ENG  # Your team key from URL

# Repository
REPO_PATH=/path/to/your/repo

# ngrok (required for webhooks)
NGROK_AUTHTOKEN=your-ngrok-token

Notion (Single Database)

# Notion Integration
NOTION_API_KEY=secret_xxxxx
NOTION_DATABASE_ID=abc123def456
NOTION_POLL_INTERVAL=5

# Repository
REPO_PATH=/path/to/your/repo

# GitHub
GITHUB_TOKEN=ghp_xxxxx

Multi-Instance Setup

Claudear supports multiple Linear teams and Notion databases, each with its own repository.

Multiple Linear Teams

LINEAR_API_KEY=lin_api_xxxxx
LINEAR_WEBHOOK_SECRET=whsec_xxxxx
LINEAR_TEAM_IDS=ENG,INFRA,DESIGN  # Comma-separated team keys

# Per-team repository paths (REQUIRED)
LINEAR_ENG_REPO=/path/to/engineering-repo
LINEAR_INFRA_REPO=/path/to/infrastructure-repo
LINEAR_DESIGN_REPO=/path/to/design-system-repo

Multiple Notion Databases

NOTION_API_KEY=secret_xxxxx
NOTION_DATABASE_IDS=abc123,def456,ghi789  # Comma-separated database IDs
NOTION_POLL_INTERVAL=5

# Per-database repository paths (REQUIRED)
NOTION_ABC123_REPO=/path/to/project-alpha-repo
NOTION_DEF456_REPO=/path/to/project-beta-repo
NOTION_GHI789_REPO=/path/to/project-gamma-repo

Note: Database IDs in environment variable names are uppercased and hyphens are removed.

Both Providers + Multiple Instances

Configure both sets of variables - Claudear runs everything simultaneously:

# Linear - Multiple Teams
LINEAR_API_KEY=lin_api_xxxxx
LINEAR_WEBHOOK_SECRET=whsec_xxxxx
LINEAR_TEAM_IDS=ENG,INFRA

LINEAR_ENG_REPO=/path/to/engineering-repo
LINEAR_INFRA_REPO=/path/to/infrastructure-repo

# Notion - Multiple Databases
NOTION_API_KEY=secret_xxxxx
NOTION_DATABASE_IDS=abc123,def456
NOTION_POLL_INTERVAL=5

NOTION_ABC123_REPO=/path/to/project-alpha-repo
NOTION_DEF456_REPO=/path/to/project-beta-repo

# Shared
GITHUB_TOKEN=ghp_xxxxx
NGROK_AUTHTOKEN=your-ngrok-token

Linear Workflow States

VariableDefaultDescription
LINEAR_STATE_TODOTodoState that triggers task pickup
LINEAR_STATE_IN_PROGRESSIn ProgressState while Claude is working
LINEAR_STATE_IN_REVIEWIn ReviewState after PR is created
LINEAR_STATE_DONEDoneTerminal state (triggers cleanup)

Notion Status Values

Claudear auto-detects common status names. Custom mappings can be configured per-database:

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_DONEDoneTerminal status

Replace {DB} with your database ID (uppercase, hyphens removed). For single-database setups, Claudear uses smart defaults.

Task Settings

VariableDefaultDescription
MAX_CONCURRENT_TASKS5Max parallel tasks across all providers
COMMENT_POLL_INTERVAL30Seconds between polling for comments
BLOCKED_TIMEOUT3600Seconds before a blocked task times out

Server Settings

VariableDefaultDescription
WEBHOOK_PORT8000Port for the webhook server
WEBHOOK_HOST0.0.0.0Host to bind the server

Logging

VariableDefaultDescription
LOG_LEVELINFOLogging level (DEBUG, INFO, WARNING, ERROR)

Getting Your API Keys

Linear API Key

  1. Go to Linear Settings → API
  2. Click "Create new API key"
  3. Name it "Claudear"
  4. Copy the key (starts with lin_api_)

Notion API Key

  1. Go to Notion Integrations
  2. Create a new integration
  3. Copy the Internal Integration Token (starts with secret_)
  4. Share your database with the integration

Finding Your Linear Team Key

Your team key is in Linear URLs: linear.app/ENG/issue/ENG-123 → team key is ENG

Finding Your Notion Database ID

Your database ID is in the URL when viewing the database: notion.so/workspace/abc123def456?v=... → database ID is abc123def456