What problem does it solve?
This skill removes friction from creating and maintaining robust, type-safe command-line interfaces with Bun by consolidating command definition patterns, validation, plugin workflows, and interactive UI guidance.
Core Features & Use Cases
- Command and option definitions: Patterns for defineCommand, option, nested groups, aliases, and handler contexts for predictable CLI behavior.
- Type safety and validation: Best practices for Zod-based schemas and generated types to ensure compile-time safety for flags and positional arguments.
- Plugin architecture and lifecycle: Guidance on creating, composing, and using plugins with setup, beforeCommand, and afterCommand hooks and shared stores.
- Interactive workflows and TUI components: Prompt and spinner runtime APIs, form-driven TUI components, and OpenTUI integration for richer render flows.
- Project scaffolding and release tooling: Instructions for initializing projects, development hot-reload, building, testing, generating types, and releasing packages.
- Use Case: Scaffold a new CLI, register typed commands with prompts and TUI forms, validate inputs with Zod, and publish a production-ready executable.
Quick Start
Run the bunli init workflow to scaffold a new type-safe Bun CLI project and start defining commands, options, prompts, and TUI components.