Attachments
The attachments command (aliases attachment, a) surfaces Redmine’s Attachments API so you can inspect an attachment’s metadata and download its bytes. Downloads reuse the active profile’s server and API key, streaming straight to disk - no curl, no manually extracted key.
redmine attachments get <id> [flags]Aliases: show, view, metadata. Fetches the attachment’s ID, filename, size, content type, description, author, and creation time via GET /attachments/:id.json. Table output also shows the download URL (when present); json returns every field, including content_url.
| Flag | Description |
|---|---|
-o, --output |
Output format: table, json, csv |
redmine attachments get 42redmine attachments get 42 -o jsonredmine attachments get 42 -o csvdownload
Section titled “download”redmine attachments download <id> [flags]Aliases: dl, get-file. Streams the attachment’s raw bytes to disk (or stdout), authenticating with the active profile. The response is streamed, never buffered entirely in memory, so large files are safe.
| Flag | Description |
|---|---|
-d, --dir |
Directory to save into, using the attachment’s real filename (created if missing) |
--path |
Exact destination file path. Use - to stream to stdout |
-o, --output |
Confirmation format: json prints a result object; otherwise a human line is written to stderr |
With no destination flag, the file is saved as ./<filename> in the current directory.
# Saves ./<filename>redmine attachments download 42redmine attachments download 42 --dir ./downloadsredmine attachments download 42 --path ./logo.pngredmine attachments download 42 --path - | file -redmine attachments download 42 --dir ./downloads -o json