Attachments
Attachments
Section titled “Attachments”Upload, download, and manage file attachments on Jira issues.
Prerequisites
Section titled “Prerequisites”- Authenticated profile (
atlcli auth login) - Jira permission: Browse Projects (view), Create Attachments (upload), Delete Attachments (delete)
List Attachments
Section titled “List Attachments”View attachments on an issue:
atlcli jira issue attachments PROJ-123Output:
ID FILENAME SIZE CREATED10001 screenshot.png 245 KB 2026-01-1410002 debug.log 12 KB 2026-01-1310003 requirements.pdf 1.2 MB 2026-01-10The issue key can also be passed as --key PROJ-123. Columns are sized to the
widest row.
Use --json for JSON output.
Upload Attachment
Section titled “Upload Attachment”Attach one or more files to an issue:
# Single fileatlcli jira issue attach PROJ-123 ./screenshot.png
# Several files in one callatlcli jira issue attach PROJ-123 ./file1.png ./file2.pdf ./logs.zip
# A glob the shell expands — every match is uploadedatlcli jira issue attach PROJ-123 ./screenshots/*.png
# Upload and comment in one stepatlcli jira issue attach PROJ-123 ./error.log --comment "Error logs from production"Options:
| Flag | Description |
|---|---|
--key |
Issue key, if you prefer it over the positional form |
--comment |
Post a comment on the issue after the upload. Markdown, converted like jira issue comments add |
--json |
JSON output |
Upload JSON Output
Section titled “Upload JSON Output”atlcli jira issue attach PROJ-123 ./a.png ./b.pdf --json{ "schemaVersion": "1", "issue": "PROJ-123", "attached": [ { "id": "20001", "filename": "a.png", "size": 250880, "mimeType": "image/png", "path": "./a.png" }, { "id": "20002", "filename": "b.pdf", "size": 12288, "mimeType": "application/pdf", "path": "./b.pdf" } ], "total": 2}A run with failures adds a failed array ([{ "path": "...", "error": "..." }]),
and --comment adds "comment": { "id": "30001" }.
Download Attachment
Section titled “Download Attachment”Download an attachment by ID or filename:
# By attachment IDatlcli jira issue attachment download 10001 -o ./downloads/
# By filename from issueatlcli jira issue attachment download PROJ-123 screenshot.png -o ./downloads/Options:
| Flag | Description |
|---|---|
-o, --output |
Output directory or file path (default: current directory) |
--overwrite |
Overwrite existing files |
-o is treated as a directory when it already exists as one or ends in a
path separator (./downloads/); missing directories are created. Otherwise it
names the target file:
# Writes ./downloads/screenshot.pngatlcli jira issue attachment download 10001 -o ./downloads/
# Writes ./shot.pngatlcli jira issue attachment download 10001 -o ./shot.pngWithout --overwrite, an existing file is left untouched and the command exits
with ATLCLI_ERR_IO.
Download All Attachments
Section titled “Download All Attachments”# Download all attachments from an issueatlcli jira issue attachments PROJ-123 --json | \ jq -r '.attachments[].id' | \ xargs -I {} atlcli jira issue attachment download {} -o ./downloads/Copy Attachment
Section titled “Copy Attachment”Copy an attachment to another issue, in the same or another project:
# By attachment IDatlcli jira issue attachment copy 10001 --to NEW-7
# By issue key + filename (copies every match)atlcli jira issue attachment copy PROJ-123 evidence-template.xlsx --to NEW-7Options:
| Flag | Description |
|---|---|
--to |
Target issue key (required) |
--json |
JSON output: { "copied": [{ "from", "id", "filename", "size", "issue" }], "total" } |
The file is downloaded into a private temporary folder, its size is checked against the attachment’s metadata, it is uploaded under the same filename, and the folder is removed, also when the copy fails. Memory use stays flat for large files; the only size limit is the target site’s attachment limit. A size mismatch uploads nothing.
To copy an issue together with all of its attachments, use
atlcli jira issue clone PROJ-123 --attachments, see
Issues. For whole projects, see
Copy issues between projects.
Delete Attachment
Section titled “Delete Attachment”Remove an attachment:
# By attachment IDatlcli jira issue attachment delete 10001 --confirm
# By issue key + filename (deletes every match)atlcli jira issue attachment delete PROJ-123 screenshot.png --confirmOptions:
| Flag | Description |
|---|---|
--confirm |
Required — deletion is not reversible |
JSON Output
Section titled “JSON Output”atlcli jira issue attachments PROJ-123 --json{ "schemaVersion": "1", "issue": "PROJ-123", "attachments": [ { "id": "10001", "filename": "screenshot.png", "size": 250880, "mimeType": "image/png", "created": "2026-01-14T10:00:00.000+0000", "author": { "displayName": "Alice", "email": "alice@company.com" }, "content": "https://company.atlassian.net/secure/attachment/10001/screenshot.png" } ], "total": 1}Supported File Types
Section titled “Supported File Types”Jira accepts most file types. Common attachments include:
- Images: PNG, JPG, GIF, SVG
- Documents: PDF, DOCX, XLSX, TXT
- Archives: ZIP, TAR.GZ
- Logs: LOG, TXT
- Code: Source files of any type
Use Cases
Section titled “Use Cases”Attach Build Artifacts
Section titled “Attach Build Artifacts”# Attach build log after CI failure, with the explanation in one callatlcli jira issue attach PROJ-123 ./build.log --comment "Build failed - see attached log"Bulk Export Attachments
Section titled “Bulk Export Attachments”# Export all attachments from issues matching JQLfor key in $(atlcli jira search --jql "project = PROJ AND attachments is not EMPTY" --all-results --json | jq -r '.issues[].key'); do mkdir -p "./attachments/$key" atlcli jira issue attachments $key --json | \ jq -r '.attachments[].id' | \ xargs -I {} atlcli jira issue attachment download {} -o "./attachments/$key/"doneMigrate Attachments Between Issues
Section titled “Migrate Attachments Between Issues”# Download from source issueatlcli jira issue attachments PROJ-100 --json | \ jq -r '.attachments[].id' | \ xargs -I {} atlcli jira issue attachment download {} -o /tmp/migrate/
# Upload to target issue — one call, every fileatlcli jira issue attach PROJ-200 /tmp/migrate/*Related Topics
Section titled “Related Topics”- Issues - Work with issues
- Import/Export - Bulk data operations