Skip to content

Kxrbx/BonsaiCLI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BonsaiCLI

Terminal workspace for chatting with Bonsai AI models locally.

Description

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.

Features

  • 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

Prerequisites

  • Go 1.23 or higher
  • Linux or macOS (Windows support in progress)
  • For GPU acceleration: NVIDIA CUDA, AMD ROCm, or Apple Metal

Installation

Build from Source

./build.sh

Install

./install.sh ./BonsaiCLI

The 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.

Quick Start

# Open the chat interface
BonsaiCLI chat

# Open setup to install runtime and models
BonsaiCLI setup

# Check system health
BonsaiCLI doctor

Running BonsaiCLI without arguments opens the chat interface.

Commands

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

First-Time Setup

Run the setup command to configure your environment:

BonsaiCLI setup

The 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_hub availability
  • 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.

Keyboard Shortcuts

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

Slash Commands

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

Settings

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.

Environment Support

The runtime automatically detects your OS, architecture, and available tooling to select an appropriate backend profile.

Supported Configurations

Platform Backend Status
Linux x86_64 + NVIDIA CUDA CUDA ✅ Supported
Linux x86_64 (no NVIDIA) CPU ⚠️ Degraded
Linux AMD/ROCm ROCm ⚠️ Degraded
macOS Metal ⚠️ Experimental

Unsupported combinations are reported in setup and doctor with suggested fixes.

Diagnostics

Doctor Command

BonsaiCLI doctor

Prints active directories, runtime health, Python availability, and installed models.

Models Command

BonsaiCLI models

Displays the bundled model catalog with install state, size, and VRAM requirements.

License

This project is provided as-is for educational and personal use. See the source code for details.

About

Terminal workspace for chatting with Bonsai AI models locally using the PrismML custom runtime.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors