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-strafebot

v1.3.0

Published

CLI to scaffold a Strafe bot project and commands

Readme


Overview

create-strafebot is an interactive command-line tool that helps you:

  1. Scaffold a complete TypeScript Strafe Chat bot project with pre-configured environment files, scripts, and starter commands.
  2. Generate new typed command modules (src/commands/<name>.ts) inside an existing bot project with optional moderator (--mod) or administrator (--admin) permission guards.

1. Scaffolding a New Bot Project

Run the interactive wizard with npm, npx, pnpm, or bun:

npm create strafebot@latest my-bot
# or
npx create-strafebot my-bot

Interactive Prompts

  1. Project folder: Target directory name (default: my-strafe-bot).
  2. Bot token: Optional token written directly into .env (BOT_TOKEN).
  3. Command prefix: Default command prefix (default: !).
  4. Owner user IDs: Comma-separated Snowflake IDs for botOwnerOnly commands.
  5. Template selection:
    • 1) Full Command Bot: Includes CommandHandler, src/commands/ping.ts, and src/commands/kick.ts.
    • 2) Minimal Event Bot: Lightweight messageCreate listener setup without command files.

Generated Directory Structure

my-bot/
├── .env                  # Local environment secrets (gitignored)
├── .env.example          # Safe template for version control
├── .gitignore
├── package.json          # Scripts: dev (tsx watch), build (tsc), start
├── tsconfig.json         # Strict ES2022 + NodeNext TypeScript config
└── src/
    ├── index.ts          # Client setup, event logging, and command registration
    └── commands/
        ├── ping.ts       # Basic latency check command
        └── kick.ts       # Moderation command example

Running Your New Bot

cd my-bot
npm run dev

2. Generating Command Files (command / cmd / g)

From the root of an existing bot project, generate a new command module in src/commands/<name>.ts:

# Generate a standard user command (SendMessages)
npx create-strafebot command userinfo

# Generate a moderator command (KickMembers, ManageMessages + guildOnly)
npx create-strafebot command warn --mod

# Generate an administrator command (Administrator, BanMembers + guildOnly)
npx create-strafebot command purge --admin

Then import and register the generated command in src/index.ts:

import { warnCommand } from './commands/warn.js';

client.commands.register(warnCommand);

Links

License

Apache-2.0