PyBonsai procedurally generates ASCII art bonsai trees in your terminal.
Project description
PyBonsai-CLI 🪴
PyBonsai is a Python script that generates procedural ASCII art trees in the comfort of your terminal.
Features 🌱
This is a fork of PyBonsai with some additional features.
- Simple package installation 📦
- Better CLI experience 💻
- Infinite mode 🔄
- Save to text files 📄
- True bonsai 🌳
- Preset change 🎨
- Falling leaves animation 🍃
- Lofi radio 📻 [UPDATED] ✨
About other features read more on examples.md.
Installation 🔗
Requirements:
- Python 3.9 or greater
Recommended
Use pipx to install PyBonsai globally.
pipx install pybonsai
or using uv to install in temporary, isolated environment:
uvx pybonsai
Alternative
Also can be installed using pip:
pip install pybonsai
or build from source:
git clone https://github.com/DaEtoJostka/PyBonsai-CLI.git
cd PyBonsai-CLI
pip install .
Verify the installation by running:
pybonsai --version
Usage 🔧
Run pybonsai --help for usage:
OPTIONS:
-h, --help display help
--version display version
-s, --seed seed for the random number generator
-i, --instant instant mode: display finished tree immediately
-w, --wait time delay between drawing characters when not in instant mode [default {Options.WAIT_TIME}]
-c, --branch-chars string of chars randomly chosen for branches [default "{Options.BRANCH_CHARS}"]
-C, --leaf-chars string of chars randomly chosen for leaves [default "{Options.LEAF_CHARS}"]
-x, --width maximum width of the tree [default {Options.WINDOW_WIDTH}]
-y, --height maximum height of the tree [default {Options.WINDOW_HEIGHT}]
-t, --type tree type [0-3]: "classic":0, "fibonacci":1, "offset fibonacci":2, "random fibonacci":3 [default random]
-b, --bonsai enable bonsai preset settings (invokes specific defaults for small tree)
-S, --start-len length of the root branch [default {Options.INITIAL_LEN}]
-L, --leaf-len length of each leaf [default {Options.LEAF_LEN}]
-l, --layers number of branch layers: more => more branches [default {Options.NUM_LAYERS}]
-a, --angle mean angle of branches to their parent, in degrees; more => more arched trees [default {Options.ANGLE_MEAN}]
-o, --save PATH save the tree to a text file. If only a filename is provided, it will be saved in a user's Downloads directory.
-f, --fixed-window do not allow window height to increase when tree grows off screen
-I, --infinite run in infinite mode, infinitely growing same tree
-n, --new run in infinite mode, automatically growing new trees
-W, --wait-infinite time delay between drawing in infinite mode [default {Options.INFINITE_WAIT_TIME}]
-p, --preset apply a color preset: {", ".join(colors.PRESETS.keys())}
-B, --branch-color custom color for branches (e.g. "red", "#553311", "100,60,30")
-e, --leaf-color custom color for leaves
-g, --soil-color custom color for soil
-F, --leaves-falling animate leaves falling from the tree continuously
-N, --intensity intensity of falling leaves [1-10, default {Options.INTENSITY}]
-d, --fall-speed speed of falling animation [default {Options.FALL_SPEED}]
-T, --tumbling-speed speed of leaf character change [default {Options.TUMBLING_SPEED}]
-K, --falling-chars custom characters for falling leaves (e.g. "01" for matrix-style)
-R, --lofi [PRESET] play a terminal radio preset; presets: lofi (default), classical (alias: 0), medieval (alias: 1), synthwave (alias: 2), sad (alias: 3), jazz (alias: 4)
-V, --volume volume level for radio [0-100, default {Options.VOLUME}]
-U, --radio-url custom radio stream URL
Other options usage examples see examples.md
Like it?
If you like this project, please consider giving it a ⭐️ on GitHub
Also don't forget to check out PyBonsai
Contributing
If you want to contribute to this project, please feel free to submit a pull request.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pybonsai-3.0.0.tar.gz.
File metadata
- Download URL: pybonsai-3.0.0.tar.gz
- Upload date:
- Size: 65.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e68abf33c031e8ac52834309bc1d414ae0e4912d5e52a5ab4262f691bc8b8f4a
|
|
| MD5 |
56bca986f81180793996332f881cc1d1
|
|
| BLAKE2b-256 |
d76bbad655dfa8c395cd08bd079af4479763b0e1b755990f7624214688252341
|
Provenance
The following attestation bundles were made for pybonsai-3.0.0.tar.gz:
Publisher:
python-publish.yml on DaEtoJostka/PyBonsai-CLI
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pybonsai-3.0.0.tar.gz -
Subject digest:
e68abf33c031e8ac52834309bc1d414ae0e4912d5e52a5ab4262f691bc8b8f4a - Sigstore transparency entry: 1058227470
- Sigstore integration time:
-
Permalink:
DaEtoJostka/PyBonsai-CLI@e0636cea4588e3f06101a7ec9f21d643f8e439e5 -
Branch / Tag:
refs/tags/v3.0.0 - Owner: https://github.com/DaEtoJostka
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e0636cea4588e3f06101a7ec9f21d643f8e439e5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pybonsai-3.0.0-py3-none-any.whl.
File metadata
- Download URL: pybonsai-3.0.0-py3-none-any.whl
- Upload date:
- Size: 28.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebb893b383ce834cbd348f56c2902df535ccb9dac328760a96129abdcc1f1c23
|
|
| MD5 |
b526bc8d3d8334300e8465068df285cc
|
|
| BLAKE2b-256 |
e09491c2d9eb32ad6b1d5c1c0d35d282b2507e773662d9aaeded83c66c233863
|
Provenance
The following attestation bundles were made for pybonsai-3.0.0-py3-none-any.whl:
Publisher:
python-publish.yml on DaEtoJostka/PyBonsai-CLI
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pybonsai-3.0.0-py3-none-any.whl -
Subject digest:
ebb893b383ce834cbd348f56c2902df535ccb9dac328760a96129abdcc1f1c23 - Sigstore transparency entry: 1058227522
- Sigstore integration time:
-
Permalink:
DaEtoJostka/PyBonsai-CLI@e0636cea4588e3f06101a7ec9f21d643f8e439e5 -
Branch / Tag:
refs/tags/v3.0.0 - Owner: https://github.com/DaEtoJostka
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e0636cea4588e3f06101a7ec9f21d643f8e439e5 -
Trigger Event:
release
-
Statement type: