Conway's Game of Life in your terminal. Infinite grid, Unicode Braille rendering (2×4 pixels per character), and sub-cell mouse drawing — your cursor resolves to the individual dot it's over, not the whole cell.
git clone https://github.com/ImGajeed76/glife
cd glife
go build -o glife ./...
./glife # random start, 10 fps
./glife --pattern=gosper --fps=20 --theme=matrix
./glife --fps=0 --pattern=empty # start paused, draw with the mouse
| key | action |
|---|---|
SPACE | pause / resume |
→ | step one generation (while paused) |
↑ / ↓ | fps ±1 (Shift: ±10) |
w a s d | scroll camera (Shift: ×8) |
h | camera → origin (0,0) |
r | randomize visible area |
c | clear |
g | toggle chunk-grid overlay |
? | help overlay |
q / ESC | quit |
| mouse left | paint alive |
| mouse right | erase |
--fps=N Simulation ticks/sec (0 = paused, max 120). Default 10.
--density=F Initial random density (0.0–1.0). Default 0.3.
--seed=N Random seed (0 = from clock).
--pattern=NAME random | empty | glider | gosper | acorn | rpentomino | pulsar
--rule=STR Life-like rule (e.g. B3/S23, B36/S23). Default B3/S23.
--theme=NAME classic | matrix | neon | amber | mono
--color=HEX Custom fg hex for theme=mono, e.g. #ff88cc
--cam=X,Y Initial camera position in world coords.
--no-mouse Disable mouse input.
--no-pixel-mouse Force cell-level mouse (disables sub-cell precision).
--cell-size=WxH Override cell pixel size (e.g. 10x20).
glife enables the SGR-pixel mouse mode
(CSI ?1016h) and queries the terminal's pixel-per-cell ratio via
TIOCGWINSZ, so each click/drag resolves to the specific dot under the
cursor. Supported terminals: Kitty, WezTerm, iTerm2, Konsole, recent xterm,
VS Code integrated, Alacritty, Ghostty. Falls back to cell-level mouse
(tmux, older terminals).glife ships a minimally patched copy of
tcell in third_party/tcell/, wired in
via replace in go.mod. Upstream clips mouse coordinates to the
cell-based screen size, which destroys pixel-mode coords before the app
sees them; the patch comments out that single clip call in tscreen.go.
tcell remains under its original Apache 2.0 license — see
third_party/tcell/LICENSE.
This project was written entirely by Claude (Anthropic) — design, implementation, and debugging — in a single chat session.
built with ♥ by oliver
glife is Conway's Game of Life in the terminal — infinite grid, Braille rendering, sub-cell mouse drawing. Written in Go.. It is built with Go and maintained by Oliver Seifert.
glife is primarily written in Go (100% of the codebase).