mindbreak
v1.0.2
Published
A terminal arcade — 10 retro games you can play right in your shell.
Maintainers
Readme
🕹️ mindbreak
A terminal arcade. Ten retro games, one command, no setup.
███╗ ███╗██╗███╗ ██╗██████╗ ██████╗ ██████╗ ███████╗ █████╗ ██╗ ██╗
████╗ ████║██║████╗ ██║██╔══██╗██╔══██╗██╔══██╗██╔════╝██╔══██╗██║ ██╔╝
██╔████╔██║██║██╔██╗ ██║██║ ██║██████╔╝██████╔╝█████╗ ███████║█████╔╝
██║╚██╔╝██║██║██║╚██╗██║██║ ██║██╔══██╗██╔══██╗██╔══╝ ██╔══██║██╔═██╗
██║ ╚═╝ ██║██║██║ ╚████║██████╔╝██████╔╝██║ ██║███████╗██║ ██║██║ ██╗
╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝Play
No install needed — just run it:
npx mindbreakOr keep it around:
npm install -g mindbreak
mindbreakUse the arrow keys (or WASD) to move, Enter to pick a game, P to pause, and Esc to come back. Each game shows its rules — and a live demo — before you start, and your high scores are saved between sessions.
The games
| Game | What it is | |------|------------| | 🐍 Snake | Eat, grow, don't crash. | | 🧱 Tetris | Stack falling blocks and clear lines. | | 🔢 2048 | Slide and merge tiles to 2048. | | 🧊 Breakout | Bounce the ball, smash the bricks. | | 👾 Space Invaders | Shoot down the alien fleet. | | 🏓 Pong | Keep the rally going against the CPU. | | 🐤 Flappy | Flap through the gaps. | | 💣 Minesweeper | Clear the field without a bang. | | 🎵 Simon | Watch the pattern, repeat it. | | ⌨️ Typing Test | 30 seconds, how fast can you type? |
Saved data
High scores live in ~/.mindbreak/scores.json. Delete it to wipe your records.
Requirements
- Node.js 20 or newer
- An interactive terminal (it won't run when piped)
Development
git clone https://github.com/jasonzli-DEV/mindbreak.git
cd mindbreak
npm start # launch the arcade
npm test # run the test suite (node --test)mindbreak has zero runtime dependencies — it's built entirely on Node's standard library, so it installs in a blink. Game logic (Snake stepping, 2048 merges, Tetris line clears, Minesweeper flood-fill) is covered by tests.
Adding a game
Each game is a single file in src/games/ exporting { meta, create }.
Add it to the list in src/games/index.js and it shows up in the menu.
License
MIT
