buster/apps/cli
Nate Kelley 55d873ee2d
Added better formatting for cli package and updated versions to match workspace
2025-09-05 11:39:43 -06:00
..
scripts Update CLI and SDK configurations for improved functionality 2025-08-27 23:59:47 -06:00
src Added better formatting for cli package and updated versions to match workspace 2025-09-05 11:39:43 -06:00
test-models migrate deploy to ts 2025-08-28 12:00:10 -06:00
.gitignore Refactor CLI to TypeScript and remove Rust components 2025-08-27 13:54:22 -06:00
CLAUDE.md claude md 2025-08-27 14:33:42 -06:00
README.md Refactor CLI to TypeScript and remove Rust components 2025-08-27 13:54:22 -06:00
biome.json udpate imports 2025-09-05 11:29:29 -06:00
buster.yml migrate deploy to ts 2025-08-28 12:00:10 -06:00
env.d.ts Refactor CLI to TypeScript and remove Rust components 2025-08-27 13:54:22 -06:00
package.json Added better formatting for cli package and updated versions to match workspace 2025-09-05 11:39:43 -06:00
tsconfig.json Added better formatting for cli package and updated versions to match workspace 2025-09-05 11:39:43 -06:00
turbo.json Update CLI and SDK configurations for improved functionality 2025-08-27 23:59:47 -06:00
vitest.config.ts Update CLI and SDK configurations for improved functionality 2025-08-27 23:59:47 -06:00

README.md

Buster CLI (TypeScript)

A modern TypeScript-based CLI built with Bun, Commander.js, and React Ink for interactive terminal UIs.

Quick Start - Local Testing

1. Install Dependencies

cd apps/cli
bun install

2. Run in Development Mode (with hot reload)

# Watch mode - automatically restarts on changes
bun run dev hello
bun run dev hello Claude --uppercase
bun run dev interactive

3. Build and Test the CLI

# Build the CLI
bun run build

# Test the built version
bun run start hello
bun run start interactive

4. Create Standalone Executable

# Build a standalone binary (no Bun required on target machine)
bun run build:standalone

# Test the standalone executable
./dist/buster hello
./dist/buster interactive

Available Commands

  • hello [name] - Simple greeting command

    • Options: -u, --uppercase - Output in uppercase
    • Example: bun run dev hello Claude --uppercase
  • interactive - Interactive menu demo using React Ink

    • Use arrow keys to navigate
    • Press Enter to select
    • Press Q or Escape to quit

Development Workflow

Hot Reload Development

# This watches for changes and auto-restarts
bun run --watch src/index.tsx hello

Direct Execution (fastest for development)

# Run directly with Bun
bun src/index.tsx hello
bun src/index.tsx interactive

Testing Different Build Outputs

# Test as Node.js script
bun run build
node dist/index.js hello

# Test as standalone executable
bun run build:standalone
./dist/buster hello

Project Structure

apps/cli/
├── src/
│   ├── index.tsx          # Entry point with Commander setup
│   ├── commands/          # Command implementations
│   │   ├── hello.tsx      # Basic command with Ink
│   │   └── interactive.tsx # Interactive UI demo
│   ├── components/        # Reusable Ink components
│   └── utils/            # Helper utilities
├── dist/                  # Build output
├── package.json
├── tsconfig.json
└── README.md

Technologies

  • Bun - JavaScript runtime and bundler
  • Commander.js - Command-line interface framework
  • React Ink - React for interactive terminal UIs
  • TypeScript - Type safety
  • Chalk - Terminal styling