←  Kodi Alex case 03 — csakura

csakura

A cherry tree that grows in your terminal.

I made this with C99 and ncurses. Branches grow, petals fall, and the wind changes. Each new tree looks a little different.

Written inC99 + ncurses
Stars★251
Clones1,722
LicenceMIT
SourceC + ncurses
Repository ↗ Install it

Saved GitHub figures: 28 August 2026. Counts refresh when the data is available.

Try the tree below
csakura -c sakura
petals 5
wind 1
speed 24
Try the web version here. Change the palette, wind, and petal density, or regrow the tree. Your settings are saved in this browser. The keyboard controls listed below work here too.

What it is

01 / the idea

This is one of my projects made for the pleasure of making it. A small tree, built entirely from terminal characters, with petals drifting through the window.

The shape is generated each time it runs. Branches grow first, and the blossom follows their shape. Press r if you want to grow another.

I added installation options for Arch, macOS, and Nix, alongside building it from source. The commands are below if you want to try it in your own terminal.

There are fallbacks for simpler terminals too: flat colours for limited palettes, and an ASCII mode for fonts without the blossom characters.

Building the tree

02 / what changed
01

Clumped blossom

I broke the blossom into uneven clusters so the canopy has gaps and variation.

02

Directional light

A light direction gives the top-left side brighter cells and leaves the underside in shade.

03

Limbs through blossom

The branches remain visible through gaps in the blossom, connecting the canopy back to the trunk.

04

Smooth taper

Partial block characters help the trunk and branches narrow gradually along their edges.

05

Shaded cells

Foreground and background colours work together to give each character cell a little more depth.

06

Fits the window

The renderer adjusts the tree to the available rows and columns, including narrow terminal panes.

The terminal build

03 / the real thing
csakura — 20 fps
csakura running in a terminal: a pixelated cherry-blossom canopy in pink over a brown trunk, petals drifting down a dark plum background
The terminal version with its default palette and wind. The blossom and branches are drawn with character cells.

Install

04 / getting it
# from the AUR, with yay or paru
yay -S csakura        # latest release
yay -S csakura-git    # builds from main
# or the PKGBUILD by hand
sudo pacman -S --needed base-devel ncurses
git clone https://github.com/realstrawhat/csakura.git
cd csakura
makepkg -si
# the repo doubles as its own tap — nothing to clone
brew tap realstrawhat/csakura https://github.com/realstrawhat/csakura
brew install realstrawhat/csakura/csakura         # latest release
brew install --HEAD realstrawhat/csakura/csakura  # builds from main
Once the tap is added, plain brew install csakura works too, as long as no other tap of yours claims the name. Homebrew pulls ncurses in itself. Uninstall with brew uninstall csakura and brew untap realstrawhat/csakura.
# needs a C compiler and wide-char ncurses
# libncursesw5-dev / ncurses-devel
git clone https://github.com/realstrawhat/csakura.git
cd csakura
make && sudo make install
No dependencies beyond ncurses. Uninstall with sudo make uninstall.
# flake, no clone needed
nix run github:realstrawhat/csakura
x86_64-linux, aarch64-linux and aarch64-darwin. There is a dev shell in the flake too.

Usage

05 / flags and keys
csakura [options]

  -f FPS    frames per second, 5-60   (20)
  -p NUM    petal density, 1-10       (5)
  -w NUM    wind strength, 0-10       (1)
  -c NAME   blossom palette           (sakura)
  -a        ASCII glyphs only
  -t        flat mode, no cell backgrounds
  -h        help
  -v        version
csakura -f 12 -p 3      # chill, low CPU, side pane
csakura -p 10 -w 6      # windy petal storm
csakura -c mint         # mint palette
csakura -t              # let a transparent terminal through

Keyboard controls

qEscquit
rregrow the tree, new shape every time
cCnext / previous palette, 15 of them
pPmore / fewer petals
wWmore / less wind
+−faster / slower
aASCII glyphs, for fonts without the blossoms
tflat mode, lets a transparent terminal through
Uppercase letters are shifted, so C is Shift + c. All of them work on this page except q.

Notes

06 / the small print

How I worked

  1. 01Idea

    Something calm to leave running in a terminal window.

  2. 02Constraints

    Terminals differ in colours, fonts and pane sizes, so the tree has to adapt.

  3. 03Design

    Uneven blossom clusters, light from the top left, branches showing through the gaps.

  4. 04Build

    C and ncurses, a new tree every run, flat-colour and ASCII fallbacks, and a web preview.

  5. 05Result

    Open source, with installs for Arch, macOS and Nix.