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

molvis-plugin

v0.2.0

Published

CLI to scaffold MolVis page plugins — npx molvis-plugin create

Readme

molvis-plugin

Scaffold a MolVis page plugin.

npx molvis-plugin create
npx molvis-plugin create my-plugin
npx molvis-plugin create my-plugin --id com.acme.demo --name "Acme Demo" -y

This repo is a CLI, not a plugin you fork. It used to be a template-repository you cloned and edited in place; everything that made it one — a demo plugin under src/, a vendored copy of the host contract, a shadcn kit, a build config — was deleted once @molcrafts/molvis-plugin started shipping those. The only artifact here is template/, and the CLI's job is to fill it in.

UX stack is the same family as create-rsbuild (@clack/prompts + minimist). Rspack is only the build engine inside generated projects — not the CLI.

What you get

my-plugin/
  molvis.plugin.json          # id, name, version, host floor, entry
  rsbuild.config.ts           # externals come from the SDK, not a local list
  tsconfig.json
  .github/workflows/release.yml   # tag v* → build + flat assets on a Release
  src/
    index.tsx                 # activate() → the domain registrations below
    modifiers/scale-x/        # pipeline modifier + its property panel
    analysis/atom-count/      # analysis contribution
    commands/hello/           # palette command
    settings/about/           # settings section
    modes/README.md           # how to add an interaction mode
    overlays/README.md        # how to add a scene overlay

One example per extension point, and no more. modes/ and overlays/ ship as prose rather than code because a meaningful example of either needs a real pointer lifecycle or Babylon meshes, which would be more scaffold than demonstration.

Then:

cd my-plugin
npm install
npm run build      # → dist/plugin.js

Dependencies default to the published 0.2.0 range (@molcrafts/molvis-plugin, plus the engines as peers). If a MolVis checkout sits next to the new project (../molvis), the scaffolder pins file: paths instead so you can hack the host and the plugin together.

Public SDK

import { MolvisPlugin, type PluginAPI } from "@molcrafts/molvis-plugin";
import { Button } from "@molcrafts/molvis-plugin/ui";

Never import monorepo page/ paths.

Take build externals from the SDK rather than retyping them — a plugin that bundles a host module gets a second React or a second WASM instance:

import { pluginExternals } from "@molcrafts/molvis-plugin/externals";

Install the plugin in MolVis

Settings → Pluginsowner/repo or owner/repo[@v1.2.3].

Developing the CLI

npm test           # node --test, no framework

The substitution rules live in lib/scaffold.mjs, kept free of prompts so they can be tested directly; lib/create.mjs is the interactive shell around them. CI scaffolds a project with no sibling MolVis checkout and runs the generated project's own typecheck and build against published @molcrafts/molvis-plugin@^0.2.0 — the shipped artifact is template/, so that is what has to be gated.