claude-queue 1.5.1 → 1.5.2

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 CHANGED
@@ -36,18 +36,31 @@ claude-queue
36
36
 
37
37
  | Flag | Default | Description |
38
38
  |------|---------|-------------|
39
+ | `--issue ID` | all issues | Solve specific issue(s) by ID, URL, or comma-separated IDs |
39
40
  | `--max-retries N` | `3` | Max retry attempts per issue before marking it failed |
40
41
  | `--max-turns N` | `50` | Max Claude Code turns per attempt |
41
- | `--label LABEL` | all issues | Only process issues with this label |
42
+ | `--label LABEL` | all issues | Only process issues with this label (can be repeated) |
42
43
  | `--model MODEL` | CLI default | Claude model to use (e.g. `claude-sonnet-4-5-20250929`) |
43
44
 
44
45
  ```bash
45
46
  # Solve all open issues
46
47
  claude-queue
47
48
 
49
+ # Solve a specific issue by number
50
+ claude-queue --issue 42
51
+
52
+ # Solve a specific issue by URL
53
+ claude-queue --issue https://github.com/owner/repo/issues/42
54
+
55
+ # Solve multiple specific issues
56
+ claude-queue --issue 1,2,3
57
+
48
58
  # Only solve issues labeled "bug"
49
59
  claude-queue --label bug
50
60
 
61
+ # Filter by multiple labels
62
+ claude-queue --label bug --label urgent
63
+
51
64
  # Use a specific model with more retries
52
65
  claude-queue --max-retries 5 --model claude-sonnet-4-5-20250929
53
66
  ```
@@ -128,9 +141,9 @@ Creates a branch `claude-queue/YYYY-MM-DD` off your default branch. All fixes go
128
141
 
129
142
  ### Issue processing
130
143
 
131
- For each open issue (up to 200, oldest first):
144
+ For each open issue (up to 200, oldest first), or for the specific issues passed via `--issue`:
132
145
 
133
- 1. **Skip** — issues with any `claude-queue:*` label are skipped. Remove the label to re-process.
146
+ 1. **Skip** — issues with any `claude-queue:*` label are skipped (unless targeted via `--issue`). Remove the label to re-process.
134
147
  2. **Label** — marks the issue `claude-queue:in-progress`.
135
148
  3. **Solve** — launches Claude Code with a prompt to read the issue, explore the codebase, implement a fix, and run tests.
136
149
  4. **Evaluate** — if Claude produced file changes, they are committed. If not, the attempt is retried.
package/claude-queue.sh CHANGED
@@ -7,9 +7,10 @@
7
7
  # claude-queue create [options] Create issues from text or interactively
8
8
  #
9
9
  # Solve options:
10
+ # --issue ID Solve specific issue(s) by ID, URL, or comma-separated IDs
10
11
  # --max-retries N Max retries per issue (default: 3)
11
12
  # --max-turns N Max Claude turns per attempt (default: 50)
12
- # --label LABEL Only process issues with this label
13
+ # --label LABEL Only process issues with this label (can be repeated)
13
14
  # --model MODEL Claude model to use
14
15
  # -v, --version Show version
15
16
  # -h, --help Show this help message
@@ -26,7 +27,8 @@ VERSION=$(node -p "require('$(dirname "$0")/package.json').version" 2>/dev/null
26
27
 
27
28
  MAX_RETRIES=3
28
29
  MAX_TURNS=50
29
- ISSUE_FILTER=""
30
+ declare -a ISSUE_FILTERS=()
31
+ ISSUE_IDS=""
30
32
  MODEL_FLAG=""
31
33
  DATE=$(date +%Y-%m-%d)
32
34
  TIMESTAMP=$(date +%H%M%S)
@@ -60,9 +62,10 @@ show_help() {
60
62
  echo " claude-queue create [options] [text] Create issues from text or interactively"
61
63
  echo ""
62
64
  echo "Solve options:"
65
+ echo " --issue ID Solve specific issue(s) by ID, URL, or comma-separated IDs"
63
66
  echo " --max-retries N Max retries per issue (default: 3)"
64
67
  echo " --max-turns N Max Claude turns per attempt (default: 50)"
65
- echo " --label LABEL Only process issues with this label"
68
+ echo " --label LABEL Only process issues with this label (can be repeated)"
66
69
  echo " --model MODEL Claude model to use"
67
70
  echo " -v, --version Show version"
68
71
  echo " -h, --help Show this help message"
@@ -193,15 +196,61 @@ setup_branch() {
193
196
  }
194
197
 
195
198
  fetch_issues() {
196
- local args=(--state open --json "number,title,body,labels" --limit 200)
199
+ local args=(--state open --json "number,title,body,labels" --limit 200 --sort created --direction asc)
197
200
 
198
- if [ -n "$ISSUE_FILTER" ]; then
199
- args+=(--label "$ISSUE_FILTER")
200
- fi
201
+ for filter in "${ISSUE_FILTERS[@]}"; do
202
+ args+=(--label "$filter")
203
+ done
201
204
 
202
205
  gh issue list "${args[@]}"
203
206
  }
204
207
 
208
+ parse_issue_number() {
209
+ local input="$1"
210
+
211
+ local num
212
+ num=$(echo "$input" | grep -oE '[0-9]+$' || echo "")
213
+
214
+ if [ -z "$num" ]; then
215
+ log_error "Invalid issue identifier: $input"
216
+ return 1
217
+ fi
218
+
219
+ echo "$num"
220
+ }
221
+
222
+ fetch_specific_issues() {
223
+ local ids_str="$1"
224
+ local result="["
225
+ local first=true
226
+
227
+ IFS=',' read -ra id_array <<< "$ids_str"
228
+ for id in "${id_array[@]}"; do
229
+ id=$(echo "$id" | xargs)
230
+
231
+ local num
232
+ if ! num=$(parse_issue_number "$id"); then
233
+ continue
234
+ fi
235
+
236
+ local issue_json
237
+ issue_json=$(gh issue view "$num" --json "number,title,body,labels" 2>/dev/null) || {
238
+ log_error "Could not fetch issue #${num}"
239
+ continue
240
+ }
241
+
242
+ if [ "$first" = true ]; then
243
+ first=false
244
+ else
245
+ result+=","
246
+ fi
247
+ result+="$issue_json"
248
+ done
249
+
250
+ result+="]"
251
+ echo "$result"
252
+ }
253
+
205
254
  process_issue() {
206
255
  local issue_number=$1
207
256
  local issue_title="$2"
@@ -534,7 +583,12 @@ main() {
534
583
  log_header "Fetching Issues"
535
584
 
536
585
  local issues
537
- issues=$(fetch_issues)
586
+ if [ -n "$ISSUE_IDS" ]; then
587
+ log "Fetching specific issue(s): ${ISSUE_IDS}"
588
+ issues=$(fetch_specific_issues "$ISSUE_IDS")
589
+ else
590
+ issues=$(fetch_issues)
591
+ fi
538
592
  local total
539
593
  total=$(echo "$issues" | jq length)
540
594
 
@@ -551,7 +605,7 @@ main() {
551
605
  title=$(echo "$issues" | jq -r ".[$i].title")
552
606
  labels=$(echo "$issues" | jq -r "[.[$i].labels[].name] | join(\",\")" 2>/dev/null || echo "")
553
607
 
554
- if echo "$labels" | grep -q "claude-queue:"; then
608
+ if [ -z "$ISSUE_IDS" ] && echo "$labels" | grep -q "claude-queue:"; then
555
609
  log "Skipping #${number} (already has a claude-queue label)"
556
610
  SKIPPED_ISSUES+=("${number}|${title}")
557
611
  continue
@@ -949,9 +1003,10 @@ case "$SUBCOMMAND" in
949
1003
  "")
950
1004
  while [[ $# -gt 0 ]]; do
951
1005
  case $1 in
1006
+ --issue) ISSUE_IDS="$2"; shift 2 ;;
952
1007
  --max-retries) MAX_RETRIES="$2"; shift 2 ;;
953
1008
  --max-turns) MAX_TURNS="$2"; shift 2 ;;
954
- --label) ISSUE_FILTER="$2"; shift 2 ;;
1009
+ --label) ISSUE_FILTERS+=("$2"); shift 2 ;;
955
1010
  --model) MODEL_FLAG="--model $2"; shift 2 ;;
956
1011
  -v|--version) echo "claude-queue v${VERSION}"; exit 0 ;;
957
1012
  -h|--help) show_help; exit 0 ;;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-queue",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "Automated GitHub issue solver powered by Claude Code",
5
5
  "bin": {
6
6
  "claude-queue": "./claude-queue.sh"