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

yangonkit

v0.0.6

Published

YangonKit is a compiler plugin for CommandKit that introduce a whole new template to CommandKit.

Readme

YangonKit - CommandKit made simpler

YangonKit is a compiler framework for CommandKit that introduces Svelte-like runes (icons) for your Discord bots.

Getting started

Getting started with YangonKit is extremely easy.

Installation

Create a CommandKit bot and install yangonkit via the following command.

$ npm install --dev yangonkit

Configuration

Now, go into your commandkit.config.ts file and add YangonKit to the code.

import { defineConfig } from "commandkit/config";
import { yangonKit } from "yangonkit";

export default defineConfig({
    plugins: [
        yangonKit()
    ]
})

Creating an icon-powered Command

What are icons?

Icons are compiler flags that yangonkit exposes. It tells yangonkit that a particular piece of code is related to the compiler. Icons are always prefixed with a $ or labeled $: (similar to svelte's runes) and the contains no working code inside the function.

Let us make a command. We will use a say command as an example as it makes great use of the $param icon.

import { ChatInputCommandContext } from "commandkit";
import { ApplicationCommandOptionType } from "discord.js";

$: SlashCommand("Say something")
export default function say({ interaction }: ChatInputCommandContext) {
    const message = $param(ApplicationCommandOptionType.String, {
        description: "What would you like to say?",
        required: true
    });

    interaction.reply(message);
}

When YangonKit compiles this code, it transforms it into:

import { ChatInputCommandContext } from "commandkit";
import { ApplicationCommandOptionType } from "discord.js";

export const command = {
    name: "say",
    description: "Say something",
    options: [
        {
            type: ApplicationCommandOptionType.String,
            name: "message",
            description: "What would you like to say?",
            required: true
        }
    ]
}

function chatInput(context: ChatInputCommandContext) {
    const { interaction } = context;
    const __options = interaction.options;
    
    const message = __options.getString("message");

    interaction.reply(message);
}

Available Icons

$: SlashCommand(description, options?)

Creates a chat input (slash) command. The function immediately following this icon becomes the command handler.

Parameters:

  • description (string, required): The command description shown in Discord
  • options (object, optional): Additional command options (extends CommandData minus name, description, and options)

Example:

$: SlashCommand("Greets a user")
export default function greet({ interaction }: ChatInputCommandContext) {
    interaction.reply("Hello!");
}

$param(type, options)

Declares a command option/parameter. Must be used inside a $: SlashCommand() function body.

Parameters:

  • type (ApplicationCommandOptionType): The option type
  • options (object): Option configuration (name is inferred from variable name)

bonus: $param is completely type-safe!

Example:

$: SlashCommand("Add two numbers")
export default function add({ interaction }: ChatInputCommandContext) {
    const firstNumber = $param(ApplicationCommandOptionType.Integer, {
        description: "First number",
        required: true
    });

    const secondNumber = $param(ApplicationCommandOptionType.Integer, {
        description: "Second number",
        required: true
    });

    const result = firstNumber + secondNumber;
    interaction.reply(`Result: ${result}`);
}

Auto complete:

when using ApplicationCommandOptionType.String on $param, we can integrate autocomplete directly inside the declaration.

$: SlashCommand("Get information about pets")
export default async function pets({ interaction }: ChatInputCommandContext) {
    const pet = $param(ApplicationCommandOptionType.String, {
        description: "What pet to say",
        required: true,
        autocomplete: async (autocompleteContext) => {
            // handle your auto complete here
            return []; // use the return statement to let yangonkit handle sending to the Discord API or manually respond via autocompleteContext.interaction.respond()
        }
    })

    // do something with `pet`
}

[!IMPORTANT]
Under NO circumstances, the variables that you have declared outside the autocomplete scope is usable. The autocomplete handler get's isolated at runtime and uses its own scope.

Option Types

YangonKit supports all Discord.js ApplicationCommandOptionType options:

  • String - Text input
  • Integer - Whole number
  • Number - Decimal number
  • Boolean - True/false toggle
  • User - Discord user
  • Role - Discord role
  • Channel - Discord channel
  • Mentionable - User or role
  • Attachment - File attachment
  • Subcommand - Nested command
  • SubcommandGroup - Group of subcommands

File Structure

Place your icon-powered commands in the src/app/commands/ directory:

src/
└── app/
    └── commands/
        ├── say.ts
        ├── ping.ts
        └── userinfo.ts