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
Describe the feature or problem you’d like to solve
Often attaching files to comments is helpful. It would be great to be able to do this from the CLI.
Proposed solution
Like gh pr create, we could have a What's next? section that allows attaching local file, as well as a flag.
The CLI may actually be able to provide a better experience than the web UI, which can only handle a certain number of file extensions. If a file extension is not supported, the CLI could quickly zip it up and attach it transparently.
Hi, this request comes up every once in a while #1895 (comment) and while it's certainly an interesting feature proposal, currently we're blocked on allowing it because there is no available API to use to upload attachments to issue threads.
Real-world scenario: Just tried to create a bug report with a mobile screenshot using gh issue create and had to fall back to the web interface specifically for image attachment. This breaks the seamless CLI experience.
Benefits:
Keeps entire workflow in terminal
Essential for bug reports with visual evidence
Matches user expectations (most CLI tools support file operations)
Would improve adoption of GitHub CLI for issue management
Current workaround: Using gh issue create --web but this defeats the purpose of a CLI tool.
Please prioritize this - it's a common need for developers who prefer CLI workflows! 🙏
Reacted by Ruhollah Majdoddin, olamilekan-yusuf, Janani Janardhanan, Ethan Woodward, Shalom Bhooshi and Kevin Sweet
I built gitshot to solve exactly this - posted this image using gitshot 🎉 🎉
GitShot is a zero-config, agent-ready CLI that uploads images to GitHub issues, PRs, and comments. Announcement.
I built gh-image as a gh CLI extension to solve this. It replicates the browser's own upload flow, so images land at github.com/user-attachments/assets/….
The same URLs you get from drag-and-drop. Images on private repos stay private, since the URLs inherit repo visibility.
gh extension install drogers0/gh-image
IMG=$(gh image banner.png --repo cli/cli)# =>  and while it's certainly an interesting feature proposal, currently we're blocked on allowing it because there is no available API to use to upload attachments to issue threads.
austince commentedon Oct 11, 2021
Ah sorry for not doing a more thorough search @mislav, will close now.
rcoenen commentedon Aug 22, 2025
👍 Strongly support this feature request!
Real-world scenario: Just tried to create a bug report with a mobile screenshot using
gh issue createand had to fall back to the web interface specifically for image attachment. This breaks the seamless CLI experience.Benefits:
Current workaround: Using
gh issue create --webbut this defeats the purpose of a CLI tool.Please prioritize this - it's a common need for developers who prefer CLI workflows! 🙏
vipulgupta2048 commentedon Mar 26, 2026
I built gitshot to solve exactly this - posted this image using gitshot 🎉 🎉
GitShot is a zero-config, agent-ready CLI that uploads images to GitHub issues, PRs, and comments. Announcement.
drogers0 commentedon Mar 27, 2026
I built
gh-imageas aghCLI extension to solve this. It replicates the browser's own upload flow, so images land atgithub.com/user-attachments/assets/….The same URLs you get from drag-and-drop. Images on private repos stay private, since the URLs inherit repo visibility.
^ That's the command I used to post this.
It automatically pulls your browser's session cookie, no tokens or OAuth setup required.