Theme
Use presets for fast defaults or override only the parts you want.
The theme system is shallow to use and deep enough to be practical. Use a
preset name when you want a fast default. Use a theme object when you only
need to override a few colors or symbols.
Presets
These are the built-in presets.
export const cli = createCLI(() => ({
description: "default theme",
theme: "default",
}));export const cli = createCLI(() => ({
description: "basic theme",
theme: "basic",
}));export const cli = createCLI(() => ({
description: "rounded theme",
theme: "rounded",
}));default: square corners,│rail, spacing1basic: no corners, no rail, spacing0, cyan cursor and active staterounded:╭and╰corners, pipe rail, spacing1
Preset previews
These examples show the overall layout difference, not the full color treatment.
┌ project setup
│
│ ✓ Project: my-app
│
└ Done. project setup
✓ Project: my-app
Done.╭ project setup
│
│ ✓ Project: my-app
│
╰ Done.Theme overrides
Use ThemeOverride when you want to change only a few fields.
export const cli = createCLI((b) => ({
description: "themed tool",
theme: {
active: "cyan",
success: "green",
symbols: {
cursor: "❯",
success: "✔",
},
spacing: 0,
},
prompts: {
project: b.text().label("Project"),
},
}));Prop
Type
Per-prompt color
Use .color() when you want one prompt label to stand out without changing the
rest of the theme.
export const cli = createCLI((b) => ({
description: "prompt colors",
prompts: {
project: b.text().label("Project").color("cyan"),
owner: b.text().label("Owner").color("yellow"),
},
}));These are the accepted color names.
Prop
Type
Presets are only shortcuts. Internally, they resolve to the same
ThemeOverride shape you can pass manually.