Skip to main content
⚡ Built for Bun

Build CLIs withconfidence

Bunli is a minimal, type-safe CLI framework for Bun. Build production-ready command-line tools with advanced plugins, beautiful terminal UIs, and compile to standalone binaries.

Type-safe
Plugin system
Beautiful UIs
cli.ts

Quick start

Get up and running with Bunli in minutes

1

Install Bunli

Install the Bunli CLI globally using Bun’s package manager.
bun add -g bunli
Bunli requires Bun 1.0.0 or later. Make sure you have Bun installed before continuing.
2

Create a new CLI project

Use the create-bunli scaffolding tool to generate a new project with a complete setup.
bunx create-bunli my-cli
cd my-cli
This creates a new directory with a complete CLI project structure, including TypeScript configuration, package.json, and example commands.
3

Start development mode

Launch the development server with hot-reload enabled for rapid iteration.
bunli dev
The dev server watches your source files and automatically reloads when you make changes. Try editing a command file to see live updates.
4

Build your CLI

When you’re ready, compile your CLI to a standalone binary for distribution.
bunli build
This creates optimized binaries for your target platforms in the dist/ directory. Your CLI is now ready to ship!

Why Bunli?

Everything you need to build world-class CLIs

Type-safe by design

Define commands with full TypeScript type inference. Zod-powered validation ensures your arguments are always correct.

Advanced plugin system

Extend your CLI with a powerful plugin architecture. Access typed stores, lifecycle hooks, and shared state.

Beautiful terminal UIs

Build interactive interfaces with OpenTUI-backed React components. Spinners, prompts, tables, and more.

Compile to binaries

Ship standalone executables with Bun’s compiler. No runtime dependencies, just native performance.

Hot-reload dev mode

Iterate faster with instant reload on file changes. See your updates in real-time without restarting.

Shell completions

Generate completions for bash, zsh, and fish automatically. Professional CLI experience out of the box.

Ready to build?

Start building production-ready CLIs with Bunli today. Join developers who are shipping better command-line tools.