Toolverse
All skills

cli-builder

by joelhooks

Guide for building TypeScript CLIs with Bun. Use when creating command-line tools, adding subcommands to existing CLIs, or building developer tooling. Covers argument parsing, subcommand patterns, output formatting, and distribution.

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Author
joelhooks
Category
Backend
Views
23

About this skill

Guide for building TypeScript CLIs with Bun. Use when creating command-line tools, adding subcommands to existing CLIs, or building developer tooling. Covers argument parsing, subcommand patterns, output formatting, and distribution.

How to use

  1. Utwórz plik TypeScript dla swojego narzędzia (np. scripts/my-tool.ts) i dodaj shebang #!/usr/bin/env bun na początku, aby móc uruchamiać plik bezpośrednio z wiersza poleceń.

  2. Rozpocznij od najprostszej wersji: pobierz argumenty z process.argv.slice(2), sprawdź pierwszą wartość jako komendę i wyświetl pomoc, jeśli użytkownik poprosi o nią lub nie poda żadnej komendy.

  3. Aby obsługiwać flagi i opcje (np. -n, --verbose), użyj modułu parseArgs z Node'a (dostępny w Bun). Zdefiniuj opcje z ich typami, krótkimi aliasami i wartościami domyślnymi.

  4. Odczytaj wartości flag z obiektu values i argumenty pozycyjne z tablicy positionals zwróconej przez parseArgs. Użyj ich do sterowania zachowaniem narzędzia.

  5. Jeśli planujesz wiele komend, zastosuj wzorzec rejestru komend zamiast długiego łańcucha instrukcji warunkowych – ułatwi to rozszerzanie narzędzia.

  6. Uruchom narzędzie poleceniem bun scripts/my-tool.ts nazwa-komendy i testuj różne flagi oraz argumenty, aby upewnić się, że parsowanie i logika działają poprawnie.

Related skills

fastapi-pro

by sickn33

Build high-performance async APIs with FastAPI, SQLAlchemy 2.0, and Pydantic V2. Master microservices, WebSockets, and modern Python async patterns. Use PROACTIVELY for FastAPI development, async optimization, or API architecture.

Backend
54128

gog

by openclaw

Google Workspace CLI for Gmail, Calendar, Drive, Contacts, Sheets, and Docs.

Backend
34126

supabase-operations

by elevanaltd

Supabase operational knowledge for migrations, RLS optimization, MCP tool benchmarks, and ADR-003 compliance. Use when validating database migrations, optimizing Row-Level Security policies, checking MCP tool performance, or ensuring Supabase operational standards. Triggers on:

Backend
27109

postgresql-psql

by timelessco

Comprehensive guide for PostgreSQL psql - the interactive terminal client for PostgreSQL. Use when connecting to PostgreSQL databases, executing queries, managing databases/tables, configuring connection options, formatting output, writing scripts, managing transactions, and

Backend
34173

travel-planner

by ailabs-393

This skill should be used whenever users need help planning trips, creating travel itineraries, managing travel budgets, or seeking destination advice. On first use, collects comprehensive travel preferences including budget level, travel style, interests, and dietary

Backend
4379

architecture-decision-records

by wshobson

Write and maintain Architecture Decision Records (ADRs) following best practices for technical decision documentation. Use when documenting significant technical decisions, reviewing past architectural choices, or establishing decision processes.

Backend
29130