claude-queue 1.3.3 → 1.5.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/Makefile +37 -0
- package/README.md +198 -0
- package/claude-queue.sh +954 -0
- package/package.json +13 -49
- package/dist/cli.js +0 -686
- package/dist/mcp/index.d.ts +0 -1
- package/dist/mcp/index.js +0 -577
- package/dist/mcp.js +0 -8
- package/dist/server/index.js +0 -1379
- package/dist/skills/queue/SKILL.md +0 -153
- package/dist/ui/assets/index-CGuz4rUk.css +0 -1
- package/dist/ui/assets/index-yyLY0y4s.js +0 -90
- package/dist/ui/index.html +0 -15
- package/dist/ui/sounds/complete.mp3 +0 -0
- package/dist/ui/sounds/question.mp3 +0 -0
- package/dist/ui/sounds/start.mp3 +0 -0
package/Makefile
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.PHONY: patch minor major publish
|
|
2
|
+
|
|
3
|
+
patch:
|
|
4
|
+
npm version patch --no-git-tag-version
|
|
5
|
+
@echo "Bumped to $$(node -p "require('./package.json').version")"
|
|
6
|
+
|
|
7
|
+
minor:
|
|
8
|
+
npm version minor --no-git-tag-version
|
|
9
|
+
@echo "Bumped to $$(node -p "require('./package.json').version")"
|
|
10
|
+
|
|
11
|
+
major:
|
|
12
|
+
npm version major --no-git-tag-version
|
|
13
|
+
@echo "Bumped to $$(node -p "require('./package.json').version")"
|
|
14
|
+
|
|
15
|
+
publish: patch
|
|
16
|
+
git add -A
|
|
17
|
+
git commit -m "v$$(node -p "require('./package.json').version")"
|
|
18
|
+
git tag "v$$(node -p "require('./package.json').version")"
|
|
19
|
+
npm publish
|
|
20
|
+
git push origin main --tags
|
|
21
|
+
@echo "Published v$$(node -p "require('./package.json').version")"
|
|
22
|
+
|
|
23
|
+
publish-minor: minor
|
|
24
|
+
git add -A
|
|
25
|
+
git commit -m "v$$(node -p "require('./package.json').version")"
|
|
26
|
+
git tag "v$$(node -p "require('./package.json').version")"
|
|
27
|
+
npm publish
|
|
28
|
+
git push origin main --tags
|
|
29
|
+
@echo "Published v$$(node -p "require('./package.json').version")"
|
|
30
|
+
|
|
31
|
+
publish-major: major
|
|
32
|
+
git add -A
|
|
33
|
+
git commit -m "v$$(node -p "require('./package.json').version")"
|
|
34
|
+
git tag "v$$(node -p "require('./package.json').version")"
|
|
35
|
+
npm publish
|
|
36
|
+
git push origin main --tags
|
|
37
|
+
@echo "Published v$$(node -p "require('./package.json').version")"
|
package/README.md
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# claude-queue
|
|
2
|
+
|
|
3
|
+
Automated GitHub issue solver & creator. Create well-structured issues from a text dump or interactive interview, then let Claude Code solve them overnight.
|
|
4
|
+
|
|
5
|
+
claude-queue has two modes:
|
|
6
|
+
- **Solve** (default) — fetches open issues, uses [Claude Code](https://docs.anthropic.com/en/docs/claude-code) to solve each one, and opens a pull request
|
|
7
|
+
- **Create** — decomposes a description into well-structured GitHub issues, either from inline text or via an interactive interview
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
- [GitHub CLI](https://cli.github.com/) (`gh`) — authenticated
|
|
12
|
+
- [Claude Code](https://docs.anthropic.com/en/docs/claude-code) (`claude`) — installed and configured
|
|
13
|
+
- `git` and `jq`
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install -g claude-queue
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Or run directly with npx:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx claude-queue
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
### Solving issues
|
|
30
|
+
|
|
31
|
+
Run from inside any git repository with GitHub issues:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
claude-queue
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
#### Solve options
|
|
38
|
+
|
|
39
|
+
| Flag | Default | Description |
|
|
40
|
+
|------|---------|-------------|
|
|
41
|
+
| `--max-retries N` | `3` | Max retry attempts per issue before marking it failed |
|
|
42
|
+
| `--max-turns N` | `50` | Max Claude Code turns per attempt (prevents runaway sessions) |
|
|
43
|
+
| `--label LABEL` | all issues | Only process issues that have this label |
|
|
44
|
+
| `--model MODEL` | CLI default | Claude model to use (e.g. `claude-sonnet-4-5-20250929`) |
|
|
45
|
+
| `-h, --help` | | Show help |
|
|
46
|
+
|
|
47
|
+
#### Solve examples
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Solve all open issues
|
|
51
|
+
claude-queue
|
|
52
|
+
|
|
53
|
+
# Only solve issues labeled "bug"
|
|
54
|
+
claude-queue --label bug
|
|
55
|
+
|
|
56
|
+
# Use a specific model with more retries
|
|
57
|
+
claude-queue --max-retries 5 --model claude-sonnet-4-5-20250929
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Creating issues
|
|
61
|
+
|
|
62
|
+
Generate well-structured GitHub issues from a text description or an interactive interview with Claude.
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
claude-queue create "Add dark mode and fix the login bug"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
There are three ways to provide input:
|
|
69
|
+
|
|
70
|
+
1. **Inline text** — pass your description as an argument
|
|
71
|
+
2. **Stdin** — run `claude-queue create` with no arguments, type or paste your text, then press Ctrl+D
|
|
72
|
+
3. **Interactive** — run `claude-queue create -i` and Claude will ask clarifying questions before generating issues
|
|
73
|
+
|
|
74
|
+
In all modes, Claude decomposes the input into individual, actionable issues with titles, markdown bodies, and labels (reusing existing repo labels where possible). You get a preview before anything is created.
|
|
75
|
+
|
|
76
|
+
#### Create options
|
|
77
|
+
|
|
78
|
+
| Flag | Default | Description |
|
|
79
|
+
|------|---------|-------------|
|
|
80
|
+
| `-i, --interactive` | off | Interview mode — Claude asks clarifying questions first |
|
|
81
|
+
| `--label LABEL` | none | Add this label to every created issue |
|
|
82
|
+
| `--model MODEL` | CLI default | Claude model to use |
|
|
83
|
+
| `-h, --help` | | Show help for create |
|
|
84
|
+
|
|
85
|
+
#### Create examples
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# Create issues from a text description
|
|
89
|
+
claude-queue create "Add user avatars, implement search, and fix the 404 on /settings"
|
|
90
|
+
|
|
91
|
+
# Interactive mode — Claude asks questions first
|
|
92
|
+
claude-queue create -i
|
|
93
|
+
|
|
94
|
+
# Paste a longer description via stdin
|
|
95
|
+
claude-queue create
|
|
96
|
+
|
|
97
|
+
# Add a label to all created issues (useful with --label on solve)
|
|
98
|
+
claude-queue create --label backlog "Refactor the auth module and add rate limiting"
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Workflow: create then solve
|
|
102
|
+
|
|
103
|
+
The `--label` flag on both commands lets you create a workflow where `create` plans the issues and bare `claude-queue` solves them:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# Plan: create issues tagged "nightshift"
|
|
107
|
+
claude-queue create --label nightshift "Add dark mode and fix the login bug"
|
|
108
|
+
|
|
109
|
+
# Solve: only process those issues
|
|
110
|
+
claude-queue --label nightshift
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Configuration
|
|
114
|
+
|
|
115
|
+
Create a `.claude-queue` file in your repo root to add custom instructions to every issue prompt:
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
Always run `npm test` after making changes.
|
|
119
|
+
Use TypeScript strict mode.
|
|
120
|
+
Never modify files in the src/legacy/ directory.
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
These instructions are appended to the prompt Claude receives for each issue. This is useful for project-specific conventions that aren't captured in `CLAUDE.md`.
|
|
124
|
+
|
|
125
|
+
## How It Works
|
|
126
|
+
|
|
127
|
+
### 1. Preflight
|
|
128
|
+
|
|
129
|
+
Verifies all dependencies are available (`gh`, `claude`, `git`, `jq`), checks that `gh` is authenticated, and ensures the git working tree is clean. Aborts immediately if anything is missing.
|
|
130
|
+
|
|
131
|
+
### 2. Label Setup
|
|
132
|
+
|
|
133
|
+
Creates three labels on the repo (skips if they already exist):
|
|
134
|
+
|
|
135
|
+
| Label | Color | Meaning |
|
|
136
|
+
|-------|-------|---------|
|
|
137
|
+
| `claude-queue:in-progress` | Yellow | Currently being worked on |
|
|
138
|
+
| `claude-queue:solved` | Green | Successfully fixed |
|
|
139
|
+
| `claude-queue:failed` | Red | Could not be solved after all retries |
|
|
140
|
+
|
|
141
|
+
These labels let you see at a glance which issues were handled and what the outcome was.
|
|
142
|
+
|
|
143
|
+
### 3. Branch
|
|
144
|
+
|
|
145
|
+
Creates a single branch `claude-queue/YYYY-MM-DD` off your default branch. All fixes for the night go into this one branch. If the branch already exists (e.g. from a previous run), a timestamp suffix is added.
|
|
146
|
+
|
|
147
|
+
### 4. Issue Processing
|
|
148
|
+
|
|
149
|
+
For each open issue (up to 200, oldest first):
|
|
150
|
+
|
|
151
|
+
- **Skip check** — issues that already have any `claude-queue:*` label are skipped. Remove the label to re-process.
|
|
152
|
+
- **Label** — marks the issue `claude-queue:in-progress`
|
|
153
|
+
- **Solve** — launches a fresh Claude Code process (`claude -p`) with a prompt that tells it to:
|
|
154
|
+
- Read the issue via `gh issue view`
|
|
155
|
+
- Explore the codebase
|
|
156
|
+
- Implement a fix
|
|
157
|
+
- Run existing tests
|
|
158
|
+
- **Evaluate** — if Claude produced file changes, they are committed. If not, the attempt is retried.
|
|
159
|
+
- **Retry** — on failure, the working tree is reset to the last checkpoint (`git reset --hard`) and Claude gets a completely fresh context. Up to 3 attempts per issue (configurable with `--max-retries`).
|
|
160
|
+
- **Label result** — marks the issue `claude-queue:solved` or `claude-queue:failed`
|
|
161
|
+
|
|
162
|
+
Each issue is solved sequentially so later fixes build on top of earlier ones — all in a single branch.
|
|
163
|
+
|
|
164
|
+
### 5. Pull Request
|
|
165
|
+
|
|
166
|
+
Once all issues are processed, the branch is pushed and a PR is opened with:
|
|
167
|
+
|
|
168
|
+
- **Summary table** — solved/failed/skipped counts and run duration
|
|
169
|
+
- **Solved issues** — table of all issues that were fixed with links
|
|
170
|
+
- **Failed issues** — table of issues that couldn't be solved
|
|
171
|
+
- **Chain logs** — collapsible per-issue logs showing Claude's full output for each attempt
|
|
172
|
+
|
|
173
|
+
If no issues were solved, no PR is created.
|
|
174
|
+
|
|
175
|
+
### Interruption Handling
|
|
176
|
+
|
|
177
|
+
If the script is interrupted (Ctrl+C, SIGTERM), it:
|
|
178
|
+
- Removes the `claude-queue:in-progress` label from the current issue
|
|
179
|
+
- Marks it as `claude-queue:failed`
|
|
180
|
+
- Prints where your commits and logs are so nothing is lost
|
|
181
|
+
|
|
182
|
+
## Logs
|
|
183
|
+
|
|
184
|
+
Full logs for each run are saved to `/tmp/claude-queue-DATE-TIMESTAMP/`:
|
|
185
|
+
|
|
186
|
+
```
|
|
187
|
+
/tmp/claude-queue-2025-03-15-220530/
|
|
188
|
+
├── issue-42.md # Combined log for issue #42
|
|
189
|
+
├── issue-42-attempt-1.log # Raw Claude output, attempt 1
|
|
190
|
+
├── issue-42-attempt-2.log # Raw Claude output, attempt 2
|
|
191
|
+
├── issue-57.md
|
|
192
|
+
├── issue-57-attempt-1.log
|
|
193
|
+
└── pr-body.md # The generated PR description
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## License
|
|
197
|
+
|
|
198
|
+
MIT
|