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

create-hr-plugin

v0.4.4

Published

Scaffold a HomeRunner widget plugin (vm.Script SSR + IIFE client) on @homerunner-next/widget-core

Readme

create-hr-plugin

Scaffold a HomeRunner widget plugin in seconds. Produces a working project (vm.Script SSR + IIFE client) wired against @homerunner-next/widget-core — the same SDK that backs first-party HomeRunner widgets.

Usage

npx create-hr-plugin my-widget

Then:

cd my-widget
npm run dev          # http://localhost:3001 — live-reload dev preview
npm run build        # produces dist/ + manifest.json (path-only asset URLs)

Options

npx create-hr-plugin <plugin-slug> [options]

| Option | Default | Notes | | --- | --- | --- | | --author <name> | git config user.name | Author baked into package.json and manifest.json | | --no-install | (off) | Skip npm install — useful in CI / sandboxes | | --help, -h | | Print usage |

The slug becomes the plugin id, the manifest widgetType, and the data attribute the IIFE binds against (data-hr-widget="plugin:<slug>").

What you get

my-widget/
├── manifest.json          # Plugin manifest (register with HomeRunner)
├── package.json
├── vite.config.ts         # viteHomerunnerWidget({ slug }) — externals, manifest, /w/ proxy
├── index.html             # Dev preview shell
├── serve.js               # Production-style preview (npm run preview)
├── scripts/
│   └── inject-schema.mjs  # Pre-build: zod → JSON Schema into manifest.json
└── src/
    ├── index.tsx          # Client IIFE — registerPlugin() + mount()
    ├── widget.tsx         # Your React component + getInitialData()
    ├── ssr.ts             # dehydrateState + getStaticAssets (loaded server-side via vm.Script)
    ├── ssr-entry.ts       # SSR UMD entry barrel
    ├── config.ts          # widgetSchema.extend() + zodToManifestSchema()
    ├── widget.css
    └── components/ui/     # shadcn-style UI (Dialog with elevateDom, Button, Tooltip,
                           # Carousel, WidgetSection, WebFont, ClientOnly, ResponsiveDialogContent)

The UI components live in your plugin source — they're shadcn-style (you own them, edit / restyle / replace freely). Runtime hooks (useTopLevelPortal, usePortalContainer, useShadowHost) come from @homerunner-next/widget-core/runtime and shared utils (WidgetProvider, useWidget, useTranslation, useLocaleDetection, getProxiedImageUrl, getFeedQuery, getWidgetQuery) come from @homerunner-next/widget-core/utils — both are re-exported through src/components/ui/index.ts so you only have one import path.

Registering with HomeRunner

  1. Host your built dist/ + manifest.json on a CDN, Vercel, or any static host.
  2. Register via the HomeRunner dashboard or:
    POST /api/v3/plugins
    { "manifest_url": "https://your-host/manifest.json" }

manifest.json ships path-only URLs (e.g. dist/<slug>.iife.js). HomeRunner resolves them against the origin of your manifest_url, so the same build works on any host.

SDK reference

See @homerunner-next/widget-core for the full SDK surface — subpath exports for runtime, utils, schema, plugin-schema, vite, urls, globals, manifest, contracts.

License

MIT