Ingest Linear issues, comments, projects, and cycles into CortexDB.
Linear Connector
Captures Linear issue activity from one or more teams as CortexDB experiences. Linear webhooks for real-time; GraphQL polling as a fallback.
Info
Two ways to run this connector:
- Run it yourself (Free + paid) —
pip install 'cortexdb-connectors[linear]'thencortexdb-sync sync linear. The connector reads your token from~/.cortexdb/state.json(written bycortexdb init) or from env vars. - Managed sync (Starter and up) — CortexDB runs the connector as a worker on its infrastructure. Configure it once from your dashboard; CortexDB handles webhook registration, retries, backfill, and idempotency.
1. Prepare credentials in Linear
Linear → Settings → API → Personal API keys → Create. Copy the key (lin_api_…).
2. Configure in your CortexDB dashboard
- Sign in at cortexdb.ai/login.
- Settings → Connectors → Add Connector → Linear.
- Paste the API key.
- Pick the teams to sync (comma-separated keys, e.g.
ENG, DESIGN). - Set the scope template. Default:
org:<your-org>/source:linear/team:{team_key}. - Pick sync mode: Real-time (webhook) or Polling.
- Click Start sync.
What gets written
| Event | Modality | Notes |
|---|---|---|
| Issue created/updated | document | Title + description |
| Comment | conversation | role=user; preceded_by links to issue |
| State change | observation | Old + new state as a triple |
| Cycle / Project events | observation | Cycle start, project status |
idempotency_key shape: lin:<team>-<issue_number>:<event_id>.
Run it yourself
If you'd rather host the connector yourself instead of using CortexDB's managed worker, every connector ships in the cortexdb-connectors PyPI package:
pip install 'cortexdb-connectors[linear]'
# Step 1: get a CortexDB token + actor (one-time, free tier)
pip install cortexdb-cli
cortexdb init
# Step 2: supply the connector's third-party credentials
export LINEAR_API_KEY=... # required
# Step 3: one-shot sync, or `watch` for a poll loop
cortexdb-sync sync linear
cortexdb-sync watch linear --interval 60
cortexdb-sync reads your CortexDB token + actor from ~/.cortexdb/state.json automatically. Cursor state is persisted in ~/.cortexdb/connectors-state.json, so re-running picks up where the last cycle left off.