Skip to content

Conversation

@rahulgi
Copy link

@rahulgi rahulgi commented Feb 11, 2026

What problem it solves

GitHub has no API for uploading images from CLI tools. Agents building PRs and issues can't attach screenshots, diagrams, or mockups because ![](./local-file.png) doesn't work — GitHub needs a hosted URL. Traditional image hosts (Imgur, Cloudinary) require API keys and account signup, which agents can't do autonomously.

Who uses this workflow

AI coding agents (Claude Code, Codex, Copilot) and developers who need to embed images in GitHub markdown from the terminal.

How it works

One curl command uploads an image to img402.dev and returns a public CDN URL. The skill then embeds that URL in PRs, issues, or comments via gh CLI. No account, no API key, no auth. 1MB max, 7-day retention.

Example

curl -s -X POST https://img402.dev/api/free -F image=@screenshot.png
# → {"url":"https://i.img402.dev/aBcDeFgHiJ.png", ...}

gh pr comment --body "![Screenshot](https://i.img402.dev/aBcDeFgHiJ.png)"

Inspired by: github.com/cli/cli#1895 — long-standing request for image uploads in the GitHub CLI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant