---
name: jira-dl
description: Use when the user asks about downloading Jira attachments, listing Jira attachments, or using the jira-dl CLI tool
---

# jira-dl — Jira Attachment Downloader

A CLI tool for downloading attachments from Jira Cloud issues.

## Configuration

Set up credentials via config file or environment variables.

**Config file** (`~/.config/jira-dl/config.yaml`):
```yaml
url: https://mycompany.atlassian.net
email: me@company.com
api_token: your-api-token
```

**Environment variables** (override config file):
- `JIRA_URL` — Jira instance URL
- `JIRA_EMAIL` — account email
- `JIRA_API_TOKEN` — API token from https://id.atlassian.com/manage-profile/security/api-tokens

## Usage

**List attachments on an issue:**
```bash
jira-dl list PROJ-123
```

**Download all attachments:**
```bash
jira-dl download PROJ-123
```

**Download a specific attachment:**
```bash
jira-dl download PROJ-123 --name "screenshot.png"
```

**Download to a specific directory:**
```bash
jira-dl download PROJ-123 -o ./downloads
```

## Notes

- If multiple attachments share a filename, they are auto-renamed: `file.png`, `file_1.png`, `file_2.png`
- The output directory is created automatically if it doesn't exist
- Auth uses HTTP Basic Auth (email + API token)
