← 全部工具

strozynskiw/bonsai

AI Agent
热度 75 更新于 AI 与 Agent

Provider-independent coding agent for your terminal — fast Rust TUI + headless mode, OS-sandboxed, multi-provider

githubauto-collected

安装

暂未验证可直接使用的安装命令,请查看项目官方文档或 Release。

bonsai

bonsai is a terminal coding agent with catalog-driven connections including OpenCode, OpenAI, Codex, Anthropic, MiniMax, Z.AI, Moonshot/Kimi, and OpenRouter, tool-based execution, and a terminal UI.

[!WARNING] Early release — use at your own risk. This is an early version of bonsai, and yes, large parts of it were written with the help of coding agents. (It's a coding agent — how could it not be?) It ships with real safety measures: a command sandbox, configurable autonomy modes, risk classification of shell commands, loop and stall detection, and permission prompts for anything destructive. But no set of guardrails makes an autonomous agent risk-free. It edits files, runs commands, and talks to LLM providers on your behalf — mistakes can and will happen. Run it in version- controlled directories, review what it does, keep backups of anything you care about, and treat every release before 1.0 as experimental. You use it at your own risk.

Install

From binaries (recommended)

One line, no Rust toolchain required:

curl -fsSL https://raw.githubusercontent.com/strozynskiw/bonsai/master/install.sh | sh

The installer detects your platform, downloads the matching release archive, and installs to ~/.local/bin (override with BONSAIINSTALLDIR). Every download is verified against the release's Ed25519-signed manifest before anything is installed — the archive checksum and the extracted binary checksum both have to match the signed record. BONSAIVERSION=v0.2.6 pins a specific release.

If the install directory isn't on your PATH, the installer wires it up for your shell (zsh, bash, or fish) with a single guarded line sourcing ~/.bonsai/env — no manual profile editing, and re-running never duplicates it. Set BONSAINOMODIFYPATH=1 to opt out and get manual instructions instead. Prefer a shared directory? BONSAIINSTALLDIR=/usr/local/bin works when you have write access — but the user-local default is what keeps the built-in self-updater working without elevated permissions.

Prebuilt binaries cover macOS (Apple Silicon and Intel) and Linux glibc (x86-64 and arm64).

Homebrew

Install Bonsai from its third-party tap:

brew install strozynskiw/bonsai/bonsai

Alternatively, add the tap first and then use the short formula name:

brew tap strozynskiw/bonsai
brew install bonsai

This formula is maintained in strozynskiw/homebrew-bonsai. Its four archive checksums are pinned from Bonsai's signed release manifest; the tap verifies those checksums while Homebrew manages future upgrades instead of Bonsai's built-in self-updater. Third-party taps are not listed on formulae.brew.sh; that site indexes the official homebrew/core and homebrew/cask repositories. New Bonsai versions become available after the release-generated tap pull request passes its Tests workflow and is merged. Refresh and upgrade with brew update && brew upgrade bonsai.

From source

Building needs a recent stable Rust toolchain — install one with rustup if you don't have it. Cargo places the bonsai binary in ~/.cargo/bin, which rustup adds to your PATH by default.