linear-cli

📁 schpet/linear-cli 📅 Jan 23, 2026
144
总安装量
145
周安装量
#1724
全站排名
安装命令
npx skills add https://github.com/schpet/linear-cli --skill linear-cli

Agent 安装分布

opencode 115
codex 108
claude-code 93
gemini-cli 89
amp 56

Skill 文档

Linear CLI

A CLI to manage Linear issues from the command line, with git and jj integration.

Generated from linear CLI v1.9.1

Prerequisites

The linear command must be available on PATH. To check:

linear --version

If not installed, follow the instructions at:
https://github.com/schpet/linear-cli?tab=readme-ov-file#install

Available Commands

linear auth               # Manage Linear authentication
linear issue              # Manage Linear issues
linear team               # Manage Linear teams
linear project            # Manage Linear projects
linear project-update     # Manage project status updates
linear milestone          # Manage Linear project milestones
linear initiative         # Manage Linear initiatives
linear initiative-update  # Manage initiative status updates (timeline posts)
linear label              # Manage Linear issue labels
linear document           # Manage Linear documents
linear config             # Interactively generate .linear.toml configuration
linear schema             # Print the GraphQL schema to stdout
linear api                # Make a raw GraphQL API request

Reference Documentation

  • auth – Manage Linear authentication
  • issue – Manage Linear issues
  • team – Manage Linear teams
  • project – Manage Linear projects
  • project-update – Manage project status updates
  • milestone – Manage Linear project milestones
  • initiative – Manage Linear initiatives
  • initiative-update – Manage initiative status updates (timeline posts)
  • label – Manage Linear issue labels
  • document – Manage Linear documents
  • config – Interactively generate .linear.toml configuration
  • schema – Print the GraphQL schema to stdout
  • api – Make a raw GraphQL API request

For curated examples of organization features (initiatives, labels, projects, bulk operations), see organization-features.

Discovering Options

To see available subcommands and flags, run --help on any command:

linear --help
linear issue --help
linear issue list --help
linear issue create --help

Each command has detailed help output describing all available flags and options.

Using the Linear GraphQL API Directly

Prefer the CLI for all supported operations. The api command should only be used as a fallback for queries not covered by the CLI.

Check the schema for available types and fields

Write the schema to a tempfile, then search it:

linear schema -o "${TMPDIR:-/tmp}/linear-schema.graphql"
grep -i "cycle" "${TMPDIR:-/tmp}/linear-schema.graphql"
grep -A 30 "^type Issue " "${TMPDIR:-/tmp}/linear-schema.graphql"

Make a GraphQL request

# Simple query
linear api '{ viewer { id name email } }'

# Query with variables (coerces types: booleans, numbers, null)
linear api 'query($teamId: String!) { team(id: $teamId) { name } }' --variable teamId=abc123

# Numeric and boolean variables
linear api 'query($first: Int!) { issues(first: $first) { nodes { title } } }' --variable first=5

# Complex variables via JSON
linear api 'query($filter: IssueFilter!) { issues(filter: $filter) { nodes { title } } }' \
  --variables-json '{"filter": {"state": {"name": {"eq": "In Progress"}}}}'

# Read query from stdin
echo '{ viewer { id } }' | linear api

# Pipe to jq for filtering
linear api '{ issues(first: 5) { nodes { identifier title } } }' | jq '.data.issues.nodes[].title'

Advanced: Using curl directly

For cases where you need full HTTP control, use linear auth token:

curl -s -X POST https://api.linear.app/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: $(linear auth token)" \
  -d '{"query": "{ viewer { id } }"}'