play - Terminal Mini Games
10 classic games in your terminal. Zero dependencies. Just play.
╔═╗╦ ╔═╗╦ ╦╔╦╗╔═╗ ╔═╗╔═╗╔╦╗╔═╗╔═╗
║ ║ ╠═╣║ ║ ║║║╣ ║ ╦╠═╣║║║║╣ ╚═╗
╚═╝╩═╝╩ ╩╚═╝═╩╝╚═╝ ╚═╝╩ ╩╩ ╩╚═╝╚═╝
Play while you wait
Install
pip install claude-games
Or from source:
git clone https://github.com/kirti34n/claude-games.git
cd claude-games
pip install .
Games
| Game | Preview | Description |
|---|---|---|
| Snake | play snake |
Eat food, grow longer, don't hit walls |
| Tetris | play tetris |
Stack blocks, clear lines, level up |
| 2048 | play 2048 |
Slide and merge tiles to reach 2048 |
| Dino Runner | play dino |
Jump over cacti, survive as long as you can |
| Breakout | play breakout |
Smash bricks with a bouncing ball |
| Space Shooter | play shooter |
Blast enemies, defeat bosses |
| Pong | play pong |
Classic paddle game vs AI |
| Flappy Bird | play flappy |
Flap through pipes, don't crash |
| Minesweeper | play mines |
Uncover cells, avoid mines |
| Pac-Man | play pacman |
Eat dots, avoid ghosts |
Quick Start
play # Open game menu
play snake # Jump straight into Snake
play tetris # Jump straight into Tetris
play list # See all games + high scores
Controls
WASD / Arrow Keys Move / Navigate
Space Jump (Dino) / Hard Drop (Tetris) / Launch (Breakout) / Fire (Shooter) / Serve (Pong)
W Rotate (Tetris)
P Pause
ESC / Q Quit (auto-saves progress)
?/H Show controls help
F Flag (Minesweeper)
T Cycle color theme (menu)
R Retry after game over
Features
- Auto-save — Quit mid-game with ESC, resume next time you play
- High scores — Tracked per game, shown in menu
- Zero dependencies — Pure Python, just curses (built-in)
- Single file — Entire codebase is one
play.py - Difficulty selection — Choose Easy/Medium/Hard for Shooter and Pong
- In-game help — Press
?during any game to see controls - Color themes — Cycle themes with T in the menu (default, retro, ocean)
- Sound effects — Terminal beep on new high scores
- Adaptive difficulty — Snake speeds up as you score, Tetris levels up
- Ghost piece — Tetris shows where your piece will land
- Works everywhere — Linux, macOS, WSL2
Claude Code Integration
Works as a slash command inside Claude Code — play games while Claude works in the background.
/play snake # Launch a game
! play # Open game menu directly
Turn-based CLI mode for in-conversation play (no terminal needed):
play cli start snake # Start a CLI game
play cli start 2048 # Start 2048
play cli start minesweeper # Start Minesweeper
play cli start connect4 # Start Connect4
play w # Move up (WASD shortcuts)
play show # Show current board
play quit # End game
How It Works
play.py (single file)
├── Interactive Games (curses) # Full-screen, real-time
│ ├── Snake
│ ├── Tetris
│ ├── 2048
│ ├── Dino Runner
│ ├── Breakout
│ ├── Space Shooter
│ ├── Pong
│ ├── Flappy Bird
│ ├── Minesweeper
│ └── Pac-Man
├── CLI Games (turn-based) # Text output, no curses needed
│ ├── Snake
│ ├── 2048
│ ├── Minesweeper
│ └── Connect4
├── Game Menu # Arrow keys to select
├── Save/Resume System # JSON state files
└── Smart Terminal Detection # Opens new window if no TTY
Config
High scores and saves stored in ~/.config/claude-games/:
~/.config/claude-games/
├── scores.json # High scores
├── current_game.json # CLI game state
├── save_snake.json # Auto-save (created on ESC)
└── save_tetris.json # ...etc
License
MIT
Metadata
Release files for claude-games 2.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| claude_games-2.4.1.tar.gz | 28.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| claude_games-2.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 58.1 kB
Release files / claude_games-2.4.1.tar.gz
| Download URL | claude_games-2.4.1.tar.gz |
|---|---|
| Size | 28.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d52e52737c2bae6a9e196c4dad7da68534f3ae6051035a41a4ccae1e4f8ea6d4
|
|
BLAKE2b-256 checksum How to use checksums |
4f51bf61c78088faae5ca2af95c3cd0b1b9b8fcb78de3914eb539a0793bfcf80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / claude_games-2.4.1-py3-none-any.whl
| Download URL | claude_games-2.4.1-py3-none-any.whl |
|---|---|
| Size | 29.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
71245d3d69b4bc408e8272764ac0bed29a587dcc97befd5a4f440fd829ea5144
|
|
BLAKE2b-256 checksum How to use checksums |
1109c89841a803516c6bb5c723a97ca57ecde09a49642b1c6fed500e630c01c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|