| Crates.io | baobao |
| lib.rs | baobao |
| version | 0.5.0 |
| created_at | 2025-12-07 15:21:16.712792+00 |
| updated_at | 2025-12-24 15:35:17.632889+00 |
| description | Generate type-safe CLI applications from a simple TOML schema |
| homepage | https://github.com/roushou/bao |
| repository | https://github.com/roushou/bao |
| max_upload_size | |
| id | 1971772 |
| size | 98,260 |
Bao is a very opinionated tool to generate CLI applications in multiple programming languages from a single configuration file.
[!Note] Crates are published as
baobao*on crates.io instead ofbao*to avoid confusion with an already existing and unrelatedbaocrate.
| Crate | Description |
|---|---|
| baobao | CLI tool for generating CLI applications from TOML |
| baobao-core | Core utilities for Bao CLI generator |
| baobao-manifest | TOML manifest parsing and validation |
| baobao-codegen | Shared code generation utilities |
| baobao-codegen-rust | Rust code generator |
| baobao-codegen-typescript | TypeScript code generator |
cargo install baobao
Initialize a new project:
bao init myapp
# Select language interactively, or use: bao init myapp --language rust
This creates a complete project with a bao.toml manifest:
[cli]
name = "myapp"
version = "0.1.0"
[commands.hello]
description = "Say hello"
args = ["name"]
flags = ["uppercase"]
Edit bao.toml to add commands, then regenerate:
bao bake
| Command | Description |
|---|---|
bao init [name] |
Initialize a new CLI project |
bao bake |
Generate code from bao.toml |
bao add command <name> |
Add a new command |
bao remove command <name> |
Remove a command |
bao rename command <old> <new> |
Rename a command |
bao list |
List commands and context |
bao info |
Display project info and statistics |
bao check |
Validate bao.toml |
bao clean |
Remove orphaned generated files |
bao fmt |
Format bao.toml |
bao run |
Run the CLI (shortcut for cargo run --) |
bao completions <shell> |
Generate shell completions |
This project is licensed under the MIT LICENSE