Linear
Drive Linear through its GraphQL API with the user's own key — opt-in, no middleman.
Setup
Set LINEAR_API_KEY (Settings → API → Personal API keys). All calls:
curl -s https://api.linear.app/graphql -H "Authorization: $LINEAR_API_KEY" \
-H "Content-Type: application/json" -d '{"query":"..."}'
My open issues
{"query":"{ viewer { assignedIssues(filter:{state:{type:{neq:\"completed\"}}}) { nodes { identifier title state { name } } } } }"}
Search issues
{"query":"query($q:String!){ searchIssues(term:$q){ nodes{ identifier title url } } }","variables":{"q":"login bug"}}
Create an issue
First resolve the team id ({ teams { nodes { id key name } } }), then:
{"query":"mutation($t:String!,$ti:String!,$d:String){ issueCreate(input:{teamId:$t,title:$ti,description:$d}){ success issue{ identifier url } } }","variables":{"t":"TEAM_ID","ti":"Fix X","d":"details"}}
Update status / assignee / comment
- Resolve workflow state ids (
{ workflowStates { nodes { id name } } }), thenissueUpdate(input:{id, stateId}). - Comment:
commentCreate(input:{issueId, body}).
Rules
- If
LINEAR_API_KEYis unset, explain how to create one and stop. - Resolve human references (team key, status name,
LIN-123identifier) to ids before mutating. - Echo the issue identifier + URL after creating/updating.