@kyaukyuai/linear-cli 2.15.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +87 -38
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [3.0.0] - 2026-04-04
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- extended the shared `operation` and `receipt` contract family across remaining high-value write commands, including issue assignment/estimate/move/priority, project create and project-label mutation flows, webhook writes, and batch issue creation
|
|
10
|
+
- published an agent-native v3 migration guide and rewrote the README and skill/docs stack around AI agent runtimes instead of mixed human/operator usage
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- changed the default runtime to agent-native execution for core startup, read, and representative write surfaces by making machine-readable JSON the default output mode and relegating human-readable output to the explicit `--text` escape hatch
|
|
15
|
+
- removed implicit interactive fallback behavior from startup-critical paths; prompt-driven flows now require explicit `--profile human-debug --interactive`
|
|
16
|
+
- made `agent-safe` the default execution profile, so pager-off behavior, longer write timeout defaults, and explicit destructive confirmation semantics are the standard runtime path
|
|
17
|
+
- promoted the richer `linear capabilities` schema metadata to the default discovery surface and kept the legacy trimmed shape available only through explicit `--compat v1`
|
|
18
|
+
|
|
5
19
|
## [2.15.0] - 2026-04-03
|
|
6
20
|
|
|
7
21
|
### Added
|
package/README.md
CHANGED
|
@@ -1,43 +1,90 @@
|
|
|
1
1
|
# linear-cli
|
|
2
2
|
|
|
3
|
-
`linear-cli` is an agent-
|
|
3
|
+
`linear-cli` is an agent-native Linear runtime for Claude Code, Codex, and other automation that needs a stable command surface instead of screen scraping or ad-hoc GraphQL scripts. this fork of [`schpet/linear-cli`](https://github.com/schpet/linear-cli) keeps the git and [jj](https://www.jj-vcs.dev/) workflow ergonomics from upstream, then layers on stable JSON contracts, startup discovery, dry-run previews, operation receipts, and workflow-safe error semantics for agent-controlled execution.
|
|
4
4
|
|
|
5
|
-
if you want an agent to read Linear state, preview a write, apply it, and return structured output without leaving the shell, this repo is designed for that path first.
|
|
5
|
+
if you want an agent to read Linear state, resolve refs, preview a write, apply it, and return structured output without leaving the shell, this repo is designed for that path first. `main` now reflects the `v3.0.0` runtime direction: core surfaces default to machine-readable output, startup flows are non-interactive, and human-oriented terminal output is an explicit escape hatch instead of the primary product surface.
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
linear capabilities
|
|
9
|
-
linear capabilities --
|
|
10
|
-
linear resolve issue ENG-123
|
|
11
|
-
linear
|
|
12
|
-
linear issue list
|
|
13
|
-
linear issue view ENG-123
|
|
8
|
+
linear capabilities
|
|
9
|
+
linear capabilities --compat v1
|
|
10
|
+
linear resolve issue ENG-123
|
|
11
|
+
linear issue update ENG-123 --state done --dry-run --json
|
|
12
|
+
linear issue list
|
|
13
|
+
linear issue view ENG-123
|
|
14
14
|
linear issue create -t "Backfill webhook contract docs" --team ENG --dry-run --json
|
|
15
|
-
linear issue update ENG-123 --state done --comment "Shipped in v2.10.0"
|
|
16
|
-
linear project view "Automation Contract v3"
|
|
17
|
-
linear notification list
|
|
15
|
+
linear issue update ENG-123 --state done --comment "Shipped in v2.10.0"
|
|
16
|
+
linear project view "Automation Contract v3"
|
|
17
|
+
linear notification list
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
the core agent surfaces now default to machine-readable JSON. use `--text` when a human wants terminal-oriented output for ad-hoc inspection or debugging.
|
|
21
|
+
|
|
22
|
+
## what v3.0.0 means
|
|
23
|
+
|
|
24
|
+
`v3.0.0` is the release where `linear-cli` stops behaving like a mixed human/agent CLI and starts behaving like an agent-native control plane by default.
|
|
25
|
+
|
|
26
|
+
- startup discovery defaults to the richer `linear capabilities` schema
|
|
27
|
+
- startup-critical reads and representative writes default to machine-readable JSON
|
|
28
|
+
- prompt fallbacks are no longer implicit; use `--profile human-debug --interactive` when a maintainer explicitly wants them
|
|
29
|
+
- `agent-safe` is the default execution profile
|
|
30
|
+
- preview/apply/result flows share `operation`, `receipt`, and structured `error.details`
|
|
31
|
+
|
|
32
|
+
if you are integrating `linear-cli` into an agent runtime, assume the defaults above and treat `--text` plus `--profile human-debug` as secondary debugging tools.
|
|
33
|
+
|
|
34
|
+
## agent-native runtime
|
|
35
|
+
|
|
36
|
+
Treat `linear-cli` as a shell-native control plane for agents:
|
|
37
|
+
|
|
38
|
+
- startup discovery comes from `linear capabilities`
|
|
39
|
+
- startup-critical reads and core write surfaces default to machine-readable JSON
|
|
40
|
+
- refs can be normalized with `linear resolve ...`
|
|
41
|
+
- write previews use `--dry-run --json`
|
|
42
|
+
- write results expose `operation`, `receipt`, and structured `error.details`
|
|
43
|
+
- human/debug behavior is explicit with `--text` and `--profile human-debug --interactive`
|
|
44
|
+
|
|
45
|
+
The practical default loop is:
|
|
46
|
+
|
|
47
|
+
1. `linear capabilities`
|
|
48
|
+
2. `linear resolve ...`
|
|
49
|
+
3. default-JSON reads such as `linear issue view ENG-123`
|
|
50
|
+
4. `--dry-run --json` previews for writes
|
|
51
|
+
5. apply the mutation and inspect `operation`, `receipt`, and `error.details`
|
|
21
52
|
|
|
22
53
|
## for agents
|
|
23
54
|
|
|
24
55
|
If an agent only reads one page, it should be this README plus the two contract docs below.
|
|
25
56
|
|
|
26
|
-
- start with `linear capabilities
|
|
27
|
-
- use
|
|
28
|
-
- resolve ambiguous issue/team/state/user/label refs with `linear resolve
|
|
29
|
-
- prefer stable read surfaces such as `issue`, `project`, `cycle`, `milestone`, `document`, `webhook`, `notification`, `team`, `user`, `workflow-state`, `label`, `initiative`, and update feeds
|
|
57
|
+
- start with `linear capabilities` for the default schema-like discovery shape; use `linear capabilities --compat v1` only when an older consumer still expects the legacy startup shape
|
|
58
|
+
- use the default runtime for predictable non-interactive agent execution; `--profile human-debug` is the explicit escape hatch for pager and prompt-driven debugging
|
|
59
|
+
- resolve ambiguous issue/team/state/user/label refs with `linear resolve ...` before previewing or applying writes
|
|
60
|
+
- prefer stable read surfaces such as `issue`, `project`, `cycle`, `milestone`, `document`, `webhook`, `notification`, `team`, `user`, `workflow-state`, `label`, `initiative`, and update feeds; those agent-first entrypoints now default to machine-readable JSON
|
|
30
61
|
- preview writes with `--dry-run --json` before mutating Linear
|
|
31
|
-
- apply writes
|
|
62
|
+
- apply writes on default-JSON surfaces without `--text`, then inspect exit codes and `error.details` instead of parsing terminal text
|
|
63
|
+
- use `--profile human-debug --interactive` for human/debug prompt flows; missing required inputs now fail fast by default
|
|
32
64
|
- use stdin or file flags for Markdown-heavy descriptions and comments instead of long inline shell strings
|
|
33
65
|
|
|
34
66
|
Recommended docs:
|
|
35
67
|
|
|
36
68
|
- [Agent workflow guide](docs/agent-first.md)
|
|
37
69
|
- [Automation contracts](docs/json-contracts.md)
|
|
70
|
+
- [Agent-only v3 release guide](docs/agent-only-v3.md)
|
|
38
71
|
- [stdin and pipeline policy](docs/stdin-policy.md)
|
|
39
72
|
|
|
40
|
-
##
|
|
73
|
+
## migration from 2.x
|
|
74
|
+
|
|
75
|
+
If a downstream consumer still assumes the older mixed human/agent behavior, migrate in this order:
|
|
76
|
+
|
|
77
|
+
1. stop parsing styled terminal output
|
|
78
|
+
2. use `linear capabilities` for startup discovery and pin `--compat v1` only where a legacy consumer still needs it
|
|
79
|
+
3. treat `operation`, `receipt`, and `error.details` as the canonical execution surface
|
|
80
|
+
4. add `--text` anywhere a maintainer still wants terminal-oriented output
|
|
81
|
+
5. add `--profile human-debug --interactive` anywhere a maintainer still wants prompts or pager-oriented debugging
|
|
82
|
+
|
|
83
|
+
The detailed release and migration guide lives in [docs/agent-only-v3.md](docs/agent-only-v3.md).
|
|
84
|
+
|
|
85
|
+
## human-debug demos
|
|
86
|
+
|
|
87
|
+
These demos are intentionally secondary. they show the explicit human/debug escape hatch, not the primary runtime path for agents.
|
|
41
88
|
|
|
42
89
|
<details>
|
|
43
90
|
<summary><code>linear issue create</code></summary>
|
|
@@ -129,7 +176,7 @@ deno task install
|
|
|
129
176
|
compared to upstream, this fork adds and maintains capabilities aimed at automation-heavy workflows:
|
|
130
177
|
|
|
131
178
|
- stable JSON contracts for the automation tier, with machine-readable failures for parser, validation, and runtime errors
|
|
132
|
-
- a self-describing `linear capabilities
|
|
179
|
+
- a self-describing `linear capabilities` surface with richer schema and output metadata by default and an explicit `--compat v1` fallback for legacy consumers
|
|
133
180
|
- `--dry-run` previews for high-value write commands, including `issue start`, issue writes, and non-issue writes
|
|
134
181
|
- additive operation receipts on high-value JSON write success paths
|
|
135
182
|
- a shared top-level `operation` contract on representative preview/apply JSON write paths
|
|
@@ -155,22 +202,23 @@ Use the docs in this order if you are building an agent integration:
|
|
|
155
202
|
|
|
156
203
|
1. [docs/agent-first.md](docs/agent-first.md) for the recommended discover/read/preview/apply/recover loop
|
|
157
204
|
2. [docs/json-contracts.md](docs/json-contracts.md) for stable JSON payloads, exit codes, timeout semantics, and dry-run envelopes
|
|
158
|
-
3. [docs/
|
|
159
|
-
4. [
|
|
205
|
+
3. [docs/agent-only-v3.md](docs/agent-only-v3.md) for the `v3.0.0` release contract and downstream migration checklist
|
|
206
|
+
4. [docs/stdin-policy.md](docs/stdin-policy.md) for pipeline and file-input conventions
|
|
207
|
+
5. [`linear capabilities`](#automation-contract) for machine-readable command metadata at runtime
|
|
160
208
|
|
|
161
209
|
## automation contract
|
|
162
210
|
|
|
163
|
-
for bot and org-wide automation use cases, `linear-cli` defines a stable
|
|
211
|
+
for bot and org-wide automation use cases, `linear-cli` defines a stable machine-readable contract for a focused automation tier. that contract is the primary runtime surface. `--text` and prompt flows are secondary human/debug escape hatches.
|
|
164
212
|
|
|
165
|
-
to discover the curated agent-facing command surface programmatically, use `linear capabilities
|
|
213
|
+
to discover the curated agent-facing command surface programmatically, use `linear capabilities`. the default shape now returns the richer v2 schema metadata for agent-native startup. when an older consumer still expects the trimmed legacy shape, pin it explicitly with `linear capabilities --compat v1`.
|
|
166
214
|
|
|
167
|
-
`
|
|
215
|
+
`agent-safe` is now the default execution profile for agent-controlled runs. it disables pager-by-default behavior, extends the built-in write timeout to `45000ms` unless `--timeout-ms` or `LINEAR_WRITE_TIMEOUT_MS` is set, and keeps destructive confirmation bypass explicit with `--yes`. use `--profile human-debug` when a maintainer explicitly wants prompt-driven or pager-oriented debugging behavior.
|
|
168
216
|
|
|
169
217
|
non-goals:
|
|
170
218
|
|
|
171
|
-
- it does not force `--json`
|
|
219
|
+
- it does not force `--json` on commands outside the agent-native default-JSON surface
|
|
172
220
|
- it does not auto-confirm destructive actions
|
|
173
|
-
- it does not replace
|
|
221
|
+
- it does not replace explicit human/debug prompt flows; callers should pass flags, stdin, file inputs, or opt into `--profile human-debug --interactive`
|
|
174
222
|
|
|
175
223
|
- v1 in scope: `issue list/view/create/update --json`, `issue relation add/delete/list --json`, `issue comment add --json`, `team members --json`, `issue parent/children/create-batch --json`
|
|
176
224
|
- v2 additions: `project list/view --json`, `cycle list/view/current/next --json`, `milestone list/view --json`
|
|
@@ -180,7 +228,7 @@ non-goals:
|
|
|
180
228
|
- v6 additions: `resolve issue/team/workflow-state/user/label --json`
|
|
181
229
|
- out of scope: non-JSON terminal output, `linear api`, and other `--json` commands that are not listed above
|
|
182
230
|
|
|
183
|
-
the contract fixes top-level success payload shapes and requires machine-readable failure payloads for the automation tier. see [docs/json-contracts.md](docs/json-contracts.md) for the full contract, compatibility rules, and example payloads. that guarantee also covers parser and argument validation failures when
|
|
231
|
+
the contract fixes top-level success payload shapes and requires machine-readable failure payloads for the automation tier. see [docs/json-contracts.md](docs/json-contracts.md) for the full contract, compatibility rules, and example payloads. that guarantee also covers parser and argument validation failures when the command is in machine-readable mode, whether that is the default or was requested explicitly with `--json`.
|
|
184
232
|
|
|
185
233
|
for automation consumers, auth and authorization failures now use exit code `4`, free-plan or workspace-plan limit failures use exit code `5`, and client-side write confirmation timeouts use exit code `6`. other contract failures remain non-zero and currently use `1`. rate-limited responses remain on exit code `1`, but now include retry guidance and, when available, `error.details.rateLimit` metadata.
|
|
186
234
|
|
|
@@ -188,7 +236,7 @@ high-value write commands honor `LINEAR_WRITE_TIMEOUT_MS` and accept `--timeout-
|
|
|
188
236
|
|
|
189
237
|
the same document also defines the shared preview contract for future `--dry-run` write commands. those commands are not all implemented yet, but the contract now fixes the expected `stdout`, `exit code`, and `--json --dry-run` envelope shape ahead of rollout.
|
|
190
238
|
|
|
191
|
-
representative preview/apply JSON write paths may add a top-level `operation` field so agents can diff preview intent against apply results with one parser path. successful high-value JSON writes may also add a top-level `receipt` field. this gives agents a shared place to inspect `operationId`, `resolvedRefs`, `appliedChanges`, `noOp`, and `nextSafeAction` without inferring those traits from command-specific payload fields.
|
|
239
|
+
representative preview/apply JSON write paths may add a top-level `operation` field so agents can diff preview intent against apply results with one parser path. successful high-value JSON writes may also add a top-level `receipt` field. this gives agents a shared place to inspect `operationId`, `resolvedRefs`, `appliedChanges`, `noOp`, and `nextSafeAction` without inferring those traits from command-specific payload fields. current coverage includes issue create/update/comment/relation, issue batch creation, issue assignment/estimate/move/priority, project create and label add/remove, webhook create/update/delete, and notification read/archive.
|
|
192
240
|
|
|
193
241
|
destructive commands use `--yes` as the canonical confirmation-bypass flag. legacy `--force` and `--confirm` flags are still accepted where older workflows already depended on them.
|
|
194
242
|
|
|
@@ -219,17 +267,17 @@ this fork is intentionally diverging from upstream in a few ways:
|
|
|
219
267
|
2. authenticate with the CLI:
|
|
220
268
|
|
|
221
269
|
```sh
|
|
222
|
-
linear auth login
|
|
270
|
+
linear auth login --profile human-debug --interactive
|
|
223
271
|
```
|
|
224
272
|
|
|
225
273
|
3. configure your project:
|
|
226
274
|
|
|
227
275
|
```sh
|
|
228
276
|
cd my-project-repo
|
|
229
|
-
linear config
|
|
277
|
+
linear config --profile human-debug --interactive
|
|
230
278
|
```
|
|
231
279
|
|
|
232
|
-
see [docs/authentication.md](docs/authentication.md) for multi-workspace support and other authentication options.
|
|
280
|
+
For unattended agent runtimes, prefer injected credentials and explicit config over prompt flows. see [docs/authentication.md](docs/authentication.md) for multi-workspace support and other authentication options.
|
|
233
281
|
|
|
234
282
|
the CLI works with both git and jj version control systems:
|
|
235
283
|
|
|
@@ -248,11 +296,11 @@ the current issue is determined by:
|
|
|
248
296
|
note that [Linear's GitHub integration](https://linear.app/docs/github#branch-format) will suggest git branch names.
|
|
249
297
|
|
|
250
298
|
```bash
|
|
251
|
-
linear issue view #
|
|
299
|
+
linear issue view # emit machine-readable current issue details
|
|
252
300
|
linear issue view ABC-123
|
|
253
301
|
linear issue view 123
|
|
254
|
-
linear issue view ABC-123 --
|
|
255
|
-
linear issue view ABC-123 --
|
|
302
|
+
linear issue view ABC-123 --text # human/debug output
|
|
303
|
+
linear issue view ABC-123 --no-comments # skip raw comments but keep commentsSummary
|
|
256
304
|
linear issue view -w # open issue in web browser
|
|
257
305
|
linear issue view -a # open issue in Linear.app
|
|
258
306
|
linear issue id # prints the issue id from current branch (e.g., "ENG-123")
|
|
@@ -269,9 +317,10 @@ linear issue list --all-states --query auth --priority high --updated-before 202
|
|
|
269
317
|
linear issue list --parent ENG-100 --json # filter sub-issues of a parent issue
|
|
270
318
|
linear issue list -w # open issue list in web browser
|
|
271
319
|
linear issue list -a # open issue list in Linear.app
|
|
272
|
-
linear issue start
|
|
320
|
+
linear issue start ENG-123 # create/switch to issue branch and mark as started
|
|
321
|
+
linear issue start --interactive # choose an issue interactively in a terminal
|
|
273
322
|
linear issue start ENG-123 --dry-run # preview the branch and target state
|
|
274
|
-
linear issue create
|
|
323
|
+
linear issue create --interactive # create a new issue with interactive prompts
|
|
275
324
|
linear issue create -t "title" -d "description" # create with flags
|
|
276
325
|
cat description.md | linear issue create -t "title" --team ENG # read description from stdin
|
|
277
326
|
linear issue create -t "title" --team ENG --json # emit machine-readable created issue data
|
|
@@ -279,7 +328,7 @@ linear issue create -t "title" --team ENG --dry-run --json # preview the create
|
|
|
279
328
|
linear issue create-batch --file ./issue-batch.json --json # create a parent issue and child issues from JSON
|
|
280
329
|
linear issue create-batch --file ./issue-batch.json --dry-run --json # preview a batch without creating issues
|
|
281
330
|
linear issue create --project "My Project" --milestone "Phase 1" # create with milestone
|
|
282
|
-
linear issue update
|
|
331
|
+
linear issue update ENG-123 --interactive # update an issue with interactive prompts
|
|
283
332
|
cat description.md | linear issue update ENG-123 --state started # read description from stdin
|
|
284
333
|
linear issue update ENG-123 --due-date 2026-03-31 # set an issue due date
|
|
285
334
|
linear issue update ENG-123 --clear-due-date # clear an issue due date
|
|
@@ -506,7 +555,7 @@ linear user view <userId> --json # emit contract-stable user details
|
|
|
506
555
|
```bash
|
|
507
556
|
linear --help # show all commands
|
|
508
557
|
linear --version # show version
|
|
509
|
-
linear config
|
|
558
|
+
linear config --profile human-debug --interactive # maintainer setup flow
|
|
510
559
|
linear completions # generate shell completions
|
|
511
560
|
```
|
|
512
561
|
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"hasInstallScript": true,
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"name": "@kyaukyuai/linear-cli",
|
|
26
|
-
"version": "
|
|
26
|
+
"version": "3.0.0"
|
|
27
27
|
},
|
|
28
28
|
"node_modules/@isaacs/cliui": {
|
|
29
29
|
"engines": {
|
|
@@ -542,5 +542,5 @@
|
|
|
542
542
|
}
|
|
543
543
|
},
|
|
544
544
|
"requires": true,
|
|
545
|
-
"version": "
|
|
545
|
+
"version": "3.0.0"
|
|
546
546
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"artifactDownloadUrls": [
|
|
3
|
-
"https://github.com/kyaukyuai/linear-cli/releases/download/
|
|
3
|
+
"https://github.com/kyaukyuai/linear-cli/releases/download/v3.0.0"
|
|
4
4
|
],
|
|
5
5
|
"bin": {
|
|
6
6
|
"linear": "run-linear.js"
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"zipExt": ".tar.xz"
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
|
-
"version": "
|
|
88
|
+
"version": "3.0.0",
|
|
89
89
|
"volta": {
|
|
90
90
|
"node": "18.14.1",
|
|
91
91
|
"npm": "9.5.0"
|