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

popii-framework

v0.7.1-beta.5

Published

A convention-first Discord bot framework

Readme


Popii lets you build Discord bots the way modern web frameworks handle routing — drop a file, get a command. No boilerplate, no manual registration, no restarts during development.

// src/commands/ping.ts
import { command } from "popii-framework";

export default command({
  name: "ping",
  description: "Replies with pong!",
  slash: true,
  async do(pop) {
    await pop.reply(`Pong! ${pop.client.discord.ws.ping}ms`);
  }
});

That's it. Popii finds the file, registers the slash command, and hot-reloads it on save.


Features

  • Folder-based routingsrc/commands/config/set.ts becomes /config set automatically
  • Hot-module replacement — edit commands, events, and middleware without disconnecting from Discord
  • Plugin system — extend the pop context with new methods and properties
  • Plugin marketplace — install community plugins with popii add <name>
  • Built-in plugins — SQLite, voice, AI, economy, web dashboard, and more out of the box
  • Middleware — Express-style middleware pipeline for commands and events
  • Sharding — first-class multi-shard support via PopiiShardingManager
  • Type-safe — full TypeScript support with augmentable context types

Getting Started

bunx popii init

The setup wizard scaffolds a new project with your chosen plugins, folder structure, and .env in seconds. Open your browser, pick your plugins, paste your token, done.

cd my-bot
bun run dev

Your bot is live with HMR enabled. Save any file and changes apply instantly.


CLI Reference

| Command | Description | |---------|-------------| | popii init | Scaffold a new bot project | | popii dev | Start the dev server with HMR | | popii sync | Manually sync slash commands to Discord | | popii add <name> | Install a plugin from the marketplace | | popii remove <name> | Uninstall a plugin | | popii search <query> | Search the plugin marketplace | | popii list | List installed plugins | | popii g <type> <name> | Generate a command, event, snap, middleware, task, or test | | popii doctor | Check your environment for common issues | | popii deploy | Generate deployment config for Railway, Fly.io, or VPS | | popii migrate <create\|up> | Run SQLite migrations | | popii console | Start an interactive REPL with the bot in scope | | popii dashboard | Print web dashboard setup instructions |


Built-in Plugins

| Plugin | Description | |--------|-------------| | sqlitePlugin | Bun SQLite database injected into every pop context | | mongoosePlugin | MongoDB via Mongoose ODM | | voicePlugin | Voice channel playback with queue, SponsorBlock, and now-playing cards | | webPlugin | HTTP server with health checks, metrics, and an optional web dashboard | | deskPlugin | Full support ticket system | | popiiAiPlugin | AI assistant via OpenAI, Gemini, or Anthropic | | economyPlugin | Virtual currency, inventory, and shop system | | uiPlugin | Pagination, forms, and interactive prompts | | payPlugin | Payment processing | | autoModPlugin | Automated moderation | | giveawayPlugin | Giveaway system | | canvasPlugin | Image generation and now-playing cards | | lastFmPlugin | Last.fm scrobbling and now-playing integration | | captchaPlugin | Verification captchas | | activityRotatorPlugin | Rotating bot status messages | | telemetryPlugin | Performance monitoring | | commandLoggerPlugin | Command execution logging | | commandAnalyticPlugin | Usage analytics | | permissionGuardPlugin | Automatic permission enforcement | | errorHandlerPlugin | Graceful error handling | | reloadPlugin | Adds a /reload slash command |


Plugin Marketplace

Install community plugins directly from the CLI:

bunx popii add economy        # installs popii-plugin-economy
bunx popii search music       # search the registry
bunx popii list               # show installed plugins

Plugins are discovered automatically on startup when autoDiscover: true is set:

const client = popiiClient({
  token: process.env.DISCORD_TOKEN!,
  autoDiscover: true,
  pluginConfig: {
    "popii-plugin-economy": { currencySymbol: "🪙" }
  }
});

Want to build a plugin? Use the plugin template to get started.


Requirements

  • Bun ≥ 1.1.0
  • discord.js ^14.0.0 (peer dependency, installed automatically by popii init)

Optional peer dependencies installed as needed:

  • ioredis — for Redis-backed storage and multi-shard coordination
  • @discordjs/voice + libsodium-wrappers — for the voice plugin

License

MIT