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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
claude_games-2.4.1.tar.gz
(28.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claude_games-2.4.1.tar.gz.
File metadata
- Download URL: claude_games-2.4.1.tar.gz
- Upload date:
- Size: 28.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d52e52737c2bae6a9e196c4dad7da68534f3ae6051035a41a4ccae1e4f8ea6d4
|
|
| MD5 |
1e52cab2efca20fb169e628c49f2e8fb
|
|
| BLAKE2b-256 |
4f51bf61c78088faae5ca2af95c3cd0b1b9b8fcb78de3914eb539a0793bfcf80
|
File details
Details for the file claude_games-2.4.1-py3-none-any.whl.
File metadata
- Download URL: claude_games-2.4.1-py3-none-any.whl
- Upload date:
- Size: 29.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71245d3d69b4bc408e8272764ac0bed29a587dcc97befd5a4f440fd829ea5144
|
|
| MD5 |
0c4f4231f6b430888f940d259f82eac3
|
|
| BLAKE2b-256 |
1109c89841a803516c6bb5c723a97ca57ecde09a49642b1c6fed500e630c01c7
|