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-risu-plugin

v3.1.0

Published

CLI tool to scaffold Risuai API v3 TypeScript plugin projects with Vite, vanilla, and Svelte templates

Readme

create-risu-plugin

Create a TypeScript Risuai API v3 plugin scaffold for vanilla DOM or Svelte. The generated project uses Vite, renders inside the plugin iframe, and stores plugin data through risuai.pluginStorage.

What You Get

  • TypeScript-only templates for vanilla and Svelte.
  • Risuai API v3 metadata, including //@api 3.0 in the built plugin file.
  • Iframe-local settings UI opened with risuai.showContainer and closed with risuai.hideContainer.
  • Scoped storage helpers built on pluginStorage.
  • Read-only current character and chat context helpers.
  • Vite watch and build scripts for manual Risuai import and file-based hot reload.

Quick Start

npx create-risu-plugin
cd my-plugin
npm run dev

The CLI asks for a project name, description, package-name check, and framework. Framework choices are vanilla and svelte. TypeScript is always used.

Non-interactive mode

Pass the project name as a positional argument to skip all prompts (used by tools such as risuai-workbench):

npx create-risu-plugin my-plugin --framework svelte --description "My plugin" --out ./my-plugin --skip-install

| Flag | Default | Description | | --- | --- | --- | | --framework | vanilla | vanilla or svelte | | --description | <Name> for RISU AI | package.json description | | --out | ./<name> | output directory (must not exist) | | --skip-install | off | skip npm install after scaffolding |

The name must be kebab-case (my-risu-plugin). On success the last stdout line is created: <absolute path>. Exit code is non-zero on failure.

Risuai v3 Development Flow

  1. Run npm run dev to start Vite watch mode, or run npm run build for a one-time build.
  2. Open Risuai v3 plugin import or file-based hot reload.
  3. Select the built dist/<plugin-name>.js file.
  4. In Risuai, click the generated action button. If the button location is hidden by your layout, open the generated settings entry as a fallback.
  5. Confirm the iframe-local panel opens, the open count updates, and the current character or chat context appears when available.

The generated project doesn't run a separate development server. Risuai reads the built JavaScript file you select.

Generated Project Shape

my-plugin/
├── dist/
│   └── my-plugin.js
├── src/
│   ├── main.ts
│   ├── App.svelte or ui/panel.ts
│   ├── constants/
│   │   └── plugin.ts
│   ├── helpers/
│   │   ├── chat-context.ts
│   │   └── plugin-storage.ts
│   └── types/risuai.d.ts
├── package.json
├── tsconfig.json
├── vite.config.ts
└── README.md

Commands

npm run dev       # build dist/<plugin-name>.js in watch mode
npm run build     # build once for manual import
npm run typecheck # check TypeScript

Template Notes

Vanilla

The vanilla template registers a visible action button with registerButton, keeps a settings entry as a fallback, opens the Risuai plugin iframe, and renders a small DOM panel into the iframe document.

Svelte

The Svelte template registers the same visible action button and settings fallback, mounts App.svelte after either entry opens, then unmounts it when Risuai unloads the plugin.

Optional Update URL

The default build omits //@update-url. If you publish a stable JavaScript file and want Risuai to know where it lives, add the metadata line in vite.config.ts yourself:

//@update-url https://example.com/my-plugin.js

Treat this as an advanced publishing choice. It isn't needed for local file import or file-based hot reload.

Links