Skip to content
StevenBtwPublic

About

Grow a Japanese maple bonsai from your GitHub activity: an animated SVG for your profile README.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

gitbonsai

Grow a Japanese maple bonsai from your GitHub activity: an animated SVG for your profile README.

A Japanese maple bonsai grown from synthetic GitHub activity, with a legend of its leaf colors and signs

The tree is yours: it grows from your own GitHub activity, week by week. The trunk rises with the years you've been active and thickens with every contribution you've ever made. Each language you write grows branches on its own side, with leaves in that language's color. Your last few months decide how full the leaves are, so busy stretches show and quiet ones thin the crown. Wood never shrinks, so the tree remembers everything.

Newbie Comeback Veteran
A newcomer bonsai: a young tree in its first pot A comeback bonsai: deadwood from the quiet years, new growth since A veteran bonsai: tall, thick and full
a few months in quiet for two years, then back 16 years, busier the last few years
What every part shows
What you see What it shows
Height Age, from your first sustained activity
Girth Every contribution ever, flowing down the branches
Branches One side of the tree per language; your top language feeds the crown
Leaf color The language, on the Japanese maple palette
Leaf density Your last 13 weeks
Bronze tips New growth from last week
Bare wood A language unused for 13 weeks
Bleached deadwood A language silent for a year
Winged seeds Your lifetime level
Falling leaves You crossed a level this week
Moss Your current weekly streak
The pot Your longest streak

Use it on your profile

Add the action to a weekly workflow in your profile repository (<you>/<you>); examples/profile-workflow.yml is a complete one to copy to .github/workflows/bonsai.yml:

- uses: StevenBtw/gitbonsai@v0.1.2
  with:
    output-dir: assets   # bonsai-light.svg and bonsai-dark.svg
    legend: left         # optional: off (default), left or right

Then add this to your README:

<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="assets/bonsai-dark.svg" />
    <img src="assets/bonsai-light.svg" width="600" alt="My bonsai, grown from my GitHub activity" />
  </picture>
</p>

On its own, width="600" suits a desktop column, and phones scale it down to fit. Next to other cards, use 400.

Styles, leaf colors, the pot glaze and the legend go in a bonsai.toml; see examples/bonsai.toml. The action reads it from the repository root, and its inputs style and legend override it.

Run it locally

Needs the GitHub CLI, logged in.

cargo install gitbonsai
gitbonsai collect <login> --output me.snapshot.json
gitbonsai render me.snapshot.json     # bonsai/: light and dark SVG, PNG, preview.html
gitbonsai explain me.snapshot.json    # every number behind the tree

Credits

Growth is space colonization (Runions, Lane and Prusinkiewicz, 2007). Inspired by git-koi.

License

MIT or Apache-2.0, at your option.

About

Grow a Japanese maple bonsai from your GitHub activity: an animated SVG for your profile README.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages