Files
Mihai Chiorean 16ae8ae9ce feat: add --json flag to issue list, issue create, and cycle list (#179)
## Summary

Adds `--json` / `-j` flag to three commands that were missing structured
output support:

- **`issue list --json`** — outputs issues as a JSON array with `id`,
`identifier`, `title`, `priority`, `estimate`, `state`, `labels`,
`assignee`, and `updatedAt`
- **`issue create --json`** — outputs the created issue's `id`,
`identifier`, `url`, and `team` as JSON (non-interactive path only)
- **`cycle list --json`** — outputs cycles as a JSON array with `id`,
`number`, `name`, `startsAt`, `endsAt`, `completedAt`, `isActive`,
`isFuture`, `isPast`, and `status`

When `--json` is set, the spinner is suppressed and empty results output
`[]` instead of human-readable messages.

This is particularly useful for AI agents and automation that need to
parse CLI output programmatically. The `linear api` raw GraphQL command
works as a workaround today, but first-class `--json` support on
list/create commands is much more ergonomic.

Related: #127 (requests `--json` on project commands — this PR covers
issue and cycle commands using the same pattern)

## Test plan

- [x] Added snapshot test for `issue list --json` with mock server
- [x] Added snapshot test for `issue create --json` with mock server
- [x] Added snapshot test for `cycle list --json` with mock server
- [x] Updated help text snapshots for all three commands
- [x] `deno fmt` clean
- [x] `deno lint` clean
- [x] All new tests pass, existing tests unaffected
2026-03-31 04:35:22 +00:00

202 KiB