cli-builder

Scaffold TypeScript CLIs with Bun, argument parsing, and subcommands.

1|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/sarfraznawaz2005/my_opencode_agent --skill cli-builder-sarfraznawaz2005
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-builder
Source: https://github.com/sarfraznawaz2005/my_opencode_agent/tree/main/skill/cli-builder
Command: npx skills add https://github.com/sarfraznawaz2005/my_opencode_agent --skill cli-builder-sarfraznawaz2005

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers rapidly scaffold and maintain TypeScript CLIs using Bun, reducing boilerplate and enabling consistent command patterns.

Core Features & Use Cases

  • Command and subcommand patterns for scalable CLIs with a registry
  • Argument parsing and validation with built-in helpers and examples
  • Distribution readiness including packaging and cross-platform execution
  • Use Case: Build a dev utility with commands like init, build, and deploy to automate local workflows.

Quick Start

Create a minimal Bun-based CLI by registering commands, adding a hello command, and executing bun scripts/my-tool.ts hello to verify output. Run with --help to see how commands are documented and wired.

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?

To build a TypeScript CLI with Bun, you can scaffold single-command or multi-command patterns using a command registry. This approach reduces boilerplate and provides consistent command structures for local workflow automation.

How do I structure subcommands and argument parsing for a Bun CLI?

Subcommands and argument parsing for a Bun CLI are structured using a scalable command registry with built-in helpers. This pattern validates arguments and documents commands automatically when executed with flags like --help.

What is the best way to distribute a Bun-powered CLI for cross-platform usage?

The best way to distribute a Bun-powered CLI for cross-platform usage is to package it with distribution readiness in mind. This ensures consistent execution across different environments without altering the underlying TypeScript codebase.

Does this approach support both single-command and multi-command CLI patterns?

Yes, this approach supports both single-command and multi-command CLI patterns. You can start with a minimal command and scale to a multi-command registry with subcommands for tasks like init, build, and deploy.

Can I automate local dev workflows using a TypeScript CLI?

Yes, you can automate local dev workflows using a TypeScript CLI by registering specific utility commands. For example, you can create commands like init, build, and deploy to streamline and execute local development tasks efficiently.