{"_id":"@aabuhijleh/gh-attach","_rev":"2-b1e1504418500332b46fe8c97e034674","name":"@aabuhijleh/gh-attach","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@aabuhijleh/gh-attach","version":"0.1.0","keywords":["github","cli","screenshot","pull-request","attachments","bun"],"author":{"name":"aabuhijleh"},"license":"MIT","_id":"@aabuhijleh/gh-attach@0.1.0","maintainers":[{"name":"aabuhijleh","email":"aabuhijleh.dev@gmail.com"}],"homepage":"https://github.com/aabuhijleh/abed-hub/tree/main/packages/gh-attach","bugs":{"url":"https://github.com/aabuhijleh/abed-hub/issues"},"bin":{"gh-attach":"dist/gh-attach.js"},"dist":{"shasum":"1ca4c80614644bebf903406f0827fb33f5b7811d","tarball":"https://registry.npmjs.org/@aabuhijleh/gh-attach/-/gh-attach-0.1.0.tgz","fileCount":4,"integrity":"sha512-3Xki3GddCkju6P0McL7FYzzUD/d1tbCY06QWU+TvXH2CBgsZ0NkJ6dwYXDXkZR/7ewxSIaelz6FSgU96FBQwQw==","signatures":[{"sig":"MEUCIBMKSPFMoqOx0o/R8CXr0x42fifiubX9zW5F+Urpok9zAiEA+GVB/Vcu/QCUXWLUfDbEnqsC0wy3LUnXoH+eUZLGp04=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":40220},"type":"module","engines":{"node":">=24"},"gitHead":"12f77f6252be75d6ce6791fbfc2107b375f5469f","scripts":{"test":"bun test","build":"bun build ./src/gh-attach.ts --target=bun --outdir=./dist","prepublishOnly":"bun run build"},"_npmUser":{"name":"aabuhijleh","email":"aabuhijleh.dev@gmail.com"},"repository":{"url":"git+https://github.com/aabuhijleh/abed-hub.git","type":"git","directory":"packages/gh-attach"},"_npmVersion":"11.13.0","description":"Upload local files to GitHub and print a markdown reference for each, ready to embed in a pull request or issue. Also screenshots a page to a PNG sized for GitHub.","directories":{},"_nodeVersion":"24.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"bun@1.4.0","devDependencies":{"citty":"^0.2.2","@types/bun":"latest","@abed-hub/config":"workspace:*"},"_npmOperationalInternal":{"tmp":"tmp/gh-attach_0.1.0_1787765671822_0.7056724408755388","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"_id":"@aabuhijleh/gh-attach@0.2.0","bin":{"gh-attach":"dist/gh-attach.js"},"bugs":{"url":"https://github.com/aabuhijleh/abed-hub/issues"},"dist":{"shasum":"0ffb1af892e50102ef87f996344107cbd59d9beb","tarball":"https://registry.npmjs.org/@aabuhijleh/gh-attach/-/gh-attach-0.2.0.tgz","integrity":"sha512-0fa2o2G0X1P4FXEh9w/AbKW0x1QMr4/WVJYsaReLiEpB0p3x8k9o68aZJLjxjlcLb4ZknQZY3kE0H/xnU9d8TA==","fileCount":4,"unpackedSize":29355,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aabuhijleh%2fgh-attach@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCUQX4JQmvPZfwSCKb1GG10k1zvZc5uYcXmOWenytAkFgIhAJX7txqGMFFuAM/Z+EtX1znTRuc6hxD1e5MPyyk+3u3L"}]},"name":"@aabuhijleh/gh-attach","type":"module","author":{"name":"aabuhijleh"},"engines":{"node":">=24"},"gitHead":"82b10a491bdc55f200b46b53def499666d03de6c","license":"MIT","scripts":{"test":"bun test","build":"bun build ./src/gh-attach.ts --target=bun --outdir=./dist","prepublishOnly":"bun run build"},"version":"0.2.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6ce643de-ef2b-4f94-8c64-0cc595736189"},"approver":{"name":"aabuhijleh","email":"aabuhijleh.dev@gmail.com"}},"homepage":"https://github.com/aabuhijleh/abed-hub/tree/main/packages/gh-attach","keywords":["github","cli","screenshot","pull-request","playwright","bun"],"repository":{"url":"git+https://github.com/aabuhijleh/abed-hub.git","type":"git","directory":"packages/gh-attach"},"_npmVersion":"12.0.2","description":"Screenshot a page to a PNG sized for GitHub, ready to attach to a pull request or issue with gh --attach.","directories":{},"maintainers":[{"name":"aabuhijleh","email":"aabuhijleh.dev@gmail.com"}],"_nodeVersion":"24.20.0","publishConfig":{"access":"public"},"packageManager":"bun@1.4.0","devDependencies":{"citty":"^0.2.2","@types/bun":"latest"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/gh-attach_0.2.0_1788609187101_0.5025710160605212"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-26T17:34:31.681Z","modified":"2026-09-05T11:53:07.493Z","0.1.0":"2026-08-26T17:34:31.955Z","0.2.0":"2026-09-05T11:53:07.193Z"},"bugs":{"url":"https://github.com/aabuhijleh/abed-hub/issues"},"author":{"name":"aabuhijleh"},"license":"MIT","homepage":"https://github.com/aabuhijleh/abed-hub/tree/main/packages/gh-attach","keywords":["github","cli","screenshot","pull-request","playwright","bun"],"repository":{"url":"git+https://github.com/aabuhijleh/abed-hub.git","type":"git","directory":"packages/gh-attach"},"description":"Screenshot a page to a PNG sized for GitHub, ready to attach to a pull request or issue with gh --attach.","maintainers":[{"name":"aabuhijleh","email":"aabuhijleh.dev@gmail.com"}],"readme":"# @aabuhijleh/gh-attach\n\nScreenshots a page to a PNG sized for GitHub, ready to attach to a pull request or issue.\n\n```bash\ngh-attach shot ./page.html ./out.png --width 948\n# wrote ./out.png (1896x898 px, 2x of 948css)\n```\n\n948px is the default width because it lands at GitHub's 900px render width with no\ndownscaling. The shot is cropped to the page's content, so a short page does not come back\npadded with blank space.\n\nUploading is [`gh`'s job](https://cli.github.com) since 2.99.0. `gh pr comment 12 --attach\n./out.png` uploads and embeds in one command, against the token `gh` already holds. This\npackage used to do that too, through a browser session cookie, back when GitHub had no\nupload API you could reach with a token. That is gone, and so is the cookie.\n\n## Prerequisites\n\n[Bun](https://bun.sh), and a browser for `shot`. Playwright is a prerequisite you install\nyourself rather than a dependency of this package:\n\n```bash\nbun add -g @aabuhijleh/gh-attach\nbun add -g @playwright/cli\nplaywright-cli install-browser chromium   # only if no chromium build is installed yet\n```\n\nmacOS is the tested platform. Linux and WSL work.\n\n## Commands\n\n| Command | What it does |\n| --- | --- |\n| `gh-attach shot <page.html\\|url> <out.png> [--width 948]` | Screenshot a page to a PNG at 2x, cropped to its content. |\n\n## Develop\n\n```bash\nbun install\nbunx tsc --noEmit\nbun run build\n```\n","readmeFilename":"README.md"}