Skip to content

feat: add hidden wt animate easter eggs (duck pond, crab, hatching egg) - #37

Merged
johnpangalos merged 1 commit into
mainfrom
worktree-wt-animate-duck
Jul 2, 2026
Merged

feat: add hidden wt animate easter eggs (duck pond, crab, hatching egg)#37
johnpangalos merged 1 commit into
mainfrom
worktree-wt-animate-duck

Conversation

@johnpangalos

Copy link
Copy Markdown
Owner

What

Two hidden commands — deliberately absent from --help:

  • wt animate — 8-bit-style pixel animations in the terminal. The default is a duck paddling across a pond: four depth-shaded water layers with wave crests and highlight streaks drifting at different parallax speeds, a trailing wake, a vertical bob, an occasional blink, a lily pad riding the drift, sun and a cloud. wt animate crab plays a red crab scuttling along the beach (a nod to the Claude crab).
  • wt animate2 — the prequel: an egg on a grassy meadow wobbles, cracks, pops its top, and hatches into a duckling that waddles off flapping. Also reachable as wt animate egg.
wt animate                 play the duck until Ctrl-C
wt animate --list          list animations
wt animate --frames <n>    render n frames and exit (non-tty default: 1)
wt animate --color         force color when piping; NO_COLOR wins over everything
wt animate2                the egg hatch, same flags

How

Each animation is a pure frame(tick, cols) returning a pixel grid of palette keys. Rendering uses the half-block trick: every pair of pixel rows becomes one line of with 256-color foreground (top pixel) and background (bottom pixel), doubling vertical resolution. The player hides the cursor, redraws in place with erase-to-EOL, and restores the cursor on exit or Ctrl-C; non-tty/NO_COLOR falls back to one plain character per pixel pair.

Purity keeps every frame deterministic and unit-testable. docs/animations.md documents the technique plus ideas for future scenes.

Tests

49 new assertions-heavy tests in tests/animate.test.ts: grid purity/shape/width, duck visibility and leftward motion, water layering and movement, hatch-story phases, both renderers, player escape-code behavior, and e2e runs of the compiled binary (--list, --color vs NO_COLOR, unknown names, bad flags, and both commands staying out of --help). Full suite: 94 pass.

🤖 Generated with Claude Code

8-bit-style pixel animations rendered with 256-color half-blocks, two
pixel rows per terminal line. Each animation is a pure frame(tick, cols)
function returning a grid of palette keys, so frames are deterministic
and unit-testable; the player redraws in place and restores the cursor
on exit or Ctrl-C, with a plain-character fallback for non-tty/NO_COLOR.

- wt animate: duck paddling across a pond with parallax water layers,
  wave crests, wake, bob, blink, lily pad, sun and cloud
- wt animate crab: a nod to the Claude crab, scuttling on the beach
- wt animate2: an egg that wobbles, cracks, and hatches into a duckling
  that waddles off (also wt animate egg)

Both commands are deliberately absent from --help.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@johnpangalos
johnpangalos marked this pull request as ready for review July 2, 2026 08:14
@johnpangalos
johnpangalos merged commit dd6a369 into main Jul 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant