CreateCLI

Generate Bun-based TypeScript CLI projects with strict typing and JSON output.

1|Updated Apr 16, 2026
One-click install
npx skills add https://github.com/davdunc/pai-framework --skill createcli-davdunc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: CreateCLI
Source: https://github.com/davdunc/pai-framework/tree/main/skills/CreateCLI
Command: npx skills add https://github.com/davdunc/pai-framework --skill createcli-davdunc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

CreateCLI eliminates the repetitive, error-prone work of hand-writing production-ready TypeScript command-line tools, including argument parsing, help text, configuration, and deterministic JSON output.

Core Features & Use Cases

  • 3-tier CLI generation: generates Tier 1 llcli-style (default), Tier 2 Commander.js (when complexity requires), and Tier 3 oclif as reference only.
  • Production-grade output: includes implementation plus package.json, strict tsconfig, env template, README, and QUICKSTART.
  • CLI-First Architecture: enforces deterministic behavior, composable JSON piping patterns, and exit-code compliance.
  • Workflows for evolution: CreateCli (from scratch), AddCommand (extend existing), UpgradeTier (migrate Tier 1 → 2).
  • Quality gates: type-safe throughout, comprehensive --help, JSON output intended for jq/grep, and consistent success/error exit codes.

Quick Start

Create a new TypeScript CLI by asking: "Generate a Bun + TypeScript CLI called md2html that converts input markdown to output HTML and returns deterministic JSON with clear errors."

Frequently Asked Questions about CreateCLI

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

FAQPage Schema
How do I generate a production-ready TypeScript CLI from scratch?

To generate a TypeScript CLI, provide your natural-language automation requirements. This creates a complete Bun-based project with strict typing, deterministic JSON output, environment variable configuration, and correct exit codes.

What is deterministic JSON output in a command-line tool?

Deterministic JSON output ensures your CLI emits consistent, structured data intended for piping to tools like jq or grep. This enforces composable workflows, predictable parsing, and clean separation between success messages and machine-readable results.

Can I use Commander.js for a multi-command TypeScript CLI with nested options?

Yes, Commander.js is supported as a Tier 2 generation option when your CLI complexity requires subcommands or nested options. Tier 1 covers simpler llcli-style tools, while Tier 3 provides oclif reference architectures for advanced use cases.

Does Bun work well for building fast TypeScript command-line tools?

Bun is the default runtime for generated TypeScript CLIs, providing fast execution and native TypeScript support. The output project includes a configured package.json and strict tsconfig tailored for the Bun environment.

How do I add a new subcommand to an existing Commander.js CLI?

You can extend an existing CLI by using the AddCommand workflow. This integrates new subcommands into your current project while maintaining strict typing, deterministic JSON output, and consistent help text patterns.

When should I upgrade my CLI from Tier 1 to Commander.js?

You should upgrade from Tier 1 to Commander.js when your tool requires complex subcommands or nested options. The UpgradeTier workflow migrates your llcli-style CLI to Tier 2, supporting advanced argument parsing and multi-command structures.