Expand description
Linear adapter: shells out to the canonical linear-cli CLI
(nesszer/linear-cli, the cargo:linear-cli crate pinned in mise.toml).
The grammar is the real 0.3.28 surface, checked against the installed
binary on 2026-10-09. Four argv shapes parse — they fail only with
No workspace selected (exit 1, because no workspace is configured here):
issues create -t=ENG -d=D -p=2 -s=Todo -o json -- "T",
issues update -T=T -d=D -s=Done -- ENG-1,
issues list -t=ENG -o json, and
relations add -r blocks ENG-1 ENG-2; two clap errors confirm the shape —
linear-cli issue create "T" (exit 2, unrecognized subcommand 'issue')
and linear-cli issues create --title T (exit 2,
unexpected argument '--title'). The plural issues is the subcommand; the
title is positional on create; the workflow flag is --state, not
--status. The API path is unverified: no workspace is configured here,
so nothing past argument parsing was exercised.
§Values are attached; positionals follow --
Every user-controlled option value is attached with = (-d=<body>,
-T=<title>, -l=<label>, -s=<state>, -t=<team>, -p=<n>) and the
positional title/id follows the flags behind --. This is not cosmetic: tix
bodies are markdown, and a body whose first line is - item — or a title
starting with - — is rejected by clap when it is a separate argv element
(error: unexpected argument '- ' found, exit 2). Separating them would abort
an export mid-run on ordinary data.
§The import reads two payloads
issues list enumerates with only id, identifier, title, priority, state{name}, assignee{name}, project{name} — no body, labels, or timestamp —
so an import is one issues list call plus one issues get <ID> per open
issue, the latter returning the full issue object (description,
updatedAt, labels.nodes, parent, project, …). The two shapes are
modelled separately, exactly as the verbs carry them.
The tool reads LINEAR_API_KEY (its own help shows
printf '%s\n' "$LINEAR_API_KEY" | linear config set-key); it does not read
LINEAR_TOKEN, so that is what LinearAdapter::child_env injects.
Linear conveys workflow stage through -s <state> (done → Done, otherwise
the first work column), so this adapter sets done_via_status and never
issues a separate close.
Structs§
- Linear
Adapter - The
linear-cliadapter. Spawnslinear-cli issues <list|get|create|update>with the configured team and, when a secret is configured, theLINEAR_API_KEYenv pair.