Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>bonsai-codeNew to Visual Studio Code? Get it now.
bonsai-code

bonsai-code

David Moreno-Lumbreras

|
1 install
| (0) | Free
Visualize branching code evolution like a bonsai tree.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

🌳 Bonsai Code

Bonsai is a visual bug-fixing & software-engineering environment inside VS Code.
Start from the active file, then apply activities powered by an LLM to generate multiple options and explore alternative branches:

  • Fix the problem (mandatory first step, with or without a short description)
  • Generate tests
  • Refactor
  • Handle exceptions

Fill color = last activity, leaf borders = similarity (blue→red vs. the selected leaf), right-click → Trim to prune subtrees, and Export/Import sessions as JSON.

Bonsai screenshot


Installation

Option A — Marketplace (when available)

  1. VS Code ➜ Extensions view
  2. Search “Bonsai” ➜ Install

Option B — VSIX file

  1. VS Code ➜ Extensions (⋯) ➜ Install from VSIX…
  2. Select your bonsai-*.vsix

Option C — From source (this repo)

# In the repo folder
npm install
npm run compile
code .
# Launch dev host
# VS Code: press F5

API key: set your LM STUDIO url before launching:

  • macOS/Linux: export BONSAI_LM_URL=your_api_key_here
  • Windows (PowerShell): $env:BONSAI_LM_URL="your_api_key_here"

Quick Use

  1. Open a source file ➜ Ctrl/Cmd+Shift+P → “Start Bonsai” (the active file becomes the first node).
  2. Always start with Fix the problem.
  3. When applying an activity, use the numeric input to spawn N branches (N≥1) with different options.
  4. Select a leaf to see similarity borders on other leaves (cool→warm = less→more similar).
  5. Check the Details pane (Code, Reasoning, Similarity, Code Metrics).
  6. Right-click → Trim to prune a node and its children.
  7. Export JSON to save; Import JSON to restore.

Selected node Activities Branches Code & Reasoning


Commands

  • Start Bonsai: Opens Bonsai IDE panel.

Release Notes

0.0.1

Initial preview: fix-first workflow, numeric branching, activity colors, similarity borders (leaf), Details pane (code/reasoning/metrics), Trim, Export/Import.

All


Links

  • Quick Start & Tutorial: TUTORAL.md
  • Repository: https://gitlab.com/dlumbrer/bonsai-vscode

Privacy note: Bonsai can send selected code/prompts to your configured LLM via OpenRouter. Don’t include secrets or proprietary data unless permitted.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft