Skip to main content

Terminal mini games to play while you wait

Project description

play - Terminal Mini Games

Python 3.7+ Zero Dependencies MIT License Platform

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

Project details


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.0.tar.gz (28.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claude_games-2.4.0-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

File details

Details for the file claude_games-2.4.0.tar.gz.

File metadata

  • Download URL: claude_games-2.4.0.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

Hashes for claude_games-2.4.0.tar.gz
Algorithm Hash digest
SHA256 29435a8ceea38e2bb3193dbd33a85503c3a62770477f8ed84c3355a4076f946e
MD5 d373e668d5e4dbda9f1d4a155d0cb738
BLAKE2b-256 a930359726c7738a6598fa36e0105ce6446f2e43ae0eefb42289f5cff4f9f9eb

See more details on using hashes here.

File details

Details for the file claude_games-2.4.0-py3-none-any.whl.

File metadata

  • Download URL: claude_games-2.4.0-py3-none-any.whl
  • Upload date:
  • Size: 29.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for claude_games-2.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7e318b3188c5903229ce97ddb622d6ac146611b11e6cd7612c9ed0ca702782b3
MD5 7c007a4abaa2be0cc68b7ccded327005
BLAKE2b-256 92f81c832127dc2b1cc639c3b328edd0e8b23afc6d7b4ee257aa64f2819ccede

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page