Zbonsai
Inspired by cbonsai, zbonsai is a Zig-based terminal application that procedurally generates beautiful bonsai trees in your command line interface. zbonsai brings the zen of bonsai to your terminal, reimagined in the Zig programming language.
Install / Use
/learn @JustinBraben/ZbonsaiREADME
zbonsai
Inspired by cbonsai, zbonsai is a Zig-based terminal application that procedurally generates beautiful bonsai trees in your command line interface. zbonsai brings the zen of bonsai to your terminal, reimagined in the Zig programming language.
Features
- Procedurally generated bonsai trees
- Customizable tree parameters
- Terminal-based user interface using libvaxis
- Command-line argument parsing with zig-clap
Installation
To install zbonsai, you'll need to have Zig 0.15.1 on your system. Then, follow these steps:
-
Clone the repository:
git clone https://github.com/JustinBraben/zbonsai.git cd zbonsai -
Build the project:
zig build -
Run zbonsai:
zig build run
Usage
Basic usage:
zig build run
For more options, use the --help flag:
zig build run -- --help
To generate and view the tree live:
zig build run -- -l
Generate tree live with verbose output.
zig build run -- -l -v minimal
Print tree to terminal and give back control
zig build run -- -p
Generate tree with custom leaves
# ASCII leaves
zig build run -- -c "&,*,#,@,+"
# Unicode/emoji leaves
zig build run -- -c "🌿,🍃,🌸,✿,🌺"
# Mixed
zig build run -- -c "&,🌿,*,🍃"
Custom colours (cherry blossom)
zbonsai -p -k "175,94,218,137"
Live mode looping infinitely
zig build run -- -l -i
Dependencies
- libvaxis: A Zig library for creating terminal user interfaces
- zig-clap: A command-line argument parser for Zig
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgements
TODO
- [x] Generating Bonsai
- [x] Three different plant bases
- [x] Instantly view generated tree
- [x] Live view of tree generating by optionally passing
-l - [x] Implement message box
- [x] Implement print to terminal on completion
-p - [x] Implement file saving and loading
- [x] Improve colour support
- [ ] Add option to use different Random Number Generators
- [ ] Add benchmarking/testing
- [ ] Improve resizing
- [ ] Improve documentation
Note: This project is a work in progress and is primarily for learning purposes.
Related Skills
node-connect
342.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
85.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
342.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
