@dabble/linear-cli 1.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/README.md +169 -0
- package/bin/linear.mjs +2068 -0
- package/claude/commands/done.md +65 -0
- package/claude/commands/next.md +94 -0
- package/claude/commands/standup.md +63 -0
- package/claude/skills/linear-cli.md +193 -0
- package/claude/skills/product-planning.md +136 -0
- package/package.json +35 -0
- package/postinstall.mjs +54 -0
- package/preuninstall.mjs +52 -0
package/README.md
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# @dabble/linear-cli
|
|
2
|
+
|
|
3
|
+
A cross-platform Linear CLI with unblocked issue filtering, built for AI-assisted development.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @dabble/linear-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
This installs:
|
|
12
|
+
- The `linear` command globally
|
|
13
|
+
- A Claude Code skill to `~/.claude/skills/linear-cli.md`
|
|
14
|
+
- The `/next` command to `~/.claude/commands/next.md`
|
|
15
|
+
- Permission for Claude to use `linear` in `~/.claude/settings.json`
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# First-time setup (opens browser, prompts for API key, pick team)
|
|
21
|
+
linear login
|
|
22
|
+
|
|
23
|
+
# Find issues ready to work on (no blockers)
|
|
24
|
+
linear issues --unblocked
|
|
25
|
+
|
|
26
|
+
# View issue details
|
|
27
|
+
linear issue show ISSUE-1
|
|
28
|
+
|
|
29
|
+
# Update issue with notes
|
|
30
|
+
linear issue update ISSUE-1 --append "Found the root cause..."
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Features
|
|
34
|
+
|
|
35
|
+
- **`--unblocked` filter**: Find issues with no active blockers—our killer feature
|
|
36
|
+
- **Per-project config**: Different Linear accounts per directory (`./.linear`)
|
|
37
|
+
- **Full CRUD**: Issues, sub-issues, projects, comments
|
|
38
|
+
- **Cross-platform**: Works on macOS, Linux, and Windows
|
|
39
|
+
- **Zero dependencies**: Uses only Node.js built-ins (requires Node 18+)
|
|
40
|
+
- **Claude Code skill**: Auto-installs skill file for AI-assisted workflows
|
|
41
|
+
|
|
42
|
+
## Commands
|
|
43
|
+
|
|
44
|
+
### Authentication
|
|
45
|
+
```bash
|
|
46
|
+
linear login # Interactive setup, saves to ./.linear
|
|
47
|
+
linear login --global # Save to ~/.linear instead
|
|
48
|
+
linear logout # Remove config
|
|
49
|
+
linear whoami # Show current user and team
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Issues
|
|
53
|
+
```bash
|
|
54
|
+
linear issues --unblocked # Ready to work on
|
|
55
|
+
linear issues --open # All non-completed issues
|
|
56
|
+
linear issues --in-progress # Issues in progress
|
|
57
|
+
linear issues --mine # Only your issues
|
|
58
|
+
linear issues --label bug # Filter by label
|
|
59
|
+
linear issue show ISSUE-1 # Full details with parent context
|
|
60
|
+
linear issue start ISSUE-1 # Assign to you + set In Progress
|
|
61
|
+
linear issue create --title "..." --project "Phase 1" --assign --estimate M
|
|
62
|
+
linear issue create --title "..." --blocked-by ISSUE-2
|
|
63
|
+
linear issue create --title "Sub-task" --parent ISSUE-1
|
|
64
|
+
linear issue update ISSUE-1 --append "Notes..."
|
|
65
|
+
linear issue update ISSUE-1 --blocks ISSUE-3
|
|
66
|
+
linear issue close ISSUE-1
|
|
67
|
+
linear issue comment ISSUE-1 "Comment"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Git Integration
|
|
71
|
+
```bash
|
|
72
|
+
linear branch ISSUE-1 # Create branch: ISSUE-1-issue-title
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Worktrees (Parallel Development)
|
|
76
|
+
```bash
|
|
77
|
+
linear next # Pick an issue, create worktree, start Claude
|
|
78
|
+
linear next --dry-run # Preview what would happen
|
|
79
|
+
linear done # Close issue, show worktree cleanup commands
|
|
80
|
+
linear done --no-close # Just show cleanup commands
|
|
81
|
+
linear standup # Daily standup summary (Linear + GitHub)
|
|
82
|
+
linear standup --no-github # Linear only
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
The `next` command creates isolated git worktrees for each issue, making it easy to work on multiple issues in parallel with Claude Code. Worktrees are stored in `~/.claude-worktrees/<repo>/<branch>`.
|
|
86
|
+
|
|
87
|
+
**Shell setup** (add to `~/.zshrc` or `~/.bashrc`):
|
|
88
|
+
```bash
|
|
89
|
+
lnext() { eval "$(linear next "$@")"; }
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Then use `lnext` to:
|
|
93
|
+
1. See a list of unblocked issues
|
|
94
|
+
2. Pick one interactively
|
|
95
|
+
3. Create a git worktree in `~/.claude-worktrees/`
|
|
96
|
+
4. Copy `.worktreeinclude` files (like `.linear`)
|
|
97
|
+
5. Run package manager install
|
|
98
|
+
6. Change to the worktree directory
|
|
99
|
+
7. Launch Claude in plan mode with the issue context
|
|
100
|
+
|
|
101
|
+
**`.worktreeinclude` file**: List gitignored files/directories that should be copied to new worktrees:
|
|
102
|
+
```
|
|
103
|
+
.linear
|
|
104
|
+
.env
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Labels
|
|
108
|
+
```bash
|
|
109
|
+
linear labels # List all labels
|
|
110
|
+
linear label create "bug" --color "#FF0000"
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Projects
|
|
114
|
+
```bash
|
|
115
|
+
linear projects # Active projects
|
|
116
|
+
linear projects --all # Include completed
|
|
117
|
+
linear project show "Phase 1" # Details with issues
|
|
118
|
+
linear project create "Name" --description "..."
|
|
119
|
+
linear project complete "Phase 1" # Mark done
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Configuration
|
|
123
|
+
|
|
124
|
+
Config is loaded in order:
|
|
125
|
+
1. `./.linear` (project-specific)
|
|
126
|
+
2. `~/.linear` (global fallback)
|
|
127
|
+
3. Environment variables
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
# .linear file format
|
|
131
|
+
api_key=lin_api_xxx
|
|
132
|
+
team=ISSUE
|
|
133
|
+
|
|
134
|
+
# Or use environment variables
|
|
135
|
+
export LINEAR_API_KEY=lin_api_xxx
|
|
136
|
+
export LINEAR_TEAM=ISSUE
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Claude Code Integration
|
|
140
|
+
|
|
141
|
+
This CLI is designed to work seamlessly with Claude Code. After installation:
|
|
142
|
+
|
|
143
|
+
- **Skill file** (`~/.claude/skills/linear-cli.md`): Teaches Claude how to use the CLI, including workflow guidelines and git conventions.
|
|
144
|
+
|
|
145
|
+
- **`/next` command** (`~/.claude/commands/next.md`): Run `/next` in Claude Code to find your next issue to work on.
|
|
146
|
+
- `/next` - List unblocked issues to choose from
|
|
147
|
+
- `/next ISSUE-12` - Skip selection, start working on a specific issue
|
|
148
|
+
- Always enters plan mode to design the implementation before coding
|
|
149
|
+
- Includes "Product planning" option to brainstorm features or review backlog
|
|
150
|
+
|
|
151
|
+
- **`/done` command** (`~/.claude/commands/done.md`): Run `/done` to wrap up work on an issue.
|
|
152
|
+
- Summarizes commits and changes made
|
|
153
|
+
- Offers to create PR, add notes, and/or close the issue
|
|
154
|
+
- Shows worktree cleanup commands if in a worktree
|
|
155
|
+
|
|
156
|
+
- **`/standup` command** (`~/.claude/commands/standup.md`): Run `/standup` for daily standup.
|
|
157
|
+
- Shows issues completed yesterday, in progress today, and blocked
|
|
158
|
+
- Includes GitHub commits and PRs from yesterday
|
|
159
|
+
- Offers to draft a standup message
|
|
160
|
+
|
|
161
|
+
- **Global permission**: Adds `Bash(linear:*)` to `~/.claude/settings.json` so Claude can use the CLI anywhere without prompting.
|
|
162
|
+
|
|
163
|
+
## Why This Exists
|
|
164
|
+
|
|
165
|
+
We tried existing Linear CLIs but hit bugs. This CLI does exactly what we need with zero npm dependencies.
|
|
166
|
+
|
|
167
|
+
## License
|
|
168
|
+
|
|
169
|
+
MIT
|