cli-builder

Scaffold TypeScript CLIs with Bun using command registry patterns.

Updated Jan 14, 2026
One-click install
npx skills add https://github.com/primeinc/swarm --skill cli-builder-primeinc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-builder
Source: https://github.com/primeinc/swarm/tree/main/packages/opencode-swarm-plugin/global-skills/cli-builder
Command: npx skills add https://github.com/primeinc/swarm --skill cli-builder-primeinc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers often struggle to architect robust command-line interfaces that scale with multiple commands and consistent argument handling. This Skill provides practical patterns, scaffolding, and examples to build TypeScript CLIs powered by Bun.

Core Features & Use Cases

  • Argument parsing patterns and robust command registries
  • Subcommand orchestration, help output, and consistent UX
  • Distribution-ready tooling, packaging, and minimal project setup

Quick Start

Install Bun, create a minimal CLI, and run it with a single command:

  • Create a file scripts/my-cli.ts with a shebang and a simple command switch
  • Make it executable: chmod +x scripts/my-cli.ts
  • Run: bun scripts/my-cli.ts hello

Frequently Asked Questions about cli-builder

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a TypeScript CLI with Bun that scales across multiple subcommands?

You can build a scalable TypeScript CLI with Bun by enforcing a command registry pattern for subcommand orchestration, consistent argument parsing, and uniform output formatting to maintain a reliable user experience across commands.

What's the best way to structure a Bun-based CLI project for distribution?

The best way to structure a Bun-based CLI for distribution is to apply distribution-ready tooling and packaging workflows, utilizing a minimal project setup with executable shebang scripts to ensure the TypeScript CLI is deployment-ready.

Do I need Bun to run TypeScript CLI scripts, or can I use Node?

You need Bun to run these TypeScript CLI scripts. The Skill enforces Bun-based execution to provide its scaffolding, argument parsing, and command registry patterns specifically optimized for the Bun runtime environment.

How does a command registry pattern work for CLI argument parsing in TypeScript?

A command registry pattern works by mapping subcommands to specific handlers for centralized orchestration, ensuring consistent argument parsing, automated help output generation, and a uniform user experience across all TypeScript CLI commands.

Can I create an executable TypeScript CLI with a single file using Bun?

Yes, you can create an executable TypeScript CLI with a single file using Bun. Add a shebang to your script, make it executable with `chmod +x`, and run it directly using Bun's runtime to handle command switching.

Related Skills