Skip to main content
The Bunli CLI is a comprehensive toolchain for developing, building, testing, and releasing CLI applications built with the Bunli framework. It provides a complete development workflow from scaffolding new projects to publishing production-ready binaries.

Installation

Install the Bunli CLI globally using Bun:
bun install -g bunli
Or use it directly with bunx:
bunx bunli --help

Available Commands

The Bunli CLI provides the following commands:
CommandAliasDescription
bunli devdRun your CLI in development mode with hot reload
bunli buildbBuild your CLI for production
bunli testtRun tests for your CLI
bunli generategenGenerate command type definitions
bunli releaserCreate a release of your CLI
bunli initiInitialize a new Bunli CLI project
bunli doctor-Run diagnostics for Bunli projects

Global Options

All Bunli commands support the following global options:
  • --help, -h - Show help for a command
  • --version, -v - Show version information

Usage Examples

Quick Start

Create a new Bunli project:
bunli init my-cli
cd my-cli

Development Workflow

Start development mode with hot reload:
bunli dev
Run tests:
bunli test
Build for production:
bunli build

Production Release

Create and publish a release:
bunli release --version patch

Command Reference

For detailed information about each command, see the following pages:

Configuration

The Bunli CLI can be configured using a bunli.config.ts file in your project root:
import { defineConfig } from 'bunli'

export default defineConfig({
  commands: {
    entry: './src/cli.ts',
    directory: './src/commands'
  },
  build: {
    entry: './src/cli.ts',
    outdir: './dist',
    minify: true,
    targets: ['all']
  },
  dev: {
    watch: true
  },
  test: {
    pattern: '**/*.test.ts',
    coverage: false
  },
  release: {
    npm: true,
    github: true,
    tagFormat: 'v{{version}}',
    conventionalCommits: true
  }
})

Package Information

The Bunli CLI is published as the bunli package:

Source Code

The CLI implementation can be found at:
packages/cli/src/
├── cli.ts              # CLI entry point
├── commands/           # Command implementations
│   ├── build.ts
│   ├── dev.ts
│   ├── test.ts
│   ├── generate.ts
│   ├── release.ts
│   ├── init.ts
│   └── doctor.ts
└── utils/             # CLI utilities

Next Steps

Build docs developers (and LLMs) love