npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

patch-picasso

v0.7.0

Published

Paints a witty image for your PR and posts it as a comment (using OpenAI + Vercel AI SDK).

Readme

patch-picasso

Paints a witty image for your Pull Request and posts it as a comment — self-contained in a GitHub Action using npx, Vercel AI SDK, and OpenAI.

What it does

  • Reads PR details (title, body, changed files)
  • Crafts a humorous image prompt with Vercel AI SDK
  • Generates an image via OpenAI (gpt-image-1)
  • Posts the image as a PR comment
  • Skips if it already commented on the PR

Requirements

  • Node.js 18+ in your GitHub Action runner
  • GITHUB_TOKEN (provided automatically by GitHub Actions)
  • OPENAI_API_KEY (you provide)

Quick Start (GitHub Actions)

Copy this workflow into your repo at .github/workflows/patch-picasso.yml:

name: Patch Picasso

on:
  pull_request:
    types: [opened, synchronize, reopened]

jobs:
  patch-picasso:
    runs-on: ubuntu-latest
    permissions:
      contents: write
      pull-requests: write
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Post witty image to PR
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
        run: |
          npx --yes patch-picasso \
            --repo "${{ github.repository }}" \
            --pr "${{ github.event.pull_request.number }}"

Inputs

  • --repo: owner/repo (defaults to GITHUB_REPOSITORY)
  • --pr or --pr-number: pull request number (auto-detected on pull_request events)

How it works

  • Uses GitHub REST API with GITHUB_TOKEN to read PR details and post a comment
  • Uses Vercel AI SDK (ai, @ai-sdk/openai) to synthesize a witty image prompt and caption
  • Uses OpenAI Images (gpt-image-1) to generate an image
  • Adds the image as a commit to the patch-picasso-images branch (configurable)
  • Adds a comment with the image to the PR
  • Adds a hidden marker to detect if it has already commented, ensuring idempotency

Environment Variables

  • GITHUB_TOKEN: Provided automatically by GitHub Actions. Needed for GitHub API calls
  • OPENAI_API_KEY: Your OpenAI API key. Add as a repository secret named OPENAI_API_KEY

Local test

npm install
npm run build
GITHUB_TOKEN=ghp_example OPENAI_API_KEY=sk-example \
node dist/index.js --repo your-org/your-repo --pr 123

Notes

  • Forked PRs cannot receive uploaded images to the base repo by default; the fallback upload is skipped
  • No GitHub App is required; everything uses the standard GITHUB_TOKEN

License

MIT