@aaronshaf/ger 4.0.0 → 4.0.1
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/package.json +1 -1
- package/skills/gerrit-workflow/SKILL.md +228 -141
- package/skills/gerrit-workflow/examples.md +133 -426
- package/skills/gerrit-workflow/reference.md +470 -408
- package/src/cli/index.ts +1 -1
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
Complete reference documentation for all ger CLI commands.
|
|
4
4
|
|
|
5
|
+
## Output Format Flags
|
|
6
|
+
|
|
7
|
+
All commands that produce output support:
|
|
8
|
+
- `--json` — Structured JSON for programmatic consumption
|
|
9
|
+
- `--xml` — XML with CDATA-wrapped content (preferred for LLM consumption)
|
|
10
|
+
- (default) — Colored terminal output
|
|
11
|
+
|
|
12
|
+
`--json` and `--xml` are mutually exclusive.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
5
16
|
## Change Viewing Commands
|
|
6
17
|
|
|
7
18
|
### show
|
|
@@ -14,31 +25,22 @@ ger show [change-id] [options]
|
|
|
14
25
|
```
|
|
15
26
|
|
|
16
27
|
**Options:**
|
|
17
|
-
- `--
|
|
18
|
-
- `--
|
|
19
|
-
- `--no-
|
|
28
|
+
- `--json` — JSON output
|
|
29
|
+
- `--xml` — XML output
|
|
30
|
+
- `--no-comments` — Exclude comments
|
|
31
|
+
- `--no-diff` — Exclude diff
|
|
20
32
|
|
|
21
33
|
**Examples:**
|
|
22
34
|
```bash
|
|
23
|
-
# Show current change
|
|
24
35
|
ger show
|
|
25
|
-
|
|
26
|
-
# Show specific change
|
|
27
36
|
ger show 12345
|
|
28
|
-
|
|
29
|
-
# Show as JSON
|
|
30
|
-
ger show 12345 --format json
|
|
31
|
-
|
|
32
|
-
# Show without comments
|
|
37
|
+
ger show 12345 --xml
|
|
33
38
|
ger show --no-comments
|
|
34
39
|
```
|
|
35
40
|
|
|
36
|
-
**Output includes:**
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
- File diffs
|
|
40
|
-
- All comments and inline feedback
|
|
41
|
-
- Jenkins build status (if available)
|
|
41
|
+
**Output includes:** metadata, commit message, file diffs, all comments, Jenkins build status
|
|
42
|
+
|
|
43
|
+
---
|
|
42
44
|
|
|
43
45
|
### diff
|
|
44
46
|
|
|
@@ -50,22 +52,20 @@ ger diff [change-id] [options]
|
|
|
50
52
|
```
|
|
51
53
|
|
|
52
54
|
**Options:**
|
|
53
|
-
- `--
|
|
54
|
-
- `--
|
|
55
|
-
- `--
|
|
55
|
+
- `--file <path>` — Show diff for specific file only
|
|
56
|
+
- `--base <revision>` — Compare against specific base revision
|
|
57
|
+
- `--json` — JSON output
|
|
58
|
+
- `--xml` — XML output
|
|
56
59
|
|
|
57
60
|
**Examples:**
|
|
58
61
|
```bash
|
|
59
|
-
# Get unified diff
|
|
60
62
|
ger diff 12345
|
|
61
|
-
|
|
62
|
-
# Get diff for specific file
|
|
63
63
|
ger diff 12345 --file src/api/client.ts
|
|
64
|
-
|
|
65
|
-
# Get diff as JSON
|
|
66
|
-
ger diff 12345 --format json
|
|
64
|
+
ger diff 12345 --xml
|
|
67
65
|
```
|
|
68
66
|
|
|
67
|
+
---
|
|
68
|
+
|
|
69
69
|
### comments
|
|
70
70
|
|
|
71
71
|
View all comments on a change.
|
|
@@ -76,320 +76,389 @@ ger comments [change-id] [options]
|
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
**Options:**
|
|
79
|
-
- `--
|
|
80
|
-
- `--
|
|
81
|
-
- `--
|
|
79
|
+
- `--unresolved-only` — Show only unresolved comments
|
|
80
|
+
- `--file <path>` — Show comments for specific file only
|
|
81
|
+
- `--json` — JSON output
|
|
82
|
+
- `--xml` — XML output
|
|
82
83
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
ger comments 12345
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
### files
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
ger comments 12345 --unresolved-only
|
|
88
|
+
List changed files in a change.
|
|
90
89
|
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
**Syntax:**
|
|
91
|
+
```bash
|
|
92
|
+
ger files [change-id] [options]
|
|
93
93
|
```
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
**Options:**
|
|
96
|
+
- `--json` — JSON output
|
|
97
|
+
- `--xml` — XML output
|
|
96
98
|
|
|
97
|
-
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
### reviewers
|
|
98
102
|
|
|
99
|
-
List
|
|
103
|
+
List reviewers on a change.
|
|
100
104
|
|
|
101
105
|
**Syntax:**
|
|
102
106
|
```bash
|
|
103
|
-
ger
|
|
107
|
+
ger reviewers [change-id] [options]
|
|
104
108
|
```
|
|
105
109
|
|
|
106
110
|
**Options:**
|
|
107
|
-
- `--
|
|
108
|
-
- `--
|
|
109
|
-
- `--limit <n>` - Limit number of results
|
|
111
|
+
- `--json` — JSON output
|
|
112
|
+
- `--xml` — XML output
|
|
110
113
|
|
|
111
|
-
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Change Listing Commands
|
|
117
|
+
|
|
118
|
+
### list
|
|
119
|
+
|
|
120
|
+
List your changes or changes needing your review.
|
|
121
|
+
|
|
122
|
+
**Syntax:**
|
|
112
123
|
```bash
|
|
113
|
-
|
|
114
|
-
|
|
124
|
+
ger list [options]
|
|
125
|
+
```
|
|
115
126
|
|
|
116
|
-
|
|
117
|
-
|
|
127
|
+
**Options:**
|
|
128
|
+
- `--status <status>` — Filter by status: `open`, `merged`, `abandoned` (default: open)
|
|
129
|
+
- `-n, --limit <n>` — Maximum number of changes (default: 25)
|
|
130
|
+
- `--detailed` — Show detailed information
|
|
131
|
+
- `--reviewer` — Show changes where you are a reviewer or CC'd
|
|
132
|
+
- `--json` — JSON output
|
|
133
|
+
- `--xml` — XML output
|
|
134
|
+
|
|
135
|
+
---
|
|
118
136
|
|
|
119
|
-
|
|
120
|
-
|
|
137
|
+
### mine
|
|
138
|
+
|
|
139
|
+
List all changes owned by you. Alias for `ger list`.
|
|
140
|
+
|
|
141
|
+
**Syntax:**
|
|
142
|
+
```bash
|
|
143
|
+
ger mine [options]
|
|
121
144
|
```
|
|
122
145
|
|
|
123
|
-
|
|
146
|
+
**Options:**
|
|
147
|
+
- `--json` — JSON output
|
|
148
|
+
- `--xml` — XML output
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
### incoming / team
|
|
124
153
|
|
|
125
|
-
List changes
|
|
154
|
+
List changes where you are a reviewer or CC'd.
|
|
155
|
+
Both commands are aliases for `ger list --reviewer`.
|
|
156
|
+
Query: `(reviewer:self OR cc:self) status:open`
|
|
126
157
|
|
|
127
158
|
**Syntax:**
|
|
128
159
|
```bash
|
|
129
160
|
ger incoming [options]
|
|
161
|
+
ger team [options]
|
|
130
162
|
```
|
|
131
163
|
|
|
132
164
|
**Options:**
|
|
133
|
-
- `--
|
|
134
|
-
-
|
|
165
|
+
- `--status <status>` — Filter by status (default: open)
|
|
166
|
+
- `-n, --limit <n>` — Maximum number of changes (default: 25)
|
|
167
|
+
- `--detailed` — Show detailed information
|
|
168
|
+
- `--all-verified` — Include all verification states (default: excludes unverified)
|
|
169
|
+
- `-f, --filter <query>` — Append custom Gerrit query syntax (e.g. `project:canvas-lms`)
|
|
170
|
+
- `--json` — JSON output
|
|
171
|
+
- `--xml` — XML output
|
|
135
172
|
|
|
136
173
|
**Examples:**
|
|
137
174
|
```bash
|
|
138
|
-
|
|
139
|
-
ger incoming
|
|
140
|
-
|
|
141
|
-
# Get as JSON
|
|
142
|
-
ger incoming --format json
|
|
175
|
+
ger team
|
|
176
|
+
ger incoming --filter "project:canvas-lms"
|
|
177
|
+
ger team --all-verified --json
|
|
143
178
|
```
|
|
144
179
|
|
|
145
|
-
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
### search
|
|
146
183
|
|
|
147
|
-
|
|
184
|
+
Search for changes using Gerrit query syntax.
|
|
148
185
|
|
|
149
186
|
**Syntax:**
|
|
150
187
|
```bash
|
|
151
|
-
ger
|
|
188
|
+
ger search [query] [options]
|
|
152
189
|
```
|
|
153
190
|
|
|
154
191
|
**Options:**
|
|
155
|
-
-
|
|
156
|
-
- `--
|
|
157
|
-
|
|
192
|
+
- `-n, --limit <n>` — Maximum results (default: 25)
|
|
193
|
+
- `--xml` — XML output
|
|
194
|
+
|
|
195
|
+
**Common Query Operators:**
|
|
196
|
+
- `owner:USER` / `owner:self`
|
|
197
|
+
- `status:open|merged|abandoned`
|
|
198
|
+
- `project:NAME`
|
|
199
|
+
- `branch:NAME`
|
|
200
|
+
- `reviewer:USER` / `cc:USER`
|
|
201
|
+
- `is:wip` / `is:submittable`
|
|
202
|
+
- `after:YYYY-MM-DD` / `before:YYYY-MM-DD`
|
|
203
|
+
- `age:1d|2w|1mon`
|
|
204
|
+
- `label:Code-Review+2`
|
|
158
205
|
|
|
159
206
|
**Examples:**
|
|
160
207
|
```bash
|
|
161
|
-
|
|
162
|
-
ger
|
|
163
|
-
|
|
164
|
-
# Filter by owner
|
|
165
|
-
ger open --owner user@example.com
|
|
208
|
+
ger search "owner:self status:open"
|
|
209
|
+
ger search "is:wip"
|
|
210
|
+
ger search "project:canvas-lms after:2025-01-01" -n 10 --xml
|
|
166
211
|
```
|
|
167
212
|
|
|
168
|
-
|
|
213
|
+
---
|
|
169
214
|
|
|
170
|
-
|
|
215
|
+
## Comment and Vote Commands
|
|
216
|
+
|
|
217
|
+
### comment
|
|
218
|
+
|
|
219
|
+
Post a comment on a Gerrit change.
|
|
171
220
|
|
|
172
221
|
**Syntax:**
|
|
173
222
|
```bash
|
|
174
|
-
ger
|
|
223
|
+
ger comment [change-id] [options]
|
|
175
224
|
```
|
|
176
225
|
|
|
177
226
|
**Options:**
|
|
178
|
-
-
|
|
227
|
+
- `-m, --message <text>` — Comment message (reads from stdin if omitted)
|
|
228
|
+
- `--file <path>` — File for inline comment
|
|
229
|
+
- `--line <n>` — Line number for inline comment
|
|
230
|
+
- `--unresolved` — Mark comment as unresolved
|
|
179
231
|
|
|
180
232
|
**Examples:**
|
|
181
233
|
```bash
|
|
182
|
-
|
|
183
|
-
ger
|
|
184
|
-
|
|
185
|
-
# Abandon current change
|
|
186
|
-
ger abandon
|
|
234
|
+
ger comment 12345 -m "Looks good!"
|
|
235
|
+
ger comment 12345 --file src/api/client.ts --line 42 -m "Consider error handling"
|
|
236
|
+
echo "Review feedback" | ger comment 12345
|
|
187
237
|
```
|
|
188
238
|
|
|
189
|
-
|
|
239
|
+
---
|
|
190
240
|
|
|
191
|
-
|
|
241
|
+
### vote
|
|
242
|
+
|
|
243
|
+
Vote on a Gerrit change.
|
|
192
244
|
|
|
193
245
|
**Syntax:**
|
|
194
246
|
```bash
|
|
195
|
-
ger
|
|
247
|
+
ger vote [change-id] <label> <score>
|
|
196
248
|
```
|
|
197
249
|
|
|
198
|
-
**Options:**
|
|
199
|
-
- `--revision <n>` - Checkout specific patchset revision (default: latest)
|
|
200
|
-
|
|
201
250
|
**Examples:**
|
|
202
251
|
```bash
|
|
203
|
-
|
|
204
|
-
ger
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
ger checkout 12345 --revision 3
|
|
252
|
+
ger vote 12345 Code-Review +2
|
|
253
|
+
ger vote 12345 Code-Review -1
|
|
254
|
+
ger vote 12345 Verified +1
|
|
255
|
+
ger vote --xml
|
|
208
256
|
```
|
|
209
257
|
|
|
210
|
-
|
|
258
|
+
---
|
|
211
259
|
|
|
212
|
-
|
|
260
|
+
## Change Management Commands
|
|
261
|
+
|
|
262
|
+
### abandon
|
|
263
|
+
|
|
264
|
+
Mark a change as abandoned.
|
|
213
265
|
|
|
214
266
|
**Syntax:**
|
|
215
267
|
```bash
|
|
216
|
-
ger
|
|
268
|
+
ger abandon [change-id] [options]
|
|
217
269
|
```
|
|
218
270
|
|
|
219
271
|
**Options:**
|
|
220
|
-
- `-
|
|
221
|
-
-
|
|
222
|
-
-
|
|
223
|
-
- `--cc <email>` - Add CC (can be repeated)
|
|
224
|
-
- `--wip` - Mark as work-in-progress (not ready for review)
|
|
225
|
-
- `--ready` - Mark as ready for review (remove WIP status)
|
|
226
|
-
- `--hashtag <tag>` - Add hashtag (can be repeated)
|
|
227
|
-
- `--private` - Mark as private change
|
|
228
|
-
- `--draft` - Alias for --wip
|
|
229
|
-
- `--dry-run` - Preview push without actually pushing
|
|
272
|
+
- `-m, --message <text>` — Abandonment message
|
|
273
|
+
- `--json` — JSON output
|
|
274
|
+
- `--xml` — XML output
|
|
230
275
|
|
|
231
|
-
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
### restore
|
|
279
|
+
|
|
280
|
+
Restore an abandoned change.
|
|
281
|
+
|
|
282
|
+
**Syntax:**
|
|
232
283
|
```bash
|
|
233
|
-
|
|
234
|
-
|
|
284
|
+
ger restore [change-id] [options]
|
|
285
|
+
```
|
|
235
286
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
287
|
+
**Options:**
|
|
288
|
+
- `-m, --message <text>` — Restoration message
|
|
289
|
+
- `--json` — JSON output
|
|
290
|
+
- `--xml` — XML output
|
|
239
291
|
|
|
240
|
-
|
|
241
|
-
ger push -t my-feature
|
|
292
|
+
---
|
|
242
293
|
|
|
243
|
-
|
|
244
|
-
ger push -r alice@example.com -r bob@example.com
|
|
294
|
+
### submit
|
|
245
295
|
|
|
246
|
-
|
|
247
|
-
ger push --cc manager@example.com
|
|
296
|
+
Submit a change (merge it).
|
|
248
297
|
|
|
249
|
-
|
|
250
|
-
|
|
298
|
+
**Syntax:**
|
|
299
|
+
```bash
|
|
300
|
+
ger submit [change-id] [options]
|
|
301
|
+
```
|
|
251
302
|
|
|
252
|
-
|
|
253
|
-
|
|
303
|
+
**Options:**
|
|
304
|
+
- `--json` — JSON output
|
|
305
|
+
- `--xml` — XML output
|
|
254
306
|
|
|
255
|
-
|
|
256
|
-
ger push --hashtag bugfix
|
|
307
|
+
---
|
|
257
308
|
|
|
258
|
-
|
|
259
|
-
ger push -b main -t refactor-auth -r alice@example.com --wip
|
|
309
|
+
### set-wip
|
|
260
310
|
|
|
261
|
-
|
|
262
|
-
ger push --dry-run
|
|
263
|
-
```
|
|
311
|
+
Mark a change as work-in-progress.
|
|
264
312
|
|
|
265
|
-
**
|
|
266
|
-
Work-in-progress changes are useful for getting early feedback or saving work:
|
|
313
|
+
**Syntax:**
|
|
267
314
|
```bash
|
|
268
|
-
|
|
269
|
-
|
|
315
|
+
ger set-wip [change-id] [options]
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
**Options:**
|
|
319
|
+
- `-m, --message <text>` — Optional message
|
|
320
|
+
- `--json` — JSON output
|
|
321
|
+
- `--xml` — XML output
|
|
322
|
+
|
|
323
|
+
---
|
|
270
324
|
|
|
271
|
-
|
|
272
|
-
ger push --wip
|
|
325
|
+
### set-ready
|
|
273
326
|
|
|
274
|
-
|
|
275
|
-
|
|
327
|
+
Mark a change as ready for review.
|
|
328
|
+
|
|
329
|
+
**Syntax:**
|
|
330
|
+
```bash
|
|
331
|
+
ger set-ready [change-id] [options]
|
|
276
332
|
```
|
|
277
333
|
|
|
278
|
-
**
|
|
279
|
-
-
|
|
280
|
-
-
|
|
281
|
-
-
|
|
282
|
-
|
|
334
|
+
**Options:**
|
|
335
|
+
- `-m, --message <text>` — Optional message
|
|
336
|
+
- `--json` — JSON output
|
|
337
|
+
- `--xml` — XML output
|
|
338
|
+
|
|
339
|
+
---
|
|
283
340
|
|
|
284
|
-
###
|
|
341
|
+
### topic
|
|
285
342
|
|
|
286
|
-
|
|
343
|
+
Get or set the topic on a change.
|
|
287
344
|
|
|
288
345
|
**Syntax:**
|
|
289
346
|
```bash
|
|
290
|
-
ger
|
|
347
|
+
ger topic [change-id] [topic] [options]
|
|
291
348
|
```
|
|
292
349
|
|
|
293
350
|
**Options:**
|
|
294
|
-
-
|
|
295
|
-
- `--
|
|
296
|
-
- `--xml`
|
|
297
|
-
|
|
298
|
-
**Common Query Operators:**
|
|
299
|
-
- `owner:USER` - Changes owned by USER (use 'self' for yourself)
|
|
300
|
-
- `status:STATE` - open, merged, abandoned, closed
|
|
301
|
-
- `project:NAME` - Changes in a specific project
|
|
302
|
-
- `branch:NAME` - Changes targeting a branch
|
|
303
|
-
- `age:TIME` - Time since last update (e.g., 1d, 2w, 1mon)
|
|
304
|
-
- `before:DATE` - Changes modified before date (YYYY-MM-DD)
|
|
305
|
-
- `after:DATE` - Changes modified after date (YYYY-MM-DD)
|
|
306
|
-
- `is:wip` - Work-in-progress changes
|
|
307
|
-
- `is:submittable` - Changes ready to submit
|
|
308
|
-
- `reviewer:USER` - Changes where USER is a reviewer
|
|
309
|
-
- `label:NAME=VALUE` - Filter by label (e.g., label:Code-Review+2)
|
|
351
|
+
- `--delete` — Remove the topic
|
|
352
|
+
- `--json` — JSON output
|
|
353
|
+
- `--xml` — XML output
|
|
310
354
|
|
|
311
355
|
**Examples:**
|
|
312
356
|
```bash
|
|
313
|
-
|
|
314
|
-
ger
|
|
357
|
+
ger topic 12345 # get topic
|
|
358
|
+
ger topic 12345 my-feature # set topic
|
|
359
|
+
ger topic 12345 --delete # delete topic
|
|
360
|
+
```
|
|
315
361
|
|
|
316
|
-
|
|
317
|
-
ger search "owner:self status:open"
|
|
362
|
+
---
|
|
318
363
|
|
|
319
|
-
|
|
320
|
-
ger search "owner:john@example.com"
|
|
364
|
+
## Push and Checkout Commands
|
|
321
365
|
|
|
322
|
-
|
|
323
|
-
ger search "project:my-project status:open"
|
|
366
|
+
### push
|
|
324
367
|
|
|
325
|
-
|
|
326
|
-
ger search "owner:self after:2025-01-01"
|
|
327
|
-
ger search "status:merged age:7d"
|
|
368
|
+
Push changes to Gerrit for review.
|
|
328
369
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
ger
|
|
370
|
+
**Syntax:**
|
|
371
|
+
```bash
|
|
372
|
+
ger push [options]
|
|
373
|
+
```
|
|
332
374
|
|
|
333
|
-
|
|
334
|
-
|
|
375
|
+
**Options:**
|
|
376
|
+
- `-b, --branch <branch>` — Target branch (auto-detected from tracking branch)
|
|
377
|
+
- `-t, --topic <topic>` — Topic name
|
|
378
|
+
- `-r, --reviewer <email>` — Add reviewer (repeatable)
|
|
379
|
+
- `--cc <email>` — Add CC (repeatable)
|
|
380
|
+
- `--wip` — Mark as work-in-progress
|
|
381
|
+
- `--ready` — Mark as ready for review
|
|
382
|
+
- `--hashtag <tag>` — Add hashtag (repeatable)
|
|
383
|
+
- `--private` — Mark as private
|
|
384
|
+
- `--dry-run` — Preview without pushing
|
|
385
|
+
|
|
386
|
+
---
|
|
335
387
|
|
|
336
|
-
|
|
337
|
-
ger search "owner:self status:merged before:2025-06-01"
|
|
388
|
+
### checkout
|
|
338
389
|
|
|
339
|
-
|
|
340
|
-
ger search "project:my-project" -n 10
|
|
390
|
+
Checkout a specific change revision locally.
|
|
341
391
|
|
|
342
|
-
|
|
343
|
-
|
|
392
|
+
**Syntax:**
|
|
393
|
+
```bash
|
|
394
|
+
ger checkout <change-id> [options]
|
|
344
395
|
```
|
|
345
396
|
|
|
346
|
-
|
|
397
|
+
**Options:**
|
|
398
|
+
- `--revision <n>` — Checkout specific patchset (default: latest)
|
|
347
399
|
|
|
348
|
-
|
|
400
|
+
---
|
|
349
401
|
|
|
350
|
-
|
|
402
|
+
### cherry
|
|
403
|
+
|
|
404
|
+
Cherry-pick a Gerrit change into the current branch.
|
|
351
405
|
|
|
352
406
|
**Syntax:**
|
|
353
407
|
```bash
|
|
354
|
-
ger
|
|
408
|
+
ger cherry <change-id>[/<patchset>] [options]
|
|
355
409
|
```
|
|
356
410
|
|
|
357
411
|
**Options:**
|
|
358
|
-
-
|
|
359
|
-
- `--
|
|
360
|
-
- `--
|
|
361
|
-
|
|
412
|
+
- `--no-commit` — Stage changes without committing (`git cherry-pick -n`)
|
|
413
|
+
- `--no-verify` — Skip pre-commit hooks during cherry-pick
|
|
414
|
+
- `--remote <name>` — Use specific git remote (default: auto-detected from Gerrit host)
|
|
415
|
+
|
|
416
|
+
**Input formats:**
|
|
417
|
+
- `12345` — Latest patchset
|
|
418
|
+
- `12345/3` — Specific patchset
|
|
419
|
+
- `If5a3ae8cb5a107e187447802358417f311d0c4b1` — Change-ID
|
|
420
|
+
- `https://gerrit.example.com/c/my-project/+/12345` — Full URL
|
|
362
421
|
|
|
363
422
|
**Examples:**
|
|
364
423
|
```bash
|
|
365
|
-
|
|
366
|
-
ger
|
|
424
|
+
ger cherry 12345
|
|
425
|
+
ger cherry 12345/3
|
|
426
|
+
ger cherry 12345 --no-commit
|
|
427
|
+
ger cherry 12345 --no-verify
|
|
428
|
+
```
|
|
367
429
|
|
|
368
|
-
|
|
369
|
-
ger comment 12345 --file src/api/client.ts --line 42 -m "Consider error handling here"
|
|
430
|
+
---
|
|
370
431
|
|
|
371
|
-
|
|
372
|
-
ger comment 12345 -m "Please fix the type error" --unresolved
|
|
432
|
+
### rebase
|
|
373
433
|
|
|
374
|
-
|
|
375
|
-
echo "Review feedback from AI" | ger comment 12345
|
|
376
|
-
```
|
|
434
|
+
Rebase a change on Gerrit (server-side rebase).
|
|
377
435
|
|
|
378
|
-
**
|
|
379
|
-
The comment command accepts piped input, making it easy to integrate with AI tools:
|
|
436
|
+
**Syntax:**
|
|
380
437
|
```bash
|
|
381
|
-
|
|
382
|
-
|
|
438
|
+
ger rebase [change-id] [options]
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
**Options:**
|
|
442
|
+
- `--base <sha-or-id>` — Rebase onto specific base commit or change
|
|
443
|
+
- `--allow-conflicts` — Allow rebase even when conflicts exist
|
|
444
|
+
- `--json` — JSON output
|
|
445
|
+
- `--xml` — XML output
|
|
383
446
|
|
|
384
|
-
|
|
385
|
-
|
|
447
|
+
**Examples:**
|
|
448
|
+
```bash
|
|
449
|
+
ger rebase
|
|
450
|
+
ger rebase 12345
|
|
451
|
+
ger rebase 12345 --allow-conflicts
|
|
452
|
+
ger rebase 12345 --base abc123def --xml
|
|
386
453
|
```
|
|
387
454
|
|
|
388
|
-
|
|
455
|
+
---
|
|
456
|
+
|
|
457
|
+
## Build and CI Commands
|
|
389
458
|
|
|
390
459
|
### build-status
|
|
391
460
|
|
|
392
|
-
Check the build status for a change.
|
|
461
|
+
Check the Jenkins build status for a change.
|
|
393
462
|
|
|
394
463
|
**Syntax:**
|
|
395
464
|
```bash
|
|
@@ -397,332 +466,325 @@ ger build-status [change-id] [options]
|
|
|
397
466
|
```
|
|
398
467
|
|
|
399
468
|
**Options:**
|
|
400
|
-
- `--watch`
|
|
401
|
-
- `--interval <seconds>`
|
|
402
|
-
- `--timeout <seconds>`
|
|
469
|
+
- `--watch` — Poll until build completes
|
|
470
|
+
- `--interval <seconds>` — Polling interval (default: 30)
|
|
471
|
+
- `--timeout <seconds>` — Maximum wait time
|
|
472
|
+
- `--exit-status` — Return non-zero exit code on build failure (for scripting)
|
|
473
|
+
- `--json` — JSON output
|
|
474
|
+
- `--xml` — XML output
|
|
403
475
|
|
|
404
476
|
**Examples:**
|
|
405
477
|
```bash
|
|
406
|
-
# Check current status
|
|
407
478
|
ger build-status 12345
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
ger build-status 12345 --watch
|
|
411
|
-
|
|
412
|
-
# Watch with custom interval and timeout
|
|
413
|
-
ger build-status 12345 --watch --interval 20 --timeout 1800
|
|
479
|
+
ger build-status --watch --interval 20 --timeout 1800
|
|
480
|
+
ger build-status --exit-status
|
|
414
481
|
```
|
|
415
482
|
|
|
483
|
+
---
|
|
484
|
+
|
|
416
485
|
### extract-url
|
|
417
486
|
|
|
418
|
-
Extract URLs from change
|
|
487
|
+
Extract URLs from change messages (e.g., Jenkins build links).
|
|
419
488
|
|
|
420
489
|
**Syntax:**
|
|
421
490
|
```bash
|
|
422
|
-
ger extract-url <
|
|
491
|
+
ger extract-url <pattern> [change-id]
|
|
423
492
|
```
|
|
424
493
|
|
|
425
|
-
**URL Types:**
|
|
426
|
-
- `build-summary-report` - Jenkins build summary report
|
|
427
|
-
- `jenkins` - Main Jenkins build URL
|
|
428
|
-
- `test-results` - Test results URL
|
|
429
|
-
|
|
430
494
|
**Examples:**
|
|
431
495
|
```bash
|
|
432
|
-
# Extract build summary report URL
|
|
433
496
|
ger extract-url "build-summary-report"
|
|
434
|
-
|
|
435
|
-
# Extract for specific change
|
|
436
|
-
ger extract-url "jenkins" 12345
|
|
437
|
-
|
|
438
|
-
# Get the latest URL
|
|
439
497
|
ger extract-url "build-summary-report" | tail -1
|
|
498
|
+
ger extract-url "jenkins" 12345
|
|
440
499
|
```
|
|
441
500
|
|
|
442
|
-
|
|
501
|
+
---
|
|
443
502
|
|
|
444
|
-
###
|
|
503
|
+
### retrigger
|
|
445
504
|
|
|
446
|
-
|
|
505
|
+
Post a CI retrigger comment on a change.
|
|
447
506
|
|
|
448
507
|
**Syntax:**
|
|
449
508
|
```bash
|
|
450
|
-
ger
|
|
509
|
+
ger retrigger [change-id] [options]
|
|
451
510
|
```
|
|
452
511
|
|
|
453
|
-
**
|
|
454
|
-
- `
|
|
455
|
-
- `
|
|
456
|
-
|
|
457
|
-
|
|
512
|
+
**Options:**
|
|
513
|
+
- `--json` — JSON output
|
|
514
|
+
- `--xml` — XML output
|
|
515
|
+
|
|
516
|
+
The retrigger comment is configured via `ger setup` or prompted on first use and saved to config.
|
|
458
517
|
|
|
459
518
|
**Examples:**
|
|
460
519
|
```bash
|
|
461
|
-
|
|
462
|
-
ger
|
|
463
|
-
|
|
464
|
-
# Get current URL
|
|
465
|
-
ger config get gerrit.url
|
|
466
|
-
|
|
467
|
-
# List all config
|
|
468
|
-
ger config list
|
|
520
|
+
ger retrigger
|
|
521
|
+
ger retrigger 12345
|
|
522
|
+
ger retrigger 12345 --json
|
|
469
523
|
```
|
|
470
524
|
|
|
471
|
-
|
|
525
|
+
---
|
|
472
526
|
|
|
473
|
-
|
|
527
|
+
## Analytics Commands
|
|
474
528
|
|
|
475
|
-
|
|
529
|
+
### analyze
|
|
530
|
+
|
|
531
|
+
View merged change analytics.
|
|
476
532
|
|
|
477
533
|
**Syntax:**
|
|
478
534
|
```bash
|
|
479
|
-
ger
|
|
535
|
+
ger analyze [options]
|
|
480
536
|
```
|
|
481
537
|
|
|
482
538
|
**Options:**
|
|
483
|
-
-
|
|
484
|
-
- `--
|
|
485
|
-
- `--
|
|
486
|
-
- `--
|
|
487
|
-
- `--xml`
|
|
539
|
+
- `--start-date <YYYY-MM-DD>` — Start date (default: January 1 of current year)
|
|
540
|
+
- `--end-date <YYYY-MM-DD>` — End date (default: today)
|
|
541
|
+
- `--repo <name>` — Filter by repository
|
|
542
|
+
- `--json` — JSON output
|
|
543
|
+
- `--xml` — XML output
|
|
544
|
+
- `--markdown` — Markdown output
|
|
545
|
+
- `--csv` — CSV output
|
|
546
|
+
- `--output <file>` — Write output to file
|
|
488
547
|
|
|
489
548
|
**Examples:**
|
|
490
549
|
```bash
|
|
491
|
-
|
|
492
|
-
ger
|
|
493
|
-
ger
|
|
550
|
+
ger analyze
|
|
551
|
+
ger analyze --start-date 2025-01-01 --end-date 2025-06-30
|
|
552
|
+
ger analyze --repo canvas-lms --markdown
|
|
553
|
+
ger analyze --csv --output report.csv
|
|
554
|
+
```
|
|
494
555
|
|
|
495
|
-
|
|
496
|
-
ger add-reviewer --group project-reviewers -c 12345
|
|
556
|
+
---
|
|
497
557
|
|
|
498
|
-
|
|
499
|
-
ger add-reviewer --group administrators --cc -c 12345
|
|
558
|
+
### update
|
|
500
559
|
|
|
501
|
-
|
|
502
|
-
ger add-reviewer --cc user@example.com -c 12345
|
|
560
|
+
Update local cache of merged changes.
|
|
503
561
|
|
|
504
|
-
|
|
505
|
-
|
|
562
|
+
**Syntax:**
|
|
563
|
+
```bash
|
|
564
|
+
ger update [options]
|
|
565
|
+
```
|
|
506
566
|
|
|
507
|
-
|
|
508
|
-
|
|
567
|
+
**Options:**
|
|
568
|
+
- `--since <YYYY-MM-DD>` — Fetch changes since this date
|
|
569
|
+
- `--json` — JSON output
|
|
570
|
+
|
|
571
|
+
---
|
|
572
|
+
|
|
573
|
+
### failures
|
|
574
|
+
|
|
575
|
+
View recent build failures summary.
|
|
576
|
+
|
|
577
|
+
**Syntax:**
|
|
578
|
+
```bash
|
|
579
|
+
ger failures [options]
|
|
509
580
|
```
|
|
510
581
|
|
|
511
|
-
|
|
582
|
+
**Options:**
|
|
583
|
+
- `--json` — JSON output
|
|
584
|
+
- `--xml` — XML output
|
|
512
585
|
|
|
513
|
-
|
|
586
|
+
---
|
|
587
|
+
|
|
588
|
+
## Worktree (tree) Commands
|
|
589
|
+
|
|
590
|
+
### tree setup
|
|
591
|
+
|
|
592
|
+
Create a git worktree for a Gerrit change, checked out at `<repo-root>/.ger/<change-number>/`.
|
|
514
593
|
|
|
515
594
|
**Syntax:**
|
|
516
595
|
```bash
|
|
517
|
-
ger
|
|
596
|
+
ger tree setup <change-id>[:<patchset>] [options]
|
|
518
597
|
```
|
|
519
598
|
|
|
520
599
|
**Options:**
|
|
521
|
-
- `--
|
|
522
|
-
- `--
|
|
523
|
-
- `--project <name>` - Show groups for a specific project
|
|
524
|
-
- `--user <account>` - Show groups a user belongs to
|
|
525
|
-
- `--limit <n>` - Limit results (default: 25)
|
|
526
|
-
- `--xml` - XML output for automation
|
|
600
|
+
- `--json` — JSON output
|
|
601
|
+
- `--xml` — XML output
|
|
527
602
|
|
|
528
603
|
**Examples:**
|
|
529
604
|
```bash
|
|
530
|
-
|
|
531
|
-
ger
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
ger groups --pattern "^project-.*"
|
|
605
|
+
ger tree setup 12345
|
|
606
|
+
ger tree setup 12345:3 # specific patchset
|
|
607
|
+
ger tree setup 12345 --xml
|
|
608
|
+
```
|
|
535
609
|
|
|
536
|
-
|
|
537
|
-
ger groups --owned
|
|
610
|
+
---
|
|
538
611
|
|
|
539
|
-
|
|
540
|
-
ger groups --project my-project
|
|
612
|
+
### trees
|
|
541
613
|
|
|
542
|
-
|
|
543
|
-
ger groups --limit 50
|
|
614
|
+
List all ger-managed worktrees.
|
|
544
615
|
|
|
545
|
-
|
|
546
|
-
|
|
616
|
+
**Syntax:**
|
|
617
|
+
```bash
|
|
618
|
+
ger trees [options]
|
|
547
619
|
```
|
|
548
620
|
|
|
549
|
-
**
|
|
550
|
-
-
|
|
551
|
-
-
|
|
552
|
-
- Owner group
|
|
553
|
-
- Visibility settings
|
|
554
|
-
- Creation date (when available)
|
|
621
|
+
**Options:**
|
|
622
|
+
- `--json` — JSON output
|
|
623
|
+
- `--xml` — XML output
|
|
555
624
|
|
|
556
|
-
|
|
625
|
+
---
|
|
557
626
|
|
|
558
|
-
|
|
627
|
+
### tree rebase
|
|
628
|
+
|
|
629
|
+
Rebase the current worktree onto the latest base branch. Must be run from inside a ger worktree.
|
|
559
630
|
|
|
560
631
|
**Syntax:**
|
|
561
632
|
```bash
|
|
562
|
-
ger
|
|
633
|
+
ger tree rebase [options]
|
|
563
634
|
```
|
|
564
635
|
|
|
565
636
|
**Options:**
|
|
566
|
-
- `--
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
-
|
|
570
|
-
- Numeric ID: `1`
|
|
571
|
-
- UUID: `uuid-123456`
|
|
637
|
+
- `--onto <branch>` — Rebase onto specific branch (default: auto-detected from tracking branch)
|
|
638
|
+
- `-i, --interactive` — Interactive rebase (`git rebase -i`)
|
|
639
|
+
- `--json` — JSON output
|
|
640
|
+
- `--xml` — XML output
|
|
572
641
|
|
|
573
642
|
**Examples:**
|
|
574
643
|
```bash
|
|
575
|
-
|
|
576
|
-
ger
|
|
644
|
+
cd .ger/12345
|
|
645
|
+
ger tree rebase
|
|
646
|
+
ger tree rebase --onto origin/main
|
|
647
|
+
ger tree rebase --interactive
|
|
648
|
+
```
|
|
577
649
|
|
|
578
|
-
|
|
579
|
-
ger groups-show 1
|
|
650
|
+
---
|
|
580
651
|
|
|
581
|
-
|
|
582
|
-
ger groups-show uuid-123456
|
|
652
|
+
### tree cleanup
|
|
583
653
|
|
|
584
|
-
|
|
585
|
-
|
|
654
|
+
Remove a ger-managed worktree.
|
|
655
|
+
|
|
656
|
+
**Syntax:**
|
|
657
|
+
```bash
|
|
658
|
+
ger tree cleanup <change-id> [options]
|
|
586
659
|
```
|
|
587
660
|
|
|
588
|
-
|
|
589
|
-
- Basic group information (name, ID, owner, description)
|
|
590
|
-
- Visibility settings
|
|
591
|
-
- All group members with details
|
|
592
|
-
- Subgroups (included groups)
|
|
593
|
-
- Metadata (creation date, group ID)
|
|
661
|
+
---
|
|
594
662
|
|
|
595
|
-
|
|
663
|
+
## Groups and Reviewer Commands
|
|
596
664
|
|
|
597
|
-
|
|
665
|
+
### add-reviewer
|
|
666
|
+
|
|
667
|
+
Add reviewers, groups, or CCs to a change.
|
|
598
668
|
|
|
599
669
|
**Syntax:**
|
|
600
670
|
```bash
|
|
601
|
-
ger
|
|
671
|
+
ger add-reviewer <reviewers...> -c <change-id> [options]
|
|
602
672
|
```
|
|
603
673
|
|
|
604
674
|
**Options:**
|
|
605
|
-
-
|
|
675
|
+
- `-c, --change <id>` — Change ID (required)
|
|
676
|
+
- `--group` — Add as group
|
|
677
|
+
- `--cc` — Add as CC
|
|
678
|
+
- `--notify <level>` — `none`, `owner`, `owner_reviewers`, `all`
|
|
679
|
+
- `--xml` — XML output
|
|
606
680
|
|
|
607
|
-
|
|
608
|
-
```bash
|
|
609
|
-
# List members
|
|
610
|
-
ger groups-members project-reviewers
|
|
681
|
+
---
|
|
611
682
|
|
|
612
|
-
|
|
613
|
-
ger groups-members 1
|
|
683
|
+
### remove-reviewer
|
|
614
684
|
|
|
615
|
-
|
|
616
|
-
ger groups-members project-reviewers --xml
|
|
617
|
-
```
|
|
685
|
+
Remove a reviewer from a change.
|
|
618
686
|
|
|
619
|
-
**
|
|
620
|
-
|
|
621
|
-
-
|
|
622
|
-
|
|
623
|
-
- Account ID
|
|
687
|
+
**Syntax:**
|
|
688
|
+
```bash
|
|
689
|
+
ger remove-reviewer <account> -c <change-id> [options]
|
|
690
|
+
```
|
|
624
691
|
|
|
625
|
-
**
|
|
626
|
-
-
|
|
627
|
-
-
|
|
628
|
-
-
|
|
692
|
+
**Options:**
|
|
693
|
+
- `-c, --change <id>` — Change ID (required)
|
|
694
|
+
- `--notify <level>` — `none`, `owner`, `owner_reviewers`, `all`
|
|
695
|
+
- `--xml` — XML output
|
|
629
696
|
|
|
630
|
-
|
|
697
|
+
---
|
|
631
698
|
|
|
632
|
-
|
|
699
|
+
### groups
|
|
633
700
|
|
|
634
|
-
|
|
635
|
-
- `--version` - Show ger version
|
|
636
|
-
- `--no-cache` - Skip cache and fetch fresh data
|
|
637
|
-
- `--debug` - Enable debug logging
|
|
638
|
-
- `--quiet` - Suppress non-essential output
|
|
701
|
+
List and search Gerrit groups.
|
|
639
702
|
|
|
640
|
-
**
|
|
703
|
+
**Syntax:**
|
|
641
704
|
```bash
|
|
642
|
-
|
|
643
|
-
|
|
705
|
+
ger groups [options]
|
|
706
|
+
```
|
|
707
|
+
|
|
708
|
+
**Options:**
|
|
709
|
+
- `--pattern <regex>` — Filter by name pattern
|
|
710
|
+
- `--owned` — Show only groups you own
|
|
711
|
+
- `--project <name>` — Show groups for a project
|
|
712
|
+
- `--user <account>` — Show groups a user belongs to
|
|
713
|
+
- `--limit <n>` — Limit results (default: 25)
|
|
714
|
+
- `--xml` — XML output
|
|
715
|
+
|
|
716
|
+
---
|
|
717
|
+
|
|
718
|
+
### groups-show
|
|
644
719
|
|
|
645
|
-
|
|
646
|
-
ger mine --no-cache
|
|
720
|
+
Show detailed information about a specific group.
|
|
647
721
|
|
|
648
|
-
|
|
649
|
-
|
|
722
|
+
**Syntax:**
|
|
723
|
+
```bash
|
|
724
|
+
ger groups-show <group-id> [options]
|
|
650
725
|
```
|
|
651
726
|
|
|
652
|
-
|
|
727
|
+
**Options:**
|
|
728
|
+
- `--xml` — XML output
|
|
653
729
|
|
|
654
|
-
|
|
655
|
-
- `1` - General error
|
|
656
|
-
- `2` - Invalid arguments
|
|
657
|
-
- `3` - API error
|
|
658
|
-
- `4` - Authentication error
|
|
659
|
-
- `5` - Not found error
|
|
730
|
+
---
|
|
660
731
|
|
|
661
|
-
|
|
732
|
+
### groups-members
|
|
662
733
|
|
|
663
|
-
|
|
664
|
-
- `GER_USERNAME` - Gerrit username
|
|
665
|
-
- `GER_PASSWORD` - Gerrit password/token
|
|
666
|
-
- `GER_CACHE_DIR` - Cache directory path (default: `~/.ger/cache`)
|
|
667
|
-
- `GER_LOG_LEVEL` - Log level: `debug`, `info`, `warn`, `error`
|
|
734
|
+
List all members of a group.
|
|
668
735
|
|
|
669
|
-
**
|
|
736
|
+
**Syntax:**
|
|
670
737
|
```bash
|
|
671
|
-
|
|
672
|
-
export GER_LOG_LEVEL=debug
|
|
673
|
-
ger mine
|
|
738
|
+
ger groups-members <group-id> [options]
|
|
674
739
|
```
|
|
675
740
|
|
|
676
|
-
|
|
741
|
+
**Options:**
|
|
742
|
+
- `--xml` — XML output
|
|
677
743
|
|
|
678
|
-
|
|
744
|
+
---
|
|
679
745
|
|
|
680
|
-
|
|
681
|
-
- **Comments** - Cached for 2 minutes
|
|
682
|
-
- **Diffs** - Cached for 10 minutes
|
|
683
|
-
- **User data** - Cached for 1 hour
|
|
746
|
+
## Configuration Commands
|
|
684
747
|
|
|
685
|
-
|
|
748
|
+
### setup
|
|
686
749
|
|
|
687
|
-
|
|
750
|
+
Interactive first-time setup.
|
|
688
751
|
|
|
689
|
-
|
|
752
|
+
```bash
|
|
753
|
+
ger setup
|
|
754
|
+
```
|
|
690
755
|
|
|
691
|
-
|
|
692
|
-
- Automatic retry with exponential backoff
|
|
693
|
-
- Rate limit status shown in debug mode
|
|
756
|
+
Configures Gerrit URL, credentials, and retrigger comment.
|
|
694
757
|
|
|
695
|
-
|
|
758
|
+
### config
|
|
696
759
|
|
|
697
|
-
|
|
760
|
+
Manage ger CLI configuration.
|
|
698
761
|
|
|
762
|
+
**Syntax:**
|
|
699
763
|
```bash
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
Error: Invalid change ID format. Expected number or Change-Id string.
|
|
764
|
+
ger config <action> [key] [value]
|
|
765
|
+
```
|
|
703
766
|
|
|
704
|
-
|
|
705
|
-
$ ger mine
|
|
706
|
-
Error: Failed to connect to Gerrit server. Check your network connection.
|
|
767
|
+
**Actions:** `get`, `set`, `list`, `reset`
|
|
707
768
|
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
769
|
+
**Examples:**
|
|
770
|
+
```bash
|
|
771
|
+
ger config list
|
|
772
|
+
ger config get gerrit.url
|
|
773
|
+
ger config set gerrit.url https://gerrit.example.com
|
|
711
774
|
```
|
|
712
775
|
|
|
713
|
-
|
|
776
|
+
---
|
|
714
777
|
|
|
715
|
-
|
|
778
|
+
## Auto-Detection
|
|
716
779
|
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
780
|
+
These commands auto-detect the change from the HEAD commit's `Change-Id` footer when no change-id is provided:
|
|
781
|
+
|
|
782
|
+
`show`, `build-status`, `topic`, `rebase`, `extract-url`, `diff`, `comments`, `vote`, `retrigger`, `files`, `reviewers`
|
|
783
|
+
|
|
784
|
+
---
|
|
785
|
+
|
|
786
|
+
## Exit Codes
|
|
721
787
|
|
|
722
|
-
|
|
723
|
-
-
|
|
724
|
-
-
|
|
725
|
-
- French (fr)
|
|
726
|
-
- German (de)
|
|
727
|
-
- Japanese (ja)
|
|
728
|
-
- Chinese (zh)
|
|
788
|
+
- `0` — Success
|
|
789
|
+
- `1` — General error (network, API, validation)
|
|
790
|
+
- `build-status --exit-status` returns non-zero on build failure
|