Connectors Linear

Linear

API

The Linear connector is an API connector that imports issues from Linear's GraphQL API. It produces structural claims and optionally extracts additional claims from issue descriptions via text extraction.

How it works

Claim patterns

SubjectPredicateObject
(ENG-123, issue) titled (title, title)
(ENG-123, issue) authored_by (creator, person)
(ENG-123, issue) has_state (state, status)
(ENG-123, issue) assigned_to (assignee, person)
(ENG-123, issue) labeled (label, label) per label
(ENG-123, issue) belongs_to (team/project, team/project)
(ENG-123, issue) has_priority (urgent/high/medium/low, priority)

All structural claims have confidence 1.0. Claims extracted from descriptions inherit the confidence of the extraction mode.

1 Create a Linear API key

Go to Settings → API in your Linear workspace and create a personal API key. Keys start with lin_api_.

2 Install the requests package

$ pip install requests

3 Connect

import os
conn = db.connect("linear",
    token=os.environ["LINEAR_API_KEY"],
    team="ENG",
)
result = conn.run(db)
Parameter Required Default Description
token Yes Linear API key (lin_api_...)
team No All teams Team key to filter (e.g. ENG)
project No All Project name to filter
state No All Filter by state type: started, completed, canceled, backlog, triage
max_items No 1000 Maximum issues to fetch
extraction No heuristic Text extraction mode for descriptions: heuristic, smart, llm, or none
save No False Encrypt and persist token

Basic usage

conn = db.connect("linear",
    token=os.environ["LINEAR_API_KEY"],
)
result = conn.run(db)

Filtered by team and state

conn = db.connect("linear",
    token=os.environ["LINEAR_API_KEY"],
    team="ENG",
    state="started",
    max_items=200,
)
result = conn.run(db)

With LLM extraction and save

conn = db.connect("linear",
    token=os.environ["LINEAR_API_KEY"],
    extraction="llm",
    save=True,
)
result = conn.run(db)

Structural claims only (no extraction)

conn = db.connect("linear",
    token=os.environ["LINEAR_API_KEY"],
    extraction="none",
)
result = conn.run(db)

Related Connectors