con un clic
linear
// Work with Linear through the `linear` CLI, including issue listing, creation, updates, comments, team/project/label lookup, JSON issue views, and CLI authentication/setup on persistent environments.
// Work with Linear through the `linear` CLI, including issue listing, creation, updates, comments, team/project/label lookup, JSON issue views, and CLI authentication/setup on persistent environments.
| name | linear |
| description | Work with Linear through the `linear` CLI, including issue listing, creation, updates, comments, team/project/label lookup, JSON issue views, and CLI authentication/setup on persistent environments. |
Use this skill whenever the task involves Linear and the linear CLI is available or should be made available. Prefer CLI workflows for listing, creating, viewing, and updating Linear records when the requested task can be completed without the browser UI.
These notes are grounded against @schpet/linear-cli. The latest published version is 2.0.0; flag names differ from 1.9.1 in the auth subcommand. Always run linear auth login --help before attempting non-interactive auth, as flag names vary between versions.
linear --help and subcommand help when command syntax is uncertain; CLI versions can differ.1.9.1, linear issue view --json and linear label list --json support JSON; linear issue list does not.RequestOAuthAuthorization to connect the user's Linear account, then pass the saved credential to Exec.credential_env.linear command succeeds and returns an identifier or URL.Before doing browser-assisted setup or asking for an API key, check whether a Linear OAuth credential already exists:
ListOAuthCredentials.linear credential is available and active, use its alias in Exec.credential_env; replace "default" below with the actual alias returned by ListOAuthCredentials:
[{"env_var":"LINEAR_ACCESS_TOKEN","provider":"linear","alias":"default","value":"access_token"}]
RequestOAuthAuthorization with provider: "linear", a short stable alias such as "default", and a concise reason. Request scopes for the intended work; omit scopes for read-only access, or pass ["read", "write"] when mutations such as creating, updating, commenting, or assigning issues are needed.authorization_url with the user and wait for them to confirm they completed authorization.CompleteOAuthAuthorization with the returned state. If it returns completed, retry the Linear command with Exec.credential_env using the returned alias. If it returns pending, ask the user to finish the browser flow. If it returns failed or expired, start a fresh authorization flow.Managed OAuth keeps tokens out of the transcript. Do not print the token or try to read it directly; inject it only for the subprocess that needs Linear access.
linear --help
linear auth list
linear auth whoami
linear team list
If linear is not installed, check whether npx can run the CLI:
npx -y @schpet/linear-cli --help
linear issue list in version 1.9.1 lists issues but does not expose a full-text search flag. Use filters to narrow the candidate set, then inspect likely matches. If true full-text search is required, use the Linear web UI or API after noting the CLI limitation.
linear issue list --help
linear issue list --all-states --all-assignees --limit 50 --no-pager
linear issue list --all-states --all-assignees --team CUE --limit 50 --no-pager
linear issue list --state started --state unstarted --assignee self --no-pager
Useful issue list flags in 1.9.1:
--state <state> repeatable, with values triage, backlog, unstarted, started, completed, canceled.--all-states.--assignee <username>, --all-assignees, and --unassigned.--team <team>.--project <project>.--sort manual|priority.--limit <limit>.--no-pager.Inspect candidates with JSON when downstream parsing is useful:
linear issue view <issue-id-or-key>
linear issue view <issue-id-or-key> --json --no-comments --no-download
linear issue url <issue-id-or-key>
linear issue title <issue-id-or-key>
When deciding whether an issue is a duplicate, compare:
Before creating, resolve the target team and optional metadata:
linear team list
linear label list --all
linear label list --all --json
linear project list --all-teams
Create the issue non-interactively when the requested fields are known. Keep the description specific and actionable:
linear issue create --team CUE --title "Investigate login timeout on macOS" --description "..." --label Bug --priority 2 --no-interactive
Useful issue create flags in 1.9.1:
--title <title>.--description <description>.--team <team>.--assignee <assignee> or --assignee self.--label <label> repeatable.--project <project>.--state <state>.--priority <priority> where 1 is highest and 4 is lowest.--estimate <estimate>.--due-date <dueDate>.--parent <team_number>.--start.--no-interactive.After creation, capture and report:
Inspect command help before mutating records:
linear issue update --help
linear issue comment --help
linear issue comment add --help
Common operations include:
Examples:
linear issue update CUE-123 --state started --assignee self
linear issue update CUE-123 --label Bug --label Regression --priority 1
linear issue comment add CUE-123 --body "Investigated the timeout path; next step is checking session refresh."
linear issue comment list CUE-123
After mutation, re-view the issue or rely on the command's returned identifier/URL to verify the change.
Use lookup commands to avoid guessing names or IDs:
linear team list
linear team members CUE
linear label list --all
linear label list --team CUE
linear label list --workspace
linear project list --all-teams
linear project list --team CUE
linear project view <projectId>
The 1.9.1 top-level command set includes auth, issue, team, project, project-update, milestone, initiative, initiative-update, label, document, config, and schema. It does not expose top-level user or cycle commands.
If workflow-state names are uncertain, inspect issue details and use linear issue update --state <state> with a known state name or type.
If linear auth whoami already works, do not recreate credentials. If setup is required, prefer the managed OAuth flow above and run Linear commands with Exec.credential_env. Configure @schpet/linear-cli with a manually obtained API key only when managed OAuth is unavailable or the CLI cannot use the injected OAuth token.
Success criteria for setup:
linear.app exists if browser-based API key creation is needed.@schpet/linear-cli is installed or invokable through a persistent wrapper.linear auth whoami succeeds.linear team list succeeds.Setup workflow:
linear auth list.@schpet/linear-cli globally with npm install -g @schpet/linear-cli.PATH directory. Check with npm bin -g or ls $(npm root -g)/../bin/linear. Prefer creating a symlink into a persistent PATH directory over an npx wrapper (which re-downloads on every invocation):
ln -sf "$(npm bin -g)/linear" /home/sprite/.local/bin/linear
linear auth login --help to confirm the exact flag names for the installed version before attempting non-interactive auth.--plaintext to linear auth login so credentials are stored in a file rather than hanging on keyring access:
linear auth login --key <api-key> --plaintext
/home/sprite/.config/linear/env.sh exporting LINEAR_API_KEY, chmod 600. Avoid printing linear auth token unless the user explicitly needs the token.linear auth whoami and linear team list.Use this only when no usable API key exists and the user needs CLI access.
Important: the Linear GraphQL API does not accept session cookies. A personal API key (lin_api_...) is the only programmatic auth method. Playwright is required to create one interactively.
https://linear.app/login.cookies.jsonlocalstorage.jsonindexeddb.jsonhttps://linear.app/robots.txt first to establish the origin, then inject localStorage, then navigate to the personal API key page:
https://linear.app/<workspace-slug>/settings/account/security
Note:
/settings/apiis the workspace-level member API key admin page — it does not have a personal key creation form. The personal key button ("New API key") is only on the account security page above.
placeholder="A descriptive name for this API key…"), then click "Create key".ApiKeyCreate GraphQL response. The token begins with lin_api_.Playwright's bundled Chromium download frequently fails in network-restricted cloud VMs. Use the pre-installed system Chrome instead:
browser = p.chromium.launch(
executable_path='/usr/bin/google-chrome',
headless=True,
args=['--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage', '--disable-gpu']
)
Check for system Chrome with which google-chrome chromium-browser chromium before attempting any Playwright browser install.
Important setup details:
ApiKeyCreate, and the token value begins with lin_api_.linear team list.robots.txt loads but before navigating to the settings page.linear auth login hangs or fails silently on Linux: pass --plaintext to bypass the system keyring.--api-key flag not recognised: the flag was renamed to --key (-k) in v2.x. Run linear auth login --help to confirm.linear command missing after npm install -g: the binary is in the nvm version bin path. Symlink it: ln -sf "$(npm bin -g)/linear" /home/sprite/.local/bin/linear.ApiKeyCreate mutation response via Playwright's page.on('response', ...) handler.Operation not permitted: the sandbox blocked access to https://api.linear.app/graphql; rerun the read with network permission if the task requires live Linear data.whoami works but issue listing fails: run linear team list; treat issue-list errors caused by filters, sort, or project config as non-auth failures.linear issue list cannot narrow enough: state that the CLI lacks full-text search in the observed version and use the Linear web UI/API if available.Analyze Bridge agent execution logs from ~/.bridge/sessions, reconstruct the agent's actual runtime behavior, and explain tool execution, failures, retries, and artifacts from persisted session files.
Debug and validate OpenBridge on a real macOS desktop through mini-machine plus full VNC computer-use. Use when local broker automation is not enough, when you need end-to-end GUI verification on macOS, or when local changes should be pushed to a branch and rebuilt from a fresh machine clone instead of transferred manually.
Read, create, and review DOCXs guidance
Convert files between formats. Use for Document conversion, Image format conversion, and Audio/Video format conversion.
Work with GitHub through the `gh` CLI, including issues, pull requests, reviews, Actions runs, releases, repository metadata, API queries, and CLI authentication/setup on persistent environments.
Read, create, and review PDFs