linear-api

Execute raw GraphQL queries and mutations against the Linear API. Use for advanced operations not covered by other commands.

nesszer/linear-cli122 installsMITSynced Aug 22

Works with

Claude CodeCursorCodex CLIGitHub CopilotGemini CLI
---
name: linear-api
description: Execute raw GraphQL queries and mutations against the Linear API. Use for advanced operations not covered by other commands.
license: MIT
---

# Raw GraphQL API

```bash
# Run a query
linear-cli api query '{ viewer { id name email } }'

# Query with variables
linear-cli api query -v teamId=abc '{ team(id: $teamId) { name } }'

# Run a mutation
linear-cli api mutate -v title="Bug" '
  mutation($title: String!) {
    issueCreate(input: { title: $title, teamId: "..." }) {
      issue { id identifier }
    }
  }
'

# Pipe query from file
cat query.graphql | linear-cli api query -
```

## Flags

| Flag | Purpose |
|------|---------|
| `-v key=val` | GraphQL variables |
| `--output json` | JSON output |
| `--compact` | Compact JSON |

## Exit Codes

`0`=Success, `1`=Error, `2`=Not found, `3`=Auth error

More API Design skills

← All API Design skills

Check your AI visibility

One URL in, a 0–100 score and the exact fixes out.

RUN THE CHECK

Browse all the tools

15 tools across six categories
13 of them never send your data anywhere

Free · No signup · No trial clock

SEE THE DIRECTORY