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

@mbsi/mkcmd

v0.3.1

Published

A CLI tool for scaffolding new CLI projects with sensible defaults. Create command-line tools with TypeScript, Bun runtime, and a solid core structure out of the box.

Readme

mkcmd

A CLI tool for scaffolding new CLI projects with sensible defaults. Create command-line tools with TypeScript, Bun runtime, and a solid core structure out of the box.

Features

  • Interactive Setup - Prompts for project name, location, and description
  • Complete CLI Framework - Generates a working CLI with command registration, logging, and helpers
  • TypeScript + Bun - Pre-configured with TypeScript and Bun runtime support
  • Core Utilities - Includes FileBuilder for dynamic code generation and file utilities
  • Extensible - Easy to add your own commands

[!WARNING] While you can run the program in without Bun, the source code itself depends on Bun for development and building

Run remotely

npx @mbsi/mkcmd init
# or
bun @mbsi/mkcmd init

Installation

npm install -g @mbsi/mkcmd
# or
bun install -g @mbsi/mkcmd

Quick Start

mkcmd init

The init command will prompt you for:

  • Project name
  • Target directory (defaults to ./<project-name>)
  • Project description

What Gets Scaffolding

After running mkcmd init, you'll have a complete CLI project:

my-cli/
├── src/
│   ├── core/
│   │   ├── cli.ts              # CLI framework with command registration
│   │   ├── log.ts              # Logging helpers (single/multi info/warn/err, title)
│   │   └── helpers/
│   │       ├── file-builder.ts # Indentation-aware file builder
│   │       ├── file-utils.ts   # Path and file writing utilities
│   │       └── stringifier.ts  # Dynamic template code generation
│   ├── commands/
│   │   └── index.ts            # Command registration hook
│   └── config.ts               # Project configuration
├── package.json
├── tsconfig.json
└── README.md

Usage

Running Your New CLI

cd my-cli
bun install
bun run src/index.ts --help

Adding Commands

Commands are registered in src/commands/index.ts. Here's the pattern:

import { registerCommand } from "../core/cli";

registerCommand({
  name: "greet",
  description: "Say hello",
  instructions: "Pass a name to greet",
  run: async (args: string[]) => {
    const name = args[0] || "world";
    console.log(`Hello, ${name}!`);
  }
});

Then run:

bun run src/index.ts greet
bun run src/index.ts greet Alice

Using the File Builder

The included FileBuilder helps generate code files dynamically:

import { FileBuilder } from "./core/helpers/file-builder";

const fb = new FileBuilder();
fb.addLine("export function hello() {");
fb.addLine('  console.log("Hello!");', 1);
fb.addLine("}");
const code = fb.build();

CLI Flags

After installation, mkcmd supports:

mkcmd --help      # Show help
mkcmd --version   # Show version

Requirements

  • Bun runtime (for running the generated project)
  • Node.js 16+ (for installation via npm)

License

See LICENSE file for details.


Version: See npm info @mbsi/mkcmd version, npx @mbsi/mkcmd --version, or run mkcmd --version after installation.