Skip to content

Linear CLI

The linear-cli skill wraps the linear CLI (@schpet/linear-cli) — a git/jj-aware client for managing your Linear workspace from the terminal. It supports issues, teams, users, projects, milestones, documents, comments, and attachments, plus GitHub-PR creation tied to an issue.

The skill ships in the jreb-agents git package (since the 2026-09-18 consolidation — it previously had its own jreb-pi-skills repo, now archived):

Terminal window
pi install git:github.com/JohannesBertens/jreb-agents

The linear command must be installed and authenticated:

Terminal window
linear --version # is it on PATH?
linear auth login # authenticate with a Linear API key
linear config # configure this repo (run once, in the repo)

If not installed globally, run it via npx — the skill’s scripts fall back to this automatically:

Terminal window
npx --yes @schpet/linear-cli --version

Create an API key at linear.app/settings/account/security.

  • linear issue mine — unstarted issues assigned to you
  • linear issue list — table view (-s/--state, --sort, --project, --milestone)
  • linear issue query --search "text" / --team ENG / --all-teams / --json / --limit
  • linear issue start [ABC-123] — create/switch to an issue branch, mark started
  • linear issue view [id] — details as markdown (-w web, -a Linear.app)
  • linear issue id | title | url — print just the id / title / URL
  • linear issue pr — create a GitHub PR from the issue (uses gh)
  • linear issue create | update | delete
  • linear issue comment list | add | update
  • linear issue attach <id> <file> — attach a file (private by default; --public for images)
  • linear issue commits — show commits for an issue (jj only)

The current issue is derived from the git branch name (e.g. eng-123-...) or, with jj, a Linear-issue commit trailer.

  • linear team list | id | members | create | autolinks
  • linear team members --all --json
  • linear user list [--all] [--json]
  • linear project list | view | create --name "API v2" --team ENG
  • linear milestone list --project <id> | view | create | update | delete (alias: m)
  • linear document list | view | create | update | delete (alias: docs)
  • linear document create --title "Spec" --content-file ./spec.md
  • linear document view <slug> --raw — pipe raw markdown

Use linear --help to discover every command and flag.

The skill ships a script for listing all open issues across all teams:

Terminal window
script="$HOME/.pi/agent/skills/linear-cli/scripts/list-all-issues.sh"
bash "$script" # all open issues, all teams (table)
bash "$script" --json # all issues as JSON (for agents)
bash "$script" --project "My Pi" # filter to a project (configured team)
bash "$script" --tsv # tab-separated: identifier, title, team, state

--json and --tsv are mutually exclusive; --tsv needs python3.

The Linear API has strict rate limits. Always insert sleep 1 between consecutive linear calls — the skill’s scripts do this automatically.