You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
blockedenhancementa request to improve CLIextension-ideaAn idea that could make a good GitHub CLI extensiongh-issuerelating to the gh issue commandplatformProblems with the GitHub platform rather than the CLI client
Describe the feature or problem you’d like to solve
I know that it is not possible to upload files to issues programmatically, but it would be helpful to at least be able to download files. At the moment, as far as I understand, it is not possible either.
This would allow users to automatically process issues with attachments in their bodies and comments.
Proposed solution
Add a new command that will download a file referred to in the issue by its URL
gh issue download URL
Reacted by Antoine Mérino, Vim, Marc de Jong, Constantino Cronemberger, Andrew, sters, Rasmus Tengblad, rajesh-jayavelu, Peter Sugihara, Colin Smetz and 12 more
@chubin : Thanks for bringing up this suggestion! ❤
Could you share a little more about the use case in question? How are you envisioning this being used by GitHub CLI users?
I know there have been times where I've attached files to an issue for diagrams or PDFs, but I haven't really considered what I'd attach to issue / PR / discussion that'd I wouldn't commit to the repo. 🤔
I know that it is not possible to upload files to issues programmatically, but it would be helpful to at least be able to download files. At the moment, as far as I understand, it is not possible either.
Sadly, I think you're right: there are no APIs around attachments — whether release, issue, pull request, or discussion — to make something like this easy.
Without them, the best anyone could do is pulling the main issue body and every issue comment looking for specific GitHub domains like *.githubassets.com, *.githubusercontent.com. This sounds like a great idea for someone wanting to hack on a GitHub CLI extension.
Could you share a little more about the use case in question? How are you
envisioning this being used by GitHub CLI users?
The use case is pretty straightforward and trivial:
I am writing a script that will "implement" (some) GitHub Issues using AI.
If there are any attachments in the issue (and in my case, there are),
the script will need access to them.
Before creating this issue, I did some research on the Internet
(Stack Overflow, Reddit), and I see that this use case is pretty
popular nowadays, and it will probably become even more popular in
the future.
I know there have been times where I've attached files to an issue for diagrams
or PDFs, but I haven't really considered what I'd attach to issue / PR /
discussion that'd I wouldn't commit to the repo. 🤔
It depends on the workflow.
It is possible to attach files to issues, so people will do so.
As developers, we must be able to process such issues.
Whether it's PDFs, diagrams, log files, or archived discussion
threads, it doesn't really matter. Issue attachments are supported
by GitHub, so we should support them too.
Sadly, I think you're right: there are no APIs around attachments — whether
release, issue, pull request, or discussion — to make something like this easy.
Without them, the best anyone could do is pulling the main issue body and every
issue comment looking for specific GitHub domains like *.githubassets.com,
*.githubusercontent.com. This sounds like a great idea for someone wanting to
hack on a GitHub CLI extension.
I believe it is primarily not possible, with or without any
extension. As far as I know, you can't access a file from an issue,
even with a direct URL to it. (only through a browser, or simulating
a brwoser, using its cookies).
Maybe I am wrong, but I am 99.9% sure that it is not possible, and
the client can't do anything about it.
hi there -
I'm after the same thing so thought I'd describe another use case -
I'm a engineer and developer, in a company of majority non-coding engineers. My team have adopted Github for all our project planning and we use the github CLI to retrieve this issue / project data and report to the rest of the practice.
Ideally this data would be able to include images - currently I can only show text.
Unfortunately, this type of feature is blocked because GitHub APIs don't support issue and PR attachments.
I speculate there is an abuse concern here of people being able to attach arbitrary files outside of repository contents. As far as I know, the only support is through the GitHub web interface for uploading and accessing attachments. 😞
+1 for a user need on this API. My team wants user to upload logs and screenshots in their bug report or feature request. We want to programmatically access the screenshot files so a coding AI can analyze the issue using vision AI models. This would be something that github's own copilot agent can benefit from too.
Another use case: Claude Code is excellent at completing simple issues that I point to by issue number. However, for small UI tweaks where screenshots provide crucial context, I need to manually download them and feed them to the agent. It would be great if the agent could simply retrieve this context via the CLI, as they do for all other context.
Reacted by Colin Smetz, Sun and Bui Gia Thinh Sharefull
FYI, this in my CLAUDE.md works pretty well to get claude completing GitHub issues and download attached images:
## Completing GitHub Issues
- Create commits with descriptive messages referencing the issue number
- Lint and test before opening a PR
- If there's UI, don't open a PR. Start a dev server and link the user to the feature.
- Use `gh` CLI for GitHub operations
- View issue: `gh issue view <number>` (consider title, body, and comments)
- Download images from issues: `curl -H "Authorization: token $(gh auth token)" -L <image-url> -o image.png`
Reacted by Herve Quiroz, Takanao Endo, Lucas Jenkins, Tej Pochiraju, Eugene, Tanakorn (Ball), Pookongmek and Piotr Kapera
Hi folks, please open a GitHub support ticket to request this API - generally requests in this repository are monitored by the CLI maintainers and not the platform developers.
blockedenhancementa request to improve CLIextension-ideaAn idea that could make a good GitHub CLI extensiongh-issuerelating to the gh issue commandplatformProblems with the GitHub platform rather than the CLI client
Activity
andyfeller commentedon May 7, 2024
@chubin : Thanks for bringing up this suggestion! ❤
Could you share a little more about the use case in question? How are you envisioning this being used by GitHub CLI users?
I know there have been times where I've attached files to an issue for diagrams or PDFs, but I haven't really considered what I'd attach to issue / PR / discussion that'd I wouldn't commit to the repo. 🤔
Sadly, I think you're right: there are no APIs around attachments — whether release, issue, pull request, or discussion — to make something like this easy.
Without them, the best anyone could do is pulling the main issue body and every issue comment looking for specific GitHub domains like
*.githubassets.com,*.githubusercontent.com. This sounds like a great idea for someone wanting to hack on a GitHub CLI extension.chubin commentedon May 8, 2024
jgunstone commentedon Sep 26, 2024
hi there -
I'm after the same thing so thought I'd describe another use case -
I'm a engineer and developer, in a company of majority non-coding engineers. My team have adopted Github for all our project planning and we use the github CLI to retrieve this issue / project data and report to the rest of the practice.
Ideally this data would be able to include images - currently I can only show text.
vim-usds commentedon Sep 29, 2024
It would be so awesome to have this capability in the CLI.
Here's a workflow file that is able to grab an XLS attachment from the body of an issue that is created with an
attachmentlabel:Details
andyfeller commentedon Oct 7, 2024
Unfortunately, this type of feature is blocked because GitHub APIs don't support issue and PR attachments.
I speculate there is an abuse concern here of people being able to attach arbitrary files outside of repository contents. As far as I know, the only support is through the GitHub web interface for uploading and accessing attachments. 😞
chuanqisun commentedon Jul 25, 2025
+1 for a user need on this API. My team wants user to upload logs and screenshots in their bug report or feature request. We want to programmatically access the screenshot files so a coding AI can analyze the issue using vision AI models. This would be something that github's own copilot agent can benefit from too.
psugihara commentedon Oct 19, 2025
Another use case: Claude Code is excellent at completing simple issues that I point to by issue number. However, for small UI tweaks where screenshots provide crucial context, I need to manually download them and feed them to the agent. It would be great if the agent could simply retrieve this context via the CLI, as they do for all other context.
stevemadere commentedon Oct 31, 2025
This is an absolute requirement for an AI agent that works a queue of issues assigned to it.
Often, the only efficient way to communicate GUI requirements is with an illustration of the desired feature.
psugihara commentedon Oct 31, 2025
FYI, this in my CLAUDE.md works pretty well to get claude completing GitHub issues and download attached images:
bric3 commentedon Jan 22, 2026
BagToad commentedon Jan 22, 2026
Hi folks, please open a GitHub support ticket to request this API - generally requests in this repository are monitored by the CLI maintainers and not the platform developers.
drogers0 commentedon Sep 8, 2026
While waiting on something first party, gh-image does this today:
Works on private attachments with your
ghtoken. No browser needed.