Skip to content
AI NEWS JOURNAL
Hacker News Show HNAI NEWS / JOURNAL

Show HN: Stuck Hunt – Rex session cleanup game

I hit the current session ceiling in Rex (64 sessions) and instead of spending 10 minutes trying to browse through old sessions, I spent an hour writing a game that renders in Rex that lets you preview and remove old sessions Duck Hunt style. Comments URL: https://news.ycombinator.com/item?id=50745432 Points: 2 # Comments: 0

Rex session cleanup game An N-up Rex session viewer & Duck Hunt cleanup game that runs right inside Rex — zero external runtime dependencies. Meet the Flock N-up live terminal grid (1×1, 2×2, 3×3, 4×4) with live rex capture previews, session age (decoded from UUIDv7 IDs), foreground process, and cwd. Full-bleed [1×1] Zoom (k): expand any session full-screen with scrollback (↑/↓) and ←/→ session flipping, then toggle right back to your N-up grid. Stale / stuck heuristics: flags exited processes, auto-generated Rex names (e.g. arid-mesa), blank prompts, and idle shells. Classic NES Duck Hunt juice & 8-bit SFX: 24-bit Unicode half-block pixel art rendered directly inside Rex CRT Zapper white-flash, shocked duck + feather burst, spiral plunge, and the triumphant hound rising behind the grass with your bagged session Occasional laughing hound popping up behind the grass (empty paws!) when you idle, miss, shoot a shielded session, or back off an active process Synthesized 8-bit WAV SFX on macOS (afplay, mute anytime with m) Safety first: Live Fire with one-key Dry-Run practice toggle (d or --dry-run) Current Rex session (REX_SESSION) is auto-shielded (and if launched in a fresh auto-named single-pane session, automatically renames itself to stuckhunt) Active foreground processes (nvim, claude, etc.) require a double-tap shot to confirm Shield/lock any keeper (s or right-click) Install & Quick Start Homebrew (macOS — recommended, no Bun required) brew install dshaw/tap/stuckhunt # Safe dry-run against your real Rex sessions stuckhunt --dry-run # Live fire against your real Rex sessions stuckhunt # Try it with synthetic sessions (never touches Rex) stuckhunt --demo From Source (requires Bun >= 1.0) git clone https://github.com/dshaw/stuckhunt.git cd stuckhunt bun run demo # synthetic demo sessions ./bin/stuckhunt --dry-run # safe dry-run against real Rex sessions ./bin/stuckhunt # live fire bun link # optional: install `stuckhunt` onto PATH Launch Inside Rex (Floating Overlay) Add one line to ~/.config/rex/init.lua: -- If installed via Homebrew (Apple Silicon: /opt/homebrew, Intel: /usr/local) dofile("/opt/homebrew/opt/stuckhunt/share/stuckhunt/stuckhunt.lua").register() -- Or if running from a local git clone: -- dofile(os.getenv("HOME") .. "/path/to/stuckhunt/rex/stuckhunt.lua").register() Then validate and reload Rex: rex config check && rex config reload Press Shift+Cmd+D (or search Stuck Hunt in Rex's Command Palette) to pop Stuck Hunt open as a floating layer right over your active Rex window. Press q to close it and drop straight back into your work. Custom options: dofile("/opt/homebrew/opt/stuckhunt/share/stuckhunt/stuckhunt.lua").register { key = "shift+cmd+d", -- false to disable keybinding (stays in Command Palette) dry_run = false, grid = 3, -- 1, 2, 3, or 4 mute = false, } CLI Options Controls MIT © Dan Shaw (@dshaw)

Sources

Read original ↗

Related topics

← Continue to all updates