{"_id":"gitshot","_rev":"3-b7cac7202b93d6cea0d5b23efd6be0f6","name":"gitshot","dist-tags":{"latest":"0.0.2"},"versions":{"0.1.0":{"name":"gitshot","version":"0.1.0","keywords":["github","image","upload","screenshot","cli","pr","issue","markdown","agent","llm","copilot","claude","agentic"],"author":{"name":"Vipul Gupta","email":"vipulgupta2048@gmail.com"},"license":"MIT","_id":"gitshot@0.1.0","maintainers":[{"name":"vipulgupta2048","email":"vipulgupta2048@gmail.com"}],"homepage":"https://github.com/vipulgupta2048/gitshot#readme","bugs":{"url":"https://github.com/vipulgupta2048/gitshot/issues"},"bin":{"gitshot":"dist/index.js"},"dist":{"shasum":"7538c94d38c3926653fea89e60845db334630674","tarball":"https://registry.npmjs.org/gitshot/-/gitshot-0.1.0.tgz","fileCount":12,"integrity":"sha512-xwQa1kPHwE5mDDInN39v/ie+vDrIwaWX7JQNyM/bew7UibfwtuE+8eCteRF4eWslk2EE527qrPAIgxuY235X7Q==","signatures":[{"sig":"MEUCIQDpgmL4l7BRL2zzlDOeOO4YmUaHv5gD5KvGvbzDLlzT1AIgbPPYDAn37Gs9fGsT/vSWnHix1wQeG23t0IBfZ7G5wZg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32787},"type":"module","engines":{"node":">=22.0.0"},"gitHead":"49b622d180f80df56c6636728821815afaa39abd","scripts":{"build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"vipulgupta2048","email":"vipulgupta2048@gmail.com"},"repository":{"url":"git+https://github.com/vipulgupta2048/gitshot.git","type":"git"},"_npmVersion":"10.9.4","description":"One command. Image in your PR. Upload images and get markdown-ready URLs for GitHub issues, PRs, and comments.","directories":{},"_nodeVersion":"22.21.1","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0","@types/node":"^25.5.0"},"_npmOperationalInternal":{"tmp":"tmp/gitshot_0.1.0_1774442979041_0.6746976973335661","host":"s3://npm-registry-packages-npm-production"}},"0.0.1":{"name":"gitshot","version":"0.0.1","keywords":["github","image","upload","screenshot","cli","pr","issue","markdown","agent","llm","copilot","claude","agentic"],"author":{"name":"Vipul Gupta","email":"vipulgupta2048@gmail.com"},"license":"MIT","_id":"gitshot@0.0.1","maintainers":[{"name":"vipulgupta2048","email":"vipulgupta2048@gmail.com"}],"homepage":"https://github.com/vipulgupta2048/gitshot#readme","bugs":{"url":"https://github.com/vipulgupta2048/gitshot/issues"},"bin":{"gitshot":"dist/index.js"},"dist":{"shasum":"46e2d4bb5fbeb548ef232c6289a61a4aa6d4ded9","tarball":"https://registry.npmjs.org/gitshot/-/gitshot-0.0.1.tgz","fileCount":14,"integrity":"sha512-85uEQEPZxijTWVo7hGQyhHAZ/hyEZbYiZ2EhpFjelYKAI6GTViPDJ0fVtdeisnsxUypiO5YFL9ihPQRKV5nAJw==","signatures":[{"sig":"MEYCIQCZICjNR9qpCoGguHRiCLTfa0dj7mNKPS0wt+t6rWom4gIhALQDuApMWQNlLxwPvFBRJJWsbVHSI1SOTAySo9vKHfrL","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":46151},"type":"module","engines":{"node":">=22.0.0"},"gitHead":"11d944e45d0fc79fc78f562a1e29e53e1ebb9461","scripts":{"build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"vipulgupta2048","email":"vipulgupta2048@gmail.com"},"repository":{"url":"git+https://github.com/vipulgupta2048/gitshot.git","type":"git"},"_npmVersion":"10.9.4","description":"Zero-config, agent-first CLI to upload images to issues, PRs, and comments. Screenshots on GitHub, now without a browser.","directories":{},"_nodeVersion":"22.21.1","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0","@types/node":"^25.5.0"},"_npmOperationalInternal":{"tmp":"tmp/gitshot_0.0.1_1774449162542_0.7769759503314819","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"gitshot","version":"0.0.2","description":"Zero-config, agent-first CLI to upload images to issues, PRs, and comments. Screenshots on GitHub, now without a browser.","type":"module","bin":{"gitshot":"dist/index.js"},"scripts":{"build":"tsc","prepublishOnly":"npm run build"},"keywords":["github","image","upload","screenshot","cli","pr","issue","markdown","agent","llm","copilot","claude","agentic"],"author":{"name":"Vipul Gupta","email":"vipulgupta2048@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/vipulgupta2048/gitshot.git"},"engines":{"node":">=22.0.0"},"devDependencies":{"@types/node":"^25.5.0","typescript":"^5.4.0"},"_id":"gitshot@0.0.2","gitHead":"8c24a699677cd81f2aac6f4e261a43e50f370d60","bugs":{"url":"https://github.com/vipulgupta2048/gitshot/issues"},"homepage":"https://github.com/vipulgupta2048/gitshot#readme","_nodeVersion":"22.21.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-vHp0QU/Avycu7LDhyrX+GQTnsRrUfAt80sChkDUv7mQtJFuCVbgMnU1VhhzOhFLaOePLVwrusXp6WVUScwExcw==","shasum":"236d7599212427336e34991f6301b0d38e8d02ad","tarball":"https://registry.npmjs.org/gitshot/-/gitshot-0.0.2.tgz","fileCount":14,"unpackedSize":47453,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC4uDcY0CI2JI+Uq2jcPGCfTox2dIGrv2j0B9gW75MPLwIgKDBk0QMtrUtCQELjgTWE71YVfmRsPNxBHVJte7ekzxI="}]},"_npmUser":{"name":"vipulgupta2048","email":"vipulgupta2048@gmail.com"},"directories":{},"maintainers":[{"name":"vipulgupta2048","email":"vipulgupta2048@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/gitshot_0.0.2_1775510551477_0.023228608313398125"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-25T12:49:38.957Z","modified":"2026-04-06T21:22:31.708Z","0.1.0":"2026-03-25T12:49:39.199Z","0.0.1":"2026-03-25T14:32:42.705Z","0.0.2":"2026-04-06T21:22:31.608Z"},"bugs":{"url":"https://github.com/vipulgupta2048/gitshot/issues"},"author":{"name":"Vipul Gupta","email":"vipulgupta2048@gmail.com"},"license":"MIT","homepage":"https://github.com/vipulgupta2048/gitshot#readme","keywords":["github","image","upload","screenshot","cli","pr","issue","markdown","agent","llm","copilot","claude","agentic"],"repository":{"type":"git","url":"git+https://github.com/vipulgupta2048/gitshot.git"},"description":"Zero-config, agent-first CLI to upload images to issues, PRs, and comments. Screenshots on GitHub, now without a browser.","maintainers":[{"name":"vipulgupta2048","email":"vipulgupta2048@gmail.com"}],"readme":"<p align=\"center\">\n  <img src=\"logo.png\" alt=\"gitshot\" width=\"600\">\n</p>\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/gitshot\"><img src=\"https://img.shields.io/npm/v/gitshot?style=for-the-badge&logo=npm&logoColor=white&label=npm&color=f38ba8\" alt=\"npm\"></a>\n  <a href=\"https://github.com/vipulgupta2048/gitshot/blob/master/LICENSE\"><img src=\"https://img.shields.io/badge/license-MIT-a6e3a1?style=for-the-badge&logo=opensourceinitiative&logoColor=white\" alt=\"license\"></a>\n  <a href=\"https://nodejs.org\"><img src=\"https://img.shields.io/badge/node-%3E%3D22-94e2d5?style=for-the-badge&logo=nodedotjs&logoColor=white\" alt=\"node\"></a>\n</p>\n\n<p align=\"center\">\n  <b>Zero-config, agent-first CLI to upload images to issues, PRs, and comments.</b><br>\n</p>\n\n<p align=\"center\">\n  <img src=\"demo/gitshot-demo.gif\" alt=\"gitshot demo\" width=\"700\">\n</p>\n\nUpload images from the terminal and get markdown-ready URLs for GitHub issues, PRs, and comments. Auto-detects the best backend. Built for AI agents and humans.\n\n## Why do I need this?\n\nGitHub has **no API** for uploading images to issues, PRs, or comments. This has been [requested since 2020](https://github.com/cli/cli/issues/1895) — 5+ years, no resolution. The `gh` CLI's `--body` only accepts text. AI agents can take screenshots but can't attach them. It's a gap you are bound to hit. \n\n`gitshot` fixes this in one command.\n\n# Installation\n\n## Install for Humans\n\n```bash\n# Use directly with npx (zero install)\nnpx gitshot rick.gif\n\n# Install globally\nnpm install -g gitshot\n```\n\n## **Install for Agents**\n\nInstall the gitshot skill for Command Code, Claude Code, Cursor, Copilot, Codex, and [40+ other agents](https://skills.sh):\n\n```bash\nnpx skills add vipulgupta2048/gitshot\n```\n\nOnce installed, your agent automatically knows when and how to use `gitshot` — just ask it to \"attach a screenshot to the PR\" or \"upload an image to the issue.\"\n\n## **Install as GitHub CLI Extension**\n\n```bash\ngh extension install vipulgupta2048/gitshot\ngh shot rick.gif --pr 42\n```\n\n## Usage\n\n```bash\n# Upload + comment on a PR (one command)\ngitshot rick.gif --pr 42\n\n# Upload + comment with a caption\ngitshot rick.gif --pr 42 -m \"Here's the fix\"\n\n# Auto-detect PR from current branch\ngitshot rick.gif --pr\n\n# Upload + comment on an issue\ngitshot rick.gif --issue 10\n\n# Upload + create a new issue\ngitshot rick.gif --new-issue \"Button is misaligned\"\n\n# Multiple images with caption\ngitshot before.png after.png --pr 42 -m \"Visual diff\"\n\n# Just upload, print markdown (no GitHub action)\ngitshot rick.gif\n\n# Raw URL only (for scripting)\ngitshot --raw rick.gif\n\n# JSON output (for agents/LLMs)\ngitshot --json rick.gif\n# → {\"url\":\"https://...\",\"markdown\":\"![...](...)\",\"backend\":\"release\"}\n```\n\n## How It Works\n\nIf you have [`gh` CLI](https://cli.github.com) authenticated, `gitshot` creates a **dedicated public repo** (`<you>/gitshot-images`) and uploads images as GitHub Release Assets. URLs are permanent, hosted on GitHub infrastructure, and render in any GitHub markdown context. The repo is auto-created on first use.\n\nNo `gh`? It falls back to [catbox.moe](https://catbox.moe) — free, no signup, zero config.\n\n> **Privacy notice:** The `gitshot-images` repo is created as **public** by default, meaning uploaded images are accessible to anyone with the URL. Do not upload sensitive content (credentials, internal dashboards, private data) using the default release backend. Since [May 2023](https://github.blog/changelog/2023-05-09-more-secure-private-attachments/), GitHub restricts access to images attached to private repos — but release assets on a public repo have no such protection. Use Cloudinary or imgbb with access controls for sensitive images. You are responsible for what you upload.\n\n## Backends\n\n| Backend | Setup | Limits | Best for |\n|---------|-------|--------|----------|\n| **github releases** (default) | `gh` CLI authenticated | 2GB/file | Most reliable. Images on GitHub. |\n| **catbox** (fallback) | None | 200MB/file | No `gh` CLI, quick and dirty |\n| **cloudinary** | `CLOUDINARY_URL` env var | 25GB free | Production, CDN, transforms |\n| **imgbb** | `IMGBB_API_KEY` env var | 32MB/file | Simple free hosting |\n\n### Auto-detection order\n\n1. `--backend` flag → use that\n2. `CLOUDINARY_URL` env var → Cloudinary\n3. `IMGBB_API_KEY` env var → imgbb\n4. `gh` CLI authenticated → **release** (creates `<you>/gitshot-images`)\n5. None of the above → **catbox**\n\n### Using Cloudinary\n\n```bash\nexport CLOUDINARY_URL=cloudinary://API_KEY:API_SECRET@CLOUD_NAME\ngitshot rick.gif\n```\n\nGet your free URL at [cloudinary.com/console](https://cloudinary.com/console).\n\n### Using imgbb\n\n```bash\nexport IMGBB_API_KEY=your_api_key\ngitshot rick.gif\n```\n\nGet your free key at [api.imgbb.com](https://api.imgbb.com).\n\n### Using a specific repo\n\n```bash\ngitshot --repo myorg/my-images rick.gif\n```\n\n## Comparison\n\n| Feature | gitshot | gh-attach | GHPic | Manual upload |\n|---------|---------|-----------|-------|---------------|\n| Zero dependencies | Yes | Playwright | Raycast | N/A |\n| No browser needed | Yes | No | No | No |\n| Works over SSH | Yes | No | No | No |\n| Works in CI | Yes | No | No | No |\n| Cross-platform | Yes | Partial | macOS only | Yes |\n| Agent-friendly | Yes | No | No | No |\n| Multiple backends | 4 | 1 | 1 | Manual |\n| Status | **Active** | Archived | Active | N/A |\n\n## Background\n\nGitHub has no public API for uploading images to issues, PRs, or comments. This has been requested since 2020 with no resolution. The upload endpoint requires browser session cookies — not OAuth tokens, not PATs. There is no programmatic way to do it. gitshot works around this using GitHub Release Assets, which are fully API-accessible.\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.\n\n## License\n\nCode and assests licened under MIT.\nBuilt by Vipul Gupta using Command Code. \n","readmeFilename":"README.md"}