Pp linear

From mvanhorn/printing-press-library · View interactive version

Pp linear is an AI agent skill from the GitHub repository mvanhorn/printing-press-library. Offline-capable, agent-native Linear CLI with SQLite-backed sync, FTS5 search, cross-cycle comparison, project... Trigger phrases: `what's on my Linear plate today`, `Linear sprint plan for the team`, `Linear cycle comparison`, `Linear burndown for the project`, `which Linear milestone is at risk`,

How to use this skill

Skill file

<!-- GENERATED FILE — DO NOT EDIT.

This file is a verbatim mirror of library/project-management/linear/SKILL.md,

regenerated post-merge by tools/generate-skills/. Hand-edits here are

silently overwritten on the next regen. Edit the library/ source instead.

See the repository agent guide, section "Generated artifacts: registry.json, cli-skills/". -->

Linear — Printing Press CLI

Prerequisites: Install the CLI

This skill drives the linear-pp-cli binary. Do not invoke a command named linear when this skill is active. If linear-pp-cli is missing, install it first:

  1. Install via the Printing Press installer. It defaults binaries to $HOME/.local/bin on macOS/Linux and %LOCALAPPDATA%\Programs\PrintingPress\bin on Windows:

```bash

npx -y @mvanhorn/printing-press-library install linear --cli-only

```

  1. Verify: linear-pp-cli --version
  2. Ensure the reported install directory is on $PATH for the agent/runtime that will invoke this skill.

If the npx install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.6 or newer):

go install github.com/mvanhorn/printing-press-library/library/project-management/linear/cmd/linear-pp-cli@latest

If --version reports "command not found" after install, the runtime cannot see the binary directory on $PATH. Do not proceed with skill commands until verification succeeds.

Agent Contract

When to Use This CLI

Reach for this CLI when you need joined queries that span issues, cycles, projects, and milestones — questions Linear's UI answers across multiple tabs and the API answers across multiple round-trips. It's the right pick for agents driving Linear over MCP (the orchestration pair plus named intents covers the full surface in ~1K tokens), for engineering managers preparing Friday updates (cycle comparison, slipped, burndown, blocking queue), and for any agent that must mutate a real workspace under the pp_created fixture-lifecycle contract.

Unique Capabilities

These capabilities aren't available in any other tool for this API.

Local state that compounds

_Reach for this when an agent or human needs a single ranked work queue across every team, without naming the underlying joins._

```bash

linear-pp-cli today --json --agent

```

_Reach for this in sprint planning when you need to see who is overloaded and where work is stuck in one view._

```bash

linear-pp-cli bottleneck --team ENG --json

```

_Reach for this during backlog grooming when you need to surface forgotten issues without exhausting the API rate limit._

```bash

linear-pp-cli stale --days 30 --team ENG --json

```

_Reach for this during triage when you suspect an incoming bug duplicates an existing issue._

```bash

linear-pp-cli issues search "login redirect bug" --limit 5 --agent

linear-pp-cli issues search "pipeline follow-up" --team SYMPH --limit 10 --agent

linear-pp-cli similar "login redirect bug" --limit 5 --json

linear-pp-cli similar "pipeline follow-up" --team SYMPH --limit 10 --agent

```

Prefer issues search when checking for existing tickets before creating or updating follow-up work; it is the supported issue-search spelling agents tend to reach for. It coordinates freshness for duplicate checks: fresh local data is searched immediately, stale or empty issue data refreshes behind a cross-process lock before search, and refresh failures return a typed error instead of silently serving stale results. Add --team <key-name-or-uuid> when a common project name or label appears across teams and the duplicate check must stay inside the target team's queue. Multi-word issues search queries may be quoted or passed as separate words; both forms are joined into one FTS query. Under --agent / --json, issues search returns a provenance envelope with freshness metadata; similar keeps the legacy raw result array. Use --data-source local only when stale/offline local results are intentional.

Cross-entity rollups

_Reach for this when stakeholders ask when a project will land and the project page only shows a static target date someone typed in months ago._

```bash

linear-pp-cli projects burndown PROJ_ID --weeks 8 --json

```

_Reach for this for cycle retros and Friday updates when you need a numeric diff rather than two browser tabs._

```bash

linear-pp-cli cycles compare 42 43 --json

```

_Reach for this in Friday stakeholder updates when you need a structured slipped-from-last-cycle list, not just a saved view._

```bash

linear-pp-cli slipped --team ENG --json

```

_Reach for this in Monday sprint planning to ground rebalance decisions in actual completion data, not the team's last cycle alone._

```bash

linear-pp-cli velocity --weeks 8 --json

```

_Reach for this in portfolio reviews when stakeholders want the initiative-level rollup, not seven open project tabs._

```bash

linear-pp-cli initiatives health --json

```

_Reach for this in weekly portfolio review when the question is which milestone is most at risk, not which initiative is healthy._

```bash

linear-pp-cli milestones at-risk --json

```

Personal queues

_Reach for this every morning when you need to know which of your in-flight issues are stalling teammates downstream._

```bash

linear-pp-cli blocking --json

```

Agent-native plumbing

_Reach for this when an agent needs to clean up only the tickets it created in a session — the workspace's existing data must not be touched._

```bash

linear-pp-cli pp-test list --json

```

_Reach for this when running an agent against a real workspace with real data — strict mode makes accidental mutation impossible._

```bash

linear-pp-cli issues create --title "Test ticket" --team ENG --trust-mode strict

```

_Reach for this when an agent is creating issue trees, epics, or follow-up hierarchies and needs parentage wired safely._

```bash

linear-pp-cli issues create --title "Child task" --team ENG --parent ENG-123 --description-file /tmp/body.md --agent

linear-pp-cli issues edit ENG-124 --parent ENG-123 --agent

linear-pp-cli issues edit ENG-124 --no-parent --agent

```

_Reach for this when an agent must record that one issue waits on another, or check what blocks an issue before scheduling it. add and remove take exactly one of --blocked-by, --blocks, or --related; under --trust-mode strict offline --dry-run checks both issue references against the pp_created ledger; live writes also check both resolved UUIDs._

```bash

linear-pp-cli issues relations add ENG-124 --blocked-by ENG-123 --agent

linear-pp-cli issues relations list ENG-124 --agent

linear-pp-cli issues relations remove ENG-124 --blocked-by ENG-123 --agent

```

_Reach for this before attaching labels. --label is UUID-only; use --label-name when the input is a human label name. Linear rejects labels owned by another team, and the CLI preflights ownership before mutating._

```bash

linear-pp-cli labels list --team ENG --agent --select id,name,global,team.key

linear-pp-cli issues create --title "Title" --team ENG --label <global-or-eng-label-id> --agent

linear-pp-cli issues create --title "Title" --team ENG --label-name "kind:bug" --label-name "source:user-report" --agent

linear-pp-cli issues edit ENG-123 --label-name "area:review-tooling" --dry-run --agent

linear-pp-cli issues edit ENG-123 --label-name "area:review-tooling" --agent

```

--label-name always performs a live Linear read to resolve the UUID, even when the surrounding issue write is a dry-run. Writes require a normalized exact label-name match. Team-owned labels and workspace-global labels (no team) both resolve; labels owned by another team do not. --label and --label-name can be combined; resolved IDs are de-duplicated before the mutation. On create, the CLI verifies the mutation's returned label IDs and fails visibly if Linear did not attach the requested set; the exit-5 agent envelope includes created_issue.id, created_issue.identifier, and created_issue.url so the remote issue remains recoverable if local persistence is unavailable.

_Reach for this when a user gives an issue identifier plus a project or initiative name. --project is UUID-only; use --project-name when the input is a human project name._

```bash

linear-pp-cli projects list --agent --select id,name,team.key,state,url

linear-pp-cli projects search "Autonomous Backlog Manager & Dispatch Governance" --team SYMPH --agent --select id,name,team.key,initiative.name,url

linear-pp-cli initiatives list --agent --select id,name,status,url

linear-pp-cli initiatives search "Dispatch Governance" --agent --select id,name,status,url

linear-pp-cli issues edit SYMPH-795 --project-name "Autonomous Backlog Manager & Dispatch Governance" --dry-run --agent

linear-pp-cli issues edit SYMPH-795 --project-name "Autonomous Backlog Manager & Dispatch Governance" --agent

```

--project-name always performs a live Linear read to resolve the UUID, even when the surrounding issue write is a dry-run. Use projects search first when the name is partial; writes require a normalized exact project-name match.

_Reach for this whenever a body contains newlines, quotes, backticks, $() expansions, shell commands, images, logs, or agent-generated Markdown._

```bash

linear-pp-cli issues create --title "Title" --team ENG --description-file /tmp/body.md --media /tmp/screenshot.png --agent

linear-pp-cli issues edit ENG-123 --description-file /tmp/body.md --agent

linear-pp-cli issues edit ENG-123 --media /tmp/screenshot.png --agent

linear-pp-cli comments add --issue ENG-123 --body-file /tmp/comment.md --media /tmp/screenshot.png --agent

linear-pp-cli comments edit <comment-id> --body-file /tmp/comment.md --agent

linear-pp-cli documents create --title "Runbook" --issue ENG-123 --content-file /tmp/runbook.md --agent

linear-pp-cli documents create --title "Team runbook" --team ENG --content-file /tmp/runbook.md --agent

linear-pp-cli documents edit <document-id-or-slug> --content-file /tmp/updated.md --agent

```

documents create requires exactly one parent (--issue, --project, --team, --initiative, --cycle, --release, or --folder); --team accepts a key such as ENG or a UUID. issues edit --media, comments edit --media, and documents edit --media with no body/content flag fetch the existing Markdown live and append uploaded media links. Images become Markdown image embeds; non-images become Markdown links. Add --media-public only when the uploaded asset must be reachable outside the Linear workspace.

```bash

linear-pp-cli issues ENG-123 --agent --data-source live --select identifier,title,description,state.id,state.name,labels.nodes.id,labels.nodes.name,url

linear-pp-cli issues ENG-123,ENG-124 --agent --data-source live --select identifier,title,description,state.name,url

linear-pp-cli comments list ENG-123 --agent

linear-pp-cli comments list --issue ENG-123 --agent --limit 100

```

1. List the states for the issue's team: workflow-states list --team <key> (alias: states list).

2. Pick the target by name or type and copy its id UUID.

3. Pass that UUID to issues edit --state.

```bash

linear-pp-cli workflow-states list --team ENG --agent --select id,name,type

linear-pp-cli issues edit ENG-123 --state <state-uuid> --agent

```

Or skip the lookup entirely with one-command transitions resolved against the issue's own team:

```bash

linear-pp-cli issues edit ENG-123 --state-name "In Progress" --agent

linear-pp-cli issues edit ENG-123 --state-type started --agent # usage error if the team has several 'started' states

```

issues create takes the same trio, resolved against --team, so an issue can open directly in the right state. --state requires a UUID (a non-UUID value is a usage error pointing at --state-name):

```bash

linear-pp-cli issues create --title "..." --team ENG --state-name "In Progress" --agent

```

Do not use linear-pp-cli api or linear-pp-cli sql for workflow states — api only exposes generated REST-shaped interfaces (currently integrations), not Linear GraphQL objects.

```bash

linear-pp-cli documents my-runbook-f7f48ab36080 --agent --select title,updatedAt,content

linear-pp-cli documents "https://linear.app/<org>/document/my-runbook-f7f48ab36080" --agent

```

Command Reference

attachments — Manage attachments

audit-entry-types — Manage audit-entry-types

auth-resolver-responses — Manage auth-resolver-responses

authentication-session-responses — Manage authentication-session-responses

email-intake-addresses — Manage email-intake-addresses

favorites — Manage favorites

initiative-relations — Manage initiative-relations

initiative-to-projects — Manage initiative-to-projects

initiatives — Manage initiatives

integrations — Manage integrations

issue-priority-values — Manage issue-priority-values

labels — List Linear issue labels with team ownership

organizations — Manage organizations

project-labels — Manage project-labels

project-milestones — Manage project-milestones

project-relations — Manage project-relations

project-statuses — Manage project-statuses

project-updates — Create and list Linear project updates (status posts on a project)

projects — Manage projects

release-notes — Manage release-notes

release-pipelines — Manage release-pipelines

release-stages — Manage release-stages

releases — Manage releases

roadmap-to-projects — Manage roadmap-to-projects

roadmaps — Manage roadmaps

teams — Manage teams

templates — Manage templates

user-settingses — Manage user-settingses

users — Manage users

workflow-states — List Linear workflow states (alias: states)

Finding the right command

When you know what you want to do but not which command does it, ask the CLI directly:

linear-pp-cli which "<capability in your own words>"

which resolves a natural-language capability query to the best matching command from this CLI's curated feature index. Exit code 0 means at least one match; exit code 2 means no confident match — fall back to --help or use a narrower query.

For duplicate checks, linear-pp-cli which "search issues by text" --agent should point to issues search; use that instead of inventing issues search --help fallbacks or raw SQL. If the local issue cache is stale, issues search refreshes it or fails with a typed freshness error; agents should not jump to raw GraphQL just because the cache was stale.

For parent/sub-issue linking, linear-pp-cli which "set issue parent" --agent should point to issues edit --parent.

For blocked-by links, linear-pp-cli which "blocked by" --agent should point to issues relations add.

Recipes

Friday stakeholder update

linear-pp-cli cycles compare current previous --json --select completionPct,scopeAdded,scopeCut,carryover,meanCycleTimeHours

Two-row diff of the current and previous cycle, narrowed to the five fields that go into a stakeholder doc — pipe to your LLM of choice to write the prose.

Daily what-now for an agent

linear-pp-cli today --json --agent --select id,identifier,title,state.name,cycle.endsAt,priority

Ranked work queue with only the fields an agent needs to decide what to pick up; --agent enables agent-mode envelope, --select narrows the payload from kilobytes to ~200 bytes per row.

Sprint planning rebalance

linear-pp-cli bottleneck --team ENG --json | jq '.[] | select(.loadIndex > 1.2)'

Pulls per-assignee load and pipes to jq for the overloaded slice — the bottleneck command exposes the join; jq does the filter so the command stays composable.

Backlog grooming sweep

linear-pp-cli stale --days 60 --team ENG --json --select identifier,title,assignee.name,updatedAt

Stale-issue scan with a curated --select projection that's small enough to keep in context across many invocations.

Agent fixture cleanup

linear-pp-cli pp-test list --session current --json && linear-pp-cli pp-cleanup --session current

List then archive only the issues this CLI created in the current session — never touches pre-existing workspace data.

Auth Setup

Linear personal API keys go in the Authorization header verbatim — no Bearer prefix. Run linear-pp-cli auth set-token lin_api_yourkeyhere to save your key (no Bearer prefix needed for Linear personal API keys), or export LINEAR_API_KEY=lin_api_.... Personal API keys are workspace-scoped; the doctor command validates auth, API connectivity, and store health in one shot.

Run linear-pp-cli doctor to verify setup.

Freshness and Data Sources (read this before driving in an agent loop)

Commands fall into three categories with different data-source semantics. Use --data-source auto|live|local to control where reads come from; use --max-age <duration> to set the threshold for the "your local data is stale" hint.

Category 1: Live-first with local fallback (the spec-emitted commands and the v4-refactored issues list/get)

Category 2: Snapshot-computational (local-only by necessity)

Freshness-coordinated local search

Category 3: Mutations

Live-only collaboration reads

Label discovery

The budget-conscious agent loop:

# 1. Hydrate once (one batched query for everything)
linear-pp-cli sync

# 2. Read freely — store-backed, zero budget
linear-pp-cli today
linear-pp-cli bottleneck --team ENG --data-source local

# 3. Mutate — write-back keeps the store fresh
linear-pp-cli issues create --title "..." --team ENG --pp-session "$SESSION"

# 4. Verify the mutation from local (no extra API call)
linear-pp-cli issues list --data-source local --pp-session "$SESSION"

# 5. Re-sync every ~30 minutes if the session is long
linear-pp-cli sync

Cleanup contract:

Every issues create records the new ticket in a local pp_created table tagged with the session (default: timestamp, override with --pp-session <tag> or PP_SESSION env var). pp-cleanup --session <tag> archives only those tickets via the real Linear archive mutation. --trust-mode strict refuses mutations on issues not in pp_created — pair with the session tag for a hard floor against agent-driven workspace pollution.

Agent Mode

Add --agent to any command. Expands to: --json --compact --no-input --no-color --yes.

```json

{"error":"document \"missing-doc\" not found","code":3,"type":"not_found"}

```

The process still exits with the typed code from the Exit Codes table; type is the machine-readable name for it (usage, not_found, auth, api, partial_failure, rate_limit, config). No 2>&1 | python json defensive wrappers needed on read paths.

```bash

linear-pp-cli attachments mock-value --agent --select id,name,status

```

Response envelope

Commands that read from the local store or the API wrap output in a provenance envelope:

{
  "meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
  "results": <data>
}

Parse .results for data and .meta.source to know whether it's live or local. A human-readable N results (live) summary is printed to stderr only when stdout is a terminal AND no machine-format flag (--json, --csv, --compact, --quiet, --plain, --select) is set — piped/agent consumers and explicit-format runs get pure JSON on stdout.

Agent Feedback

When you (or the agent) notice something off about this CLI, record it:

linear-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
linear-pp-cli feedback --stdin < notes.txt
linear-pp-cli feedback list --json --limit 10

Entries are stored locally at ~/.linear-pp-cli/feedback.jsonl. They are never POSTed unless LINEAR_FEEDBACK_ENDPOINT is set AND either --send is passed or LINEAR_FEEDBACK_AUTO_SEND=true. Default behavior is local-only.

Write what surprised you, not a bug report. Short, specific, one line: that is the part that compounds.

Output Delivery

Every command accepts --deliver <sink>. The output goes to the named sink in addition to (or instead of) stdout, so agents can route command results without hand-piping. Three sinks are supported:

| Sink | Effect |

|------|--------|

| stdout | Default; write to stdout only |

| file:<path> | Atomically write output to <path> (tmp + rename) |

| webhook:<url> | POST the output body to the URL (application/json or application/x-ndjson when --compact) |

Unknown schemes are refused with a structured error naming the supported set. Webhook failures return non-zero and log the URL + HTTP status on stderr.

Named Profiles

A profile is a saved set of flag values, reused across invocations. Use it when a scheduled agent calls the same command every run with the same configuration - HeyGen's "Beacon" pattern.

linear-pp-cli profile save briefing --json
linear-pp-cli --profile briefing attachments mock-value
linear-pp-cli profile list --json
linear-pp-cli profile show briefing
linear-pp-cli profile delete briefing --yes

Explicit flags always win over profile values; profile values win over defaults. agent-context lists all available profiles under available_profiles so introspecting agents discover them at runtime.

Exit Codes

| Code | Meaning |

|------|---------|

| 0 | Success |

| 2 | Usage error (wrong arguments) |

| 3 | Resource not found |

| 4 | Authentication required |

| 5 | API error (upstream issue) |

| 7 | Rate limited (wait and retry) |

| 10 | Config error |

Argument Parsing

Parse $ARGUMENTS:

  1. Empty, help, or --help → show linear-pp-cli --help output
  2. Starts with install → ends with mcp → MCP installation; otherwise → see Prerequisites above
  3. Anything else → Direct Use (execute as CLI command with --agent)

MCP Server Installation

Install the MCP binary from this CLI's published public-library entry or pre-built release, then register it:

claude mcp add linear-pp-mcp -- linear-pp-mcp

Verify: claude mcp list

Direct Use

  1. Check if installed: which linear-pp-cli

If not found, offer to install (see Prerequisites at the top of this skill).

  1. Match the user query to the best command from the Unique Capabilities and Command Reference above.
  2. Execute with the --agent flag:

```bash

linear-pp-cli <command> [subcommand] [args] --agent

```

  1. If ambiguous, drill into subcommand help: linear-pp-cli <command> --help.
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.