hn.today

Cbirds: A flock of birds in your terminal

github.com14 points9 comments
Screenshot of Cbirds: A flock of birds in your terminal

cbirds is a compact, dependency-free C99 program that simulates Craig Reynolds' boids as an animated flock inside a terminal. It renders in high-density braille or sextant characters for plain terminals and as full sprites via the Kitty/Ghostty graphics protocol, with color, multiple flocks, hawks, depth/trails, tails and a matrix-rain mode. The executable is a single binary (MIT-licensed) with a full build/test setup; the source includes boid logic, spatial grid, sprite/PNG support and utilities. Demonstrations show flocks that form words, part around predators, keep species-separated, draw PNGs or text, and run at a capped 60 fps or unlocked for profiling.

Installation options include Homebrew, an apt repository with .deb packages, or building from source with make (honors CC, CFLAGS, PREFIX). Runtime features are rich: presets (murmuration, matrix), interactive sliders (h) to tweak separation, alignment, perception, speed and turning, keys to add/remove birds or hawks, unlock-fps, pause, framesingle-step and quit. Any piped text becomes the flock (fastfetch | cbirds), letters retain their terminal colors and attributes, and pointer movement scatters birds. Additional modes include a clock/screensaver, picture rendering, adjustable font-size letters and shell completions for bash/zsh/fish.

Read on github.com9 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Other

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.