Contributing
Thanks for your interest in contributing to Bonsai! This guide covers everything you need to get started.
Development Setup
Section titled “Development Setup”Requirements: Go 1.24+
git clone https://github.com/LastStep/Bonsai.gitcd Bonsaimake build # builds ./bonsai binary./bonsai --help # verify it worksMaking Changes
Section titled “Making Changes”- Fork the repo and create a branch from
main - Make your changes
- Run
make buildto verify the binary compiles - Test your changes manually (see below)
- Submit a pull request
Testing Changes
Section titled “Testing Changes”The catalog is embedded in the binary, so you need to rebuild after editing catalog files:
make buildmkdir /tmp/test-project && cd /tmp/test-project/path/to/bonsai init/path/to/bonsai add/path/to/bonsai listAdding Catalog Items
Section titled “Adding Catalog Items”Bonsai’s catalog lives in catalog/. Each category follows the same pattern:
Skills, Workflows, Protocols
Section titled “Skills, Workflows, Protocols”- Create
catalog/{category}/{item-name}/meta.yamlwithname,description, andagents - Create
catalog/{category}/{item-name}/{item-name}.mdwith the content - Set
agents:to a list of compatible agent types, or"all"
Sensors
Section titled “Sensors”- Create
catalog/sensors/{name}/meta.yaml— includeeventand optionallymatcher - Create
catalog/sensors/{name}/{name}.sh.tmpl— hook script template
Routines
Section titled “Routines”- Create
catalog/routines/{name}/meta.yaml— includefrequency(e.g."5 days") - Create
catalog/routines/{name}/{name}.md.tmpl— procedure template
Pull Request Process
Section titled “Pull Request Process”- One feature or fix per PR — keep changes focused
- Open an issue first for significant changes so we can discuss the approach
- Write a clear PR description — what changed and why
- Test manually —
make buildmust pass, and test the affected commands
Code Style
Section titled “Code Style”- Follow standard Go conventions (
gofmt,go vet) - Keep the CLI interactive — use Huh forms for user input
- Generator functions go in
internal/generate/, catalog loading ininternal/catalog/, commands incmd/ - All data shapes use Go structs
Development with Claude Code
Section titled “Development with Claude Code”Bonsai dogfoods itself — the repo has a full Bonsai workspace in station/. If you use Claude Code for development, the agent instructions in station/agent/ provide context about the codebase and conventions.
Questions?
Section titled “Questions?”Open an issue or start a discussion — happy to help.