Skip to content

feat: add cycle list/view commands and issue list --cycle filter#162

Merged
schpet merged 2 commits intoschpet:mainfrom
regaw-leinad:feat/cycle-support
Mar 4, 2026
Merged

feat: add cycle list/view commands and issue list --cycle filter#162
schpet merged 2 commits intoschpet:mainfrom
regaw-leinad:feat/cycle-support

Conversation

@regaw-leinad
Copy link
Contributor

Summary

  • Add linear cycle list and linear cycle view commands for browsing team cycles
  • Add --cycle filter to linear issue list for filtering issues by cycle
  • Regenerate skill docs to include new commands

Problem

PR #150 added cycle support to issue create/update/view, but there was no way to browse cycles themselves or filter issue lists by cycle. Users had to know cycle names/numbers without being able to look them up from the CLI. See #64.

Fix

Adds a cycle command group (aliased cy) with two subcommands, following the same patterns as the existing milestone commands:

cycle list shows all cycles for a team with number, name, dates, and status. Active cycle is highlighted in green, upcoming cycles use default color, and completed/past cycles are muted.

$ linear cycle list --team XXX
#  NAME       START      END        STATUS
3  Sprint 3   2026-03-10 2026-03-24 Upcoming
2  Sprint 2   2026-02-24 2026-03-10 Active
1  Sprint 1   2026-02-10 2026-02-24 Completed

cycle view shows full cycle details including a progress indicator, description, issue breakdown by state, and first 10 issues. Accepts cycle name, number, or "active".

$ linear cycle view active --team XXX
# Sprint 2

**Number:** 2
**Start:** 2026-02-24
**End:** 2026-03-10
**Status:** Active
**Team:** MyTeam (XXX)

## Issues

**Progress:** 17/50 (34%)
**Total Issues:** 50
**Completed:** 17
**In Progress:** 12
**To Do:** 21

**Issues:**
- XXX-412: Fix auth token refresh (In Progress)
- XXX-398: Add dark mode toggle (Todo)
...

issue list --cycle filters the issue list to a specific cycle, reusing the existing getCycleIdByNameOrNumber() utility and the GraphQL IssueFilter.cycle field.

$ linear issue list --cycle active --team XXX --sort priority
◌   ID      TITLE                  LABELS          E STATE UPDATED
--- XXX-101 Some task              Backend, Feature - Todo  1 day ago
--- XXX-102 Another task           Feature          - Todo  1 day ago

Why

Cycles are a core part of the Linear workflow and the CLI should support browsing them. cycle list lets you see what's available, cycle view gives you sprint progress at a glance, and --cycle on issue list lets you scope your view to a specific sprint.

Test Plan

  • Tested all three commands against a real Linear workspace with 11 cycles and 50+ issues
  • cycle view tested with active, by number, and by exact name lookup
  • All 220 unit/snapshot tests pass

@schpet
Copy link
Owner

schpet commented Mar 4, 2026

@regaw-leinad wonderful thank you! i'll take a look at this sometime soon. in the interim, can you let me know if you've tried this out / confirmed it works for you? squinting at it, it looks right, but i always like to ensure some human verification was done.

@regaw-leinad
Copy link
Contributor Author

@schpet yeah! tested all three commands against my startup's Linear workspace and everything worked. here's what it looks like (changed the actual data but the structure is the same):

$ linear cycle list --team XXX
#  NAME       START      END        STATUS
4  Sprint 4   2026-03-17 2026-03-31 Upcoming
3  Sprint 3   2026-03-03 2026-03-17 Active
2  Sprint 2   2026-02-17 2026-03-03 Completed
1  Sprint 1   2026-02-03 2026-02-17 Completed
$ linear cycle view 3 --team XXX
# Sprint 3
**Number:** 3
**Start:** 2026-03-03
**End:** 2026-03-17
**Status:** Active
**Team:** MyTeam (XXX)

## Issues
**Progress:** 17/50 (34%)
**Total Issues:** 50
**Completed:** 17
**In Progress:** 13
**To Do:** 20

**Issues:**
- XXX-110: Fix dashboard display issue (In Progress)
- XXX-108: Document supported OS versions (In Progress)
- XXX-105: Upgrade dependency to fix vulnerability (Done)
- XXX-101: Some feature request (Todo)
- XXX-100: Another feature request (Todo)
_...and 45 more issues_
$ linear issue list --cycle 3 --team XXX
◌   ID      TITLE                LABELS           E STATE UPDATED
--- XXX-101 Some feature         Backend, Feature - Todo  1 day ago
--- XXX-100 Another feature      Feature, Scout   - Todo  1 day ago

also ran the full test suite, 213 passing.

@schpet schpet merged commit ca3b04b into schpet:main Mar 4, 2026
7 checks passed
@schpet
Copy link
Owner

schpet commented Mar 4, 2026

@regaw-leinad cool! well that's awesome, this has been a gap for a while so i appreciate this. if you notice anything to do with cycles, don't hesitate to make a pr or file an issue – i don't use them so i'm unlikely to notice anything isn't working right.

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.

2 participants