Skip to content

feat: add --json flag to issue list, issue create, and cycle list#179

Open
mihai-chiorean wants to merge 2 commits intoschpet:mainfrom
mihai-chiorean:feat/json-output
Open

feat: add --json flag to issue list, issue create, and cycle list#179
mihai-chiorean wants to merge 2 commits intoschpet:mainfrom
mihai-chiorean:feat/json-output

Conversation

@mihai-chiorean
Copy link

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

  • Added snapshot test for issue list --json with mock server
  • Added snapshot test for issue create --json with mock server
  • Added snapshot test for cycle list --json with mock server
  • Updated help text snapshots for all three commands
  • deno fmt clean
  • deno lint clean
  • All new tests pass, existing tests unaffected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant