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

7 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

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
 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
  • 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 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
├── CLI Games (turn-based)         # Text output, no curses needed
│   ├── Snake
│   ├── 2048
│   └── Minesweeper
├── 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.3.0.tar.gz (22.5 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.3.0-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: claude_games-2.3.0.tar.gz
  • Upload date:
  • Size: 22.5 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.3.0.tar.gz
Algorithm Hash digest
SHA256 f474d2badfc749d0497403c5c1ed778d4e5f761ec55fd01f48ad24a050765ccf
MD5 60262be4aa5c270298a76169945b9cbd
BLAKE2b-256 4a6180796ba51376e2ce29377179e62755d32ed490a73b57609024c0761a9f7d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: claude_games-2.3.0-py3-none-any.whl
  • Upload date:
  • Size: 22.9 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f3e7cab9440e82372996992fe72a4d4680a2336647ae4ecc929aac889e3fae51
MD5 cf2112a73b145bc6bb1347109af101d6
BLAKE2b-256 911377d942dac65f4488c355baea9668ea74a9baf4508f3555cac90bf46ade6e

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