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

ai-og-image

v1.0.0

Published

Generate Open Graph images using AI. Describe what you want or pass a title/description, get a 1200x630 OG image.

Readme

ai-og-image

Generate Open Graph images using AI. Pass a title, get a beautiful 1200x630 OG image.

Quick Start

npx ai-og-image "My Blog Post Title"

That's it. Zero install, one command, done.

How It Works

  1. You provide a title (and optionally a description, style, brand color)
  2. If you have an ANTHROPIC_API_KEY, Claude generates a custom HTML/CSS design
  3. If not, it uses built-in style templates (still looks great)
  4. Puppeteer renders the HTML to a high-res PNG

Install

npm install -g ai-og-image

Or just use npx without installing.

Usage

# Simple - just a title
ai-og-image "Getting Started with TypeScript"

# With description
ai-og-image --title "My Post" --description "A deep dive into modern web dev"

# Pick a style
ai-og-image "My Post" --style dark

# Custom brand color
ai-og-image "My Post" --brand-color "#FF6B00"

# Custom output path and size
ai-og-image "My Post" --output hero.png --size 1200x630

# Skip AI, use built-in templates only
ai-og-image "My Post" --no-ai

Styles

  • gradient (default) - Rich gradient background, white text, modern
  • minimal - White background, dark text, subtle accent border
  • bold - Solid color background, large impactful text
  • dark - Dark background with subtle gradients, techy feel

Batch Mode

Generate OG images for your entire site at once.

# From a sitemap
ai-og-image --from sitemap.xml --output-dir ./og-images

# From a JSON file
ai-og-image --from pages.json --style minimal

Your pages.json should look like:

[
  { "title": "Home", "description": "Welcome to my site" },
  { "title": "About", "description": "Learn more about us" }
]

Programmatic API

import { generateHtml, renderHtmlToPng } from 'ai-og-image';

const html = await generateHtml({
  title: 'My Post',
  description: 'A great post',
  style: 'gradient',
  brandColor: '#FF6B00',
});

await renderHtmlToPng(html, 'og.png', 1200, 630);

Environment Variables

  • ANTHROPIC_API_KEY - Enables AI-powered design generation. Without it, the tool uses built-in templates that still look good.

License

MIT