Terminal workspace for chatting with Bonsai AI models locally.
BonsaiCLI is a terminal-based interface for interacting with Bonsai AI models. It provides a clean, keyboard-driven experience with four core surfaces: Chat for conversations, Setup for installation and health checks, Settings for configuration, and Commands for CLI entrypoints.
- Interactive TUI — Keyboard-driven terminal interface with streaming responses
- Multiple Surfaces — Chat, Setup, Settings, and Commands views
- Runtime Management — Automatic detection and installation of AI runtimes
- Model Catalog — Browse and install available Bonsai models
- Slash Commands — Quick actions via
/prefix commands - Persistent History — SQLite-backed conversation storage
- Go 1.23 or higher
- Linux or macOS (Windows support in progress)
- For GPU acceleration: NVIDIA CUDA, AMD ROCm, or Apple Metal
./build.sh./install.sh ./BonsaiCLIThe install script places BonsaiCLI in ~/.local/bin and attempts to update your shell PATH.
Note: The scripts provide actionable error messages for common issues: missing Go, missing binary, non-writable install path, or missing shell profile permissions.
# Open the chat interface
BonsaiCLI chat
# Open setup to install runtime and models
BonsaiCLI setup
# Check system health
BonsaiCLI doctorRunning BonsaiCLI without arguments opens the chat interface.
| Command | Description |
|---|---|
BonsaiCLI chat |
Open the chat interface |
BonsaiCLI setup |
Runtime installation and health |
BonsaiCLI settings |
Configure defaults |
BonsaiCLI doctor |
Print system diagnostics |
BonsaiCLI models |
List available models |
BonsaiCLI help |
Show help information |
Run the setup command to configure your environment:
BonsaiCLI setupThe setup view displays:
- Detected platform and architecture
- Runtime backend (
cuda,rocm,cpu,metal) and support level - Support reason and suggested remediation
- Runtime installation state
- Python diagnostics and
huggingface_hubavailability - Installed and missing Bonsai models
Use Ctrl+S or Enter inside the setup view to install the runtime, bootstrap the app-managed Python downloader when needed, and install the selected model.
| Shortcut | Action |
|---|---|
Tab |
Switch between Chat, Setup, Settings, Commands |
Ctrl+N |
Create a new conversation |
Ctrl+P |
Cycle the active conversation model |
Ctrl+S |
Install or start the runtime |
Ctrl+, |
Open settings |
F1 or ? |
Open command reference |
Esc |
Return to chat |
Ctrl+C or Ctrl+D |
Quit |
| Command | Description |
|---|---|
/new |
Start a new conversation |
/model |
Show current model |
/model <name> |
Switch to a specific model |
/rename <name> |
Rename current conversation |
/setup |
Open setup view |
/settings |
Open settings view |
/goto chat |
Return to chat |
/help |
Show help |
Configure default behavior in the settings view:
- Default Model — Model used for new conversations
- Auto-Start — Whether the runtime starts automatically before requests
Settings are stored in the local SQLite-backed app state.
The runtime automatically detects your OS, architecture, and available tooling to select an appropriate backend profile.
| Platform | Backend | Status |
|---|---|---|
| Linux x86_64 + NVIDIA CUDA | CUDA | ✅ Supported |
| Linux x86_64 (no NVIDIA) | CPU | |
| Linux AMD/ROCm | ROCm | |
| macOS | Metal |
Unsupported combinations are reported in setup and doctor with suggested fixes.
BonsaiCLI doctorPrints active directories, runtime health, Python availability, and installed models.
BonsaiCLI modelsDisplays the bundled model catalog with install state, size, and VRAM requirements.
This project is provided as-is for educational and personal use. See the source code for details.