Skip to content

garden attachment

Upload and download comment/description attachments

Terminal window
garden attachment

Download an attachment to a local file

Terminal window
garden attachment get <attachment-name>

Download an attachment by its resource name (orgs/{org}/repos/{repo}/attachments/{id}) and print the local path.

By default it caches under the OS cache directory and is idempotent — re-running reuses the file. Use –out to write a specific path (–out - streams the bytes to stdout) or –dir to write into a directory.

Agents: image attachments in a PR body or comment appear as ![](orgs/.../attachments/id). Run this to fetch one, then read the file to view it — images only; video can’t be viewed.

Flag Type Default Description
-d, --dir string Write into this directory
-o, --out string Write to this path (- for stdout)

Upload a file and print its attachment resource name

Terminal window
garden attachment upload <file>

Upload a local image or video (png, jpg, gif, webp, mp4, webm) as a repo attachment and print its resource name. Reference it in any comment, reply, or PR description body as a markdown image:

![screenshot](orgs/acme/repos/mono/attachments/abc123)

Most flows upload for you — garden pr comment --attach or an inline ![](./shot.png) path in the body. Use this when you want the raw resource name to place by hand.

Flag Type Default Description
-o, --org string Organization slug (defaults to the checkout’s org)
-R, --repo string Repository slug (defaults to the current checkout)