Play terminal games while AI coding agents think
Project description
🎮 Agent Arcade
Play terminal games while AI coding agents think.
Stop context-switching to your phone while waiting for Claude Code, Aider, or other AI tools. Stay in the terminal, stay productive.
✨ Features
- 🤖 Multi-Agent Support: Works with Claude Code, Aider, Cursor, and more
- 🎮 Built-in Games: Snake and more puzzle games
- 🔄 Save States: Pause and resume games anytime
- 📊 Smart Monitoring: Detects when AI is ready for input
- ⌨️ Seamless Switching: Quick keybindings to switch between AI and games
- 🎯 Zero Config: Works out of the box with sensible defaults
📦 Installation
Prerequisites
- Python 3.9 or higher
- tmux - Install with:
- macOS:
brew install tmux - Linux (Debian/Ubuntu):
sudo apt-get install tmux - Linux (RedHat/CentOS):
sudo yum install tmux
- macOS:
Via pipx (Recommended)
pipx installs Agent Arcade in an isolated environment - best for CLI tools:
# Install pipx if needed
brew install pipx # macOS
# or: python3 -m pip install --user pipx
# Install agent-arcade
pipx install agent-arcade
# Run it
agent-arcade
Updating: pipx upgrade agent-arcade
Via pip
pip install agent-arcade
agent-arcade
Updating: pip install --upgrade agent-arcade
From Source (for development)
git clone https://github.com/anthonygore/agent-arcade
cd agent-arcade
poetry install
poetry run agent-arcade
🚀 Quick Start
-
Launch Agent Arcade:
agent-arcade
-
Select your AI agent from the menu (or choose "Games Only")
-
Switch between windows:
Ctrl+Space- Toggle between AI and Games windows
-
Play games while AI thinks! 🎮
🎮 Built-in Games
Snake 🐍
Classic arcade action. Eat food, grow longer, avoid walls and yourself!
- Controls: Arrow keys to move, P to pause, Q to quit
- Goal: Get the highest score possible
🤖 Supported AI Agents
| Agent | Status | Command |
|---|---|---|
| Claude Code | ✅ Fully Supported | claude |
| Aider | ✅ Fully Supported | aider |
| Cursor AI | ✅ Supported | cursor-cli |
| Generic | ✅ Fallback | Any CLI tool |
⚙️ Configuration
Configuration file location: ~/.agent-arcade/config.yaml
The configuration file is created automatically on first run with sensible defaults.
Example Configuration
# AI Agents
agents:
claude_code:
name: "Claude Code"
command: "claude"
ready_patterns:
- "What would you like to do\\?"
- "^> "
# tmux Settings
tmux:
session_name: "agent-arcade"
mouse_mode: false
status_bar: true
# Keybindings
keybindings:
toggle_window: "C-Space" # Ctrl+Space to toggle between windows
# Notifications
notifications:
enabled: true
visual: true
message: "🤖 AI Ready"
Adding Custom AI Agents
To add a custom AI agent, edit ~/.agent-arcade/config.yaml:
agents:
my_agent:
name: "My AI Tool"
command: "my-ai-cli"
args: []
ready_patterns:
- "Ready>" # Regex pattern to detect when agent is ready
🎯 How It Works
-
Dual-Window Setup: Agent Arcade creates a tmux session with two full-screen windows:
- Window 0 (AI Agent): Your AI coding agent runs here with full terminal space
- Window 1 (Games): Game runner with full terminal space
-
Smart Monitoring: Agent Arcade watches the AI agent's output for:
- Configured regex patterns (e.g., prompt indicators)
- Inactivity timeout (no output for N seconds = ready)
-
Notifications: When the AI is ready for input, you get a notification in the game window
-
Seamless Switching: Use configured keybindings to instantly switch between windows - both stay running with full state preserved
📁 Project Structure
~/.agent-arcade/
├── config.yaml # Main configuration
├── games_metadata.json # Game stats and metadata
└── save_states/ # Saved game states
└── snake.json
🐛 Troubleshooting
tmux not found
Error: tmux is not installed
Solution: Install tmux:
# macOS
brew install tmux
# Linux (Debian/Ubuntu)
sudo apt-get install tmux
# Linux (RedHat/CentOS)
sudo yum install tmux
No AI agents detected
Issue: Launcher shows "No AI agents detected"
Solution: Install an AI CLI tool:
# Claude Code
pip install claude-code
# Aider
pip install aider-chat
Games are slow or laggy
Issue: Game performance is poor
Solution:
- Increase terminal font size
- Close other applications
- Check terminal emulator performance settings
🛠️ Development
Running Tests
poetry install
poetry run pytest
Code Formatting
poetry run black agent_arcade/
poetry run ruff check agent_arcade/
Type Checking
poetry run mypy agent_arcade/
📝 License
MIT License - see LICENSE file for details.
🙏 Credits
- Built with Textual - Modern Python TUI framework
- Powered by tmux - Terminal multiplexer
- Inspired by the need to stay productive while AI agents think
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Adding New Games
- Create a new game class in
agent_arcade/games/ - Inherit from
BaseGameand implement required methods - Add game metadata
- Test your game
- Submit a PR!
📮 Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Made with ❤️ by developers, for developers.
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
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 agent_arcade-1.0.0.tar.gz.
File metadata
- Download URL: agent_arcade-1.0.0.tar.gz
- Upload date:
- Size: 35.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.1 CPython/3.13.0 Darwin/25.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
356f5795efcd9d84ea91031e9823f987a4dddb87333978fe46adb7af9dfe9d72
|
|
| MD5 |
4b4f80ee6a3cb55e0862a9c0975208a2
|
|
| BLAKE2b-256 |
e65a076cf0fd0664e458247e939b7455c5ee45cf7bd6054c0eb748e5216050d3
|
File details
Details for the file agent_arcade-1.0.0-py3-none-any.whl.
File metadata
- Download URL: agent_arcade-1.0.0-py3-none-any.whl
- Upload date:
- Size: 49.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.1 CPython/3.13.0 Darwin/25.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5bb6814c9ad3cddf69c9b148973c4e3e29f98bfd547363e4f93a291f718285d
|
|
| MD5 |
3e75bc3d7ee999300ed37886f832012d
|
|
| BLAKE2b-256 |
66db6e2593ac3ed5221ba7e6f106af95fb6c800416760242b0575fd05add6943
|