afk-arcade
v0.9.0
Published
A terminal game arcade — browse, save, and play games published by devs. npx afk-arcade
Maintainers
Readme
afk-arcade
A terminal game arcade. Browse games published by devs, save them to your library, and play them — right from your terminal.
Get started
Just play — nothing to install:
npx afk-arcade↑↓ pick a game · ↵ play · B back · q quit. The first time you play a
game you confirm a one-time trust prompt (↵) — listings are reviewed, but
games are third-party code.
Play beside your agent — the arcade pops up while Claude Code works:
npx afk-arcade installSave favorites + sync with the web — ties to your GitHub and syncs both ways with afk-arcade.pages.dev/profile:
npx afk-arcade loginThen in the arcade S saves a game to your library (L), and D pins your
default game.
Keys
- Browse:
↑↓pick ·↵view ·Rrate ·Llibrary ·Wwallet ·Ppublish ·qquit - Detail:
↵play ·Ssave ·Rrate ·Bback - Library:
↵play ·Rrate ·Xremove ·Dpop-up (syncs to web) ·Bback
Games are npm packages and launch via npx <package>@latest. The first time
you play a game you'll be asked to confirm — listings are reviewed before they
appear, but games are third-party code.
Rating
When a game exits back to the arcade, a one-line strip asks you to rate it —
press 1-5 and you're done. Any other key dismisses it. It asks once per
game, and never again once you've rated.
Rate a game any time with [R] on a highlighted row. Add a comment with [C]
while the strip is up. Not signed in? Your rating is saved locally — the strip
reads saved · sign in to post — and posts the next time you sign in.
Play while your agents work
Install the wait-game hooks with npx afk-arcade install: every prompt you
send opens the arcade in a pane beside the agent's terminal, so you can watch
it work while you play. No tmux required — the hook also splits zellij, WezTerm,
and kitty, or opens a new Terminal.app window on macOS (see the main
README for the full surface
chain and its warts).
The pane opens on a 3-second countdown card that names your game and starts it
— zero keypresses needed. It picks your [D] pin, else the last game you
played, else afk-snake. Press ↵ to play right away, or any other key to
cancel into a numbered switch list (1-6 — digits jump straight in, no
arrowing needed).
Quit back out of a game and you land on a session-home card — ↵ play again,
[S] switch, [F] focus, [Q] back to Claude — showing your best score and
today's rank if you're signed in (both are skipped if you're signed out or
offline, never shown as zero).
The old full-screen "your agent is ready" takeover is gone. When the agent
finishes (or pauses to ask you something), that's now a one-line strip drawn
under whatever card is showing — ✓ agent ready · [Q] back to Claude — so it
never interrupts a game in progress. It clears the moment you send the agent a
new prompt.
Mid-game is the one exception: if the agent finishes while you're actually
playing, the arcade pauses the game — an OS-level freeze, so it works for
every game with zero per-game support — and paints "YOUR AGENT IS READY" over
it. Press ↵ (or Ctrl-C) to end the game and return to the agent's terminal,
closing the pane; any other key resumes the game exactly where you left off.
Press [F] for focus mode: the pane stays closed for the rest of the
current Claude session — no more auto pop-ups until a new session starts. The
tmux resume hotkey (Ctrl-S by default, see the main README) clears focus and
reopens the pane, so you're never locked out.
Under the hood, alongside the existing $TMPDIR/term-game-popup.pid, the hooks
keep two more files: $TMPDIR/term-game-agent.json (busy/ready state plus the
Claude session id, so a stale signal from an old session can't lie about being
ready) and $TMPDIR/term-game-focus (present only while focus mode is on for
the current session).
Keys are uniform across every wait-game screen: ↵ always plays, Q always
returns to Claude, S switches games, F is focus.
Auto pop-up beside your agent
npx afk-arcade installWires Claude Code hooks so the arcade opens beside your agent whenever it's
working — a tmux / zellij / WezTerm / kitty / iTerm2 split, or a new window.
It counts down and auto-starts your session game (press D on a game in the
library to pin one as the default; otherwise it's the last game you played, or
afk-snake) — see "Play while your agents work" above for the full countdown /
switch / session-home flow. Options: --key <C-s> sets the resume hotkey,
--no-window disables the new-window fallback.
This replaces any afk-snake install wait-game — run one, not both.
npx afk-arcade uninstall # remove the hooksPublishing your game
Publish your terminal game to the arcade from the TUI:
- Ship your game to npm (any package with a
binthat runs in a terminal). - Run
npx afk-arcade, pressP, and fill in the form (GitHub login required). - Your submission is reviewed; once approved it appears in the arcade.
In-game purchases: see docs/arcade-purchases.md for the credits API and revenue split (70% to you).
For the curious
The registry lives on the same Cloudflare Worker as afk-snake's economy. The arcade never hosts or executes game code server-side — npm hosts packages, the registry stores listings.
Links
- Browse the arcade on the web: https://afk-arcade.pages.dev
- Building a game with in-game purchases? See the purchase API contract in
docs/arcade-purchases.md(70% revenue share to devs).
