bun-cli

Implement Bun CLI argument parsing, subcommands, and dual Markdown/JSON outputs.

2|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/nathanvale/side-quest-marketplace --skill bun-cli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bun-cli
Source: https://github.com/nathanvale/side-quest-marketplace/tree/main/plugins/dev-toolkit/skills/bun-cli
Command: npx skills add https://github.com/nathanvale/side-quest-marketplace --skill bun-cli

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a structured approach to building production-grade CLI tools with Bun. It covers argument parsing patterns, dual output formats (Markdown for humans and JSON for machines), error handling, subcommand design, and testing practices. Use when you want fast, predictable CLIs with strong UX and measurable quality.

Core Features & Use Cases

  • Argument parsing: Handles --flag value, --flag=value, and boolean flags with consistent semantics.
  • Output formats: Supports Markdown (human-readable) and JSON (machine-consumable) outputs.
  • Error handling & commands: Clear error messages, usage patterns, and support for subcommands.
  • Reference patterns: Includes patterns and references to guide CLI design, testing, and quality checks.

Quick Start

Create a minimal Bun CLI template and run simple commands to verify behavior:

  • bun run src/cli.ts config --format json
  • bun run src/cli.ts help

Frequently Asked Questions about bun-cli

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

FAQPage Schema
How do I parse command-line arguments in Bun with flags and values?

Bun CLI patterns handle argument parsing for --flag value, --flag=value, and boolean flags with consistent semantics. This Skill provides reference implementations covering these formats, subcommands, and error handling to build production-grade CLIs quickly.

Can I output both markdown and JSON from the same Bun CLI tool?

Yes, dual output formats are a core feature. The Skill includes patterns for generating markdown for human-readable output and JSON for machine consumption, letting you serve both audiences from one command.

What's the best way to structure subcommands and usage text in a Bun CLI?

This Skill provides reference patterns for command dispatch, explicit usage documentation, and clear error messages. It covers subcommand design alongside testing practices to ensure maintainable, well-documented CLIs.

How do I test a Bun CLI tool to ensure argument parsing works correctly?

Comprehensive testing patterns are included for validating argument parsing, output formats, and error handling. The Skill demonstrates testing practices that maintain quality across CLI behavior.

Do I need special setup to build a production-grade CLI with Bun?

This Skill eliminates guesswork by providing tested reference implementations for all production requirements: argument parsing, dual output formats, error handling, subcommands, and quality checks—ready to apply to your project.

Can I use these CLI patterns for Bun plugin development and Git workflows?

Yes, the Skill includes integration patterns for plugin development and Git workflows, covering dry-run, auto-commit, and cross-project tooling references to ensure consistency across Bun-based tools.