garden review
Read a pull request’s diff with review threads inline
garden review <pr>Show a pull request as an annotated diff: the change against the latest base, with review threads drawn inline at their anchor. Use –range to diff between two revisions, –threads for a thread-centric view, or –json for a structured bundle.
| Flag | Type | Default | Description |
|---|---|---|---|
--base |
int32 | 0 |
Diff against this revision number (0 = latest base) |
--context |
int32 | 3 |
Context lines around each hunk |
--file |
stringSlice | — | Limit to these file paths (repeatable) |
--json |
bool | — | Output a structured bundle as JSON |
--materialize-attachments |
bool | true |
With –json, download embedded image attachments and rewrite their refs to local file paths (on by default; –materialize-attachments=false keeps the raw refs) |
-o, --org |
string | — | Organization slug (defaults to personal workspace) |
--range |
string | — | Diff revisions “a:b” (e.g. “2:3”); default is latest base → head |
-R, --repo |
string | — | Repository name (default: current checkout) |
--threads |
bool | — | Thread-centric view (for responding) instead of the full diff |
--unresolved |
bool | — | Only show unresolved threads |
garden review apply
Section titled “garden review apply”Apply a whole review from a YAML/JSON document
garden review apply <pr>Apply a declarative review (YAML or JSON) in one shot: create
every comment/reply, then publish them and post the verdict
(unless –draft, which leaves them as drafts to review with
garden review status).
Document shape (YAML): verdict: approve # approve | comment comments:
- at: api/foo.go:42 # path:line[:col][-line[:col]] → new thread body: | nil check needed here — cfg can be unset on the first request.- at: api/foo.go:42-48 # a line range body: extract this into a helper- reply_to: c:1a2b3c4d # reply to a thread (handle from --threads) body: fixed in rev 4 resolve: true- at: web/app.tsx:10 # attach screenshots to a comment body: new empty state attachments: [before.png, after.png] # paths relative to the doc- body: overall LGTM # no at/reply_to → top-level commentreviewed: [api/foo.go] # mark files reviewed at head (“*” = all) unreviewed: [api/bar.go] # clear a file’s checkpoint
| Flag | Type | Default | Description |
|---|---|---|---|
--draft |
bool | — | Create the comments as drafts without submitting |
-f, --file |
string | — | Review document (YAML or JSON); omit or ‘-’ to read stdin |
-o, --org |
string | — | Organization slug (defaults to personal workspace) |
-R, --repo |
string | — | Repository name (default: current checkout) |
garden review comment
Section titled “garden review comment”Add a draft comment/reply to your review
garden review comment <pr>Add a DRAFT comment to your review of a PR. Drafts are
visible only to you until you publish them with
garden review submit. Same anchoring as
garden pr comment (inline –file/–line, ranges,
–reply-to to reply), but held as drafts.
| Flag | Type | Default | Description |
|---|---|---|---|
--attach |
stringArray | — | Attach a local image/video, appended to the body (repeatable) |
-b, --body |
string | — | Comment body (required) |
--col |
int32 | 0 |
Anchor start column (optional) |
--end-col |
int32 | 0 |
End column of the range (optional) |
--end-line |
int32 | 0 |
End line of the range (optional) |
--file |
string | — | Anchor to this file (inline comment) |
--line |
int32 | 0 |
Anchor line (with –file) |
-o, --org |
string | — | Organization slug (defaults to personal workspace) |
--reply-to |
string | — | Reply to this thread (c:<short> handle, id, or resource name) |
-R, --repo |
string | — | Repository name (default: current checkout) |
--resolve |
bool | — | Resolve the thread (applies now) |
--rev |
int32 | 0 |
Anchor to this revision (0 = head) |
--unresolve |
bool | — | Unresolve the thread (now) |
garden review mark-reviewed
Section titled “garden review mark-reviewed”Mark files reviewed up to the current revision
garden review mark-reviewed <pr> [files...]Record that you’ve reviewed the given files up to the PR’s head revision. The default ‘garden review’ view then diffs each marked file from there, so a new revision only re-shows what changed since. With no files, marks every file in the current diff. Use –unmark to clear a file’s checkpoint (it diffs against trunk again).
| Flag | Type | Default | Description |
|---|---|---|---|
-o, --org |
string | — | Organization slug (defaults to personal workspace) |
-R, --repo |
string | — | Repository name (default: current checkout) |
--unmark |
bool | — | Clear the checkpoint(s) instead of marking reviewed |
garden review status
Section titled “garden review status”Show your pending (draft) review comments
garden review status <pr>| Flag | Type | Default | Description |
|---|---|---|---|
-o, --org |
string | — | Organization slug (defaults to personal workspace) |
-R, --repo |
string | — | Repository name (default: current checkout) |
garden review submit
Section titled “garden review submit”Publish your draft comments and post a verdict
garden review submit <pr>Publish your draft comments on the PR and post a review. Without –approve the review is submitted as comments only.
| Flag | Type | Default | Description |
|---|---|---|---|
-a, --approve |
bool | — | Approve the pull request (default: comment only) |
-o, --org |
string | — | Organization slug (defaults to personal workspace) |
-R, --repo |
string | — | Repository name (default: current checkout) |