AIToday
AI Coding AssistantsZenn AI/MLPublished: Nov 11, 2026, 16:00 JST

GitHub CLI v2.99.0 adds --attach for PR images

Send on LINE
GitHub CLI v2.99.0 adds --attach for PR images

3 Key Points

  1. What happened

    GitHub CLI v2.99.0, released September 1, 2026, added a --attach flag that uploads images or videos to gh pr create/edit, gh issue create/edit, and comment commands, up to 50 files per run.

  2. Why it matters

    Attachments can now be added from the command line in one step, and images referenced by local path in the body are rewritten to uploaded URLs — so screenshots appear in the pull request without a manual browser drag-and-drop.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, every morning.

Context & Analysis

Until now, GitHub CLI had no way to upload images, so anyone letting Claude Code open a pull request had to finish the job in a browser by dragging screenshots in by hand. Version 2.99.0 closes that gap: the --attach flag can be repeated within one command, and because it replaces a local image path in the body with the uploaded URL, before-and-after tables can be composed in a markdown file and posted as-is.

It also shows how to make Claude Code use the flag on its own. Writing rules into CLAUDE.md — capture before-and-after screenshots for UI changes, keep them outside the repository or in a .gitignore'd directory, and create the pull request with --body-file plus --attach — prompts the agent to include them. One rule matters because gh pr create --attach still creates the pull request when some uploads fail, but exits with a non-zero code; an agent that reads only the exit code may retry and hit an error on the same branch, so the guidance is to add failed images later with gh pr edit instead of recreating the pull request.

Because --attach is a feature of the gh command itself, the same approach extends to other coding agents. Codex and Antigravity CLI can attach screenshots the same way if the equivalent rules are written in AGENTS.md rather than CLAUDE.md. The main limits are that the user needs write access to the target repository, the flag is unavailable on GitHub Enterprise Server, and videos are displayed as a player without alt text.

FAQ
Which commands support --attach?
At v2.99.0, the flag works with gh pr create and gh pr edit, gh issue create and gh issue edit, and gh pr comment and gh issue comment.
Can I control where the image appears in the pull request body?
Yes. If you reference a local path such as ./before.png in the body and pass the same path to --attach, gh rewrites it to the uploaded URL at that position.
Does --attach work on GitHub Enterprise Server?
No. It is available on GitHub.com and GitHub Enterprise Cloud, but not on GitHub Enterprise Server.
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleClaude Code-built Beep Locator finds mystery beep within 40cm