A macOS app that watches Claude play NetHack autonomously using the Claude Agent SDK.
# Install dependencies
brew install tmux nethack
# Set up Python environment
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
# Authenticate Claude Code
claude loginOpen NetHackPlayer.xcodeproj in Xcode and run (Cmd+R).
NetHackPlayer spawns a Claude Code session via the Agent SDK that plays NetHack through tmux. The app displays the live game via SwiftTerm and shows Claude's reasoning and actions in a chat panel below.
+------------------------------------------+
| NetHackPlayer.app |
| +------------------------------------+ |
| | Terminal View (SwiftTerm) | |
| | tmux attach -t nethack -r | |
| +------------------------------------+ |
| +------------------------------------+ |
| | Chat View | |
| | Claude's reasoning + actions | |
| +------------------------------------+ |
+------------------+-----------------------+
| JSON lines (stdin/stdout)
+----------+-----------+
| Python Bridge |
| (ClaudeSDKClient) |
+----------+-----------+
|
+----------+-----------+
| Claude Code CLI |
| Bash: tmux commands |
+-----------+----------+
|
+-----+-----+
| tmux |
| "nethack" |
+-----------+
- Autonomous play — Claude explores, fights, loots, and descends through the dungeon
- Live terminal — Watch the game in real-time via embedded SwiftTerm
- Chat interface — See Claude's reasoning and send messages to guide play
- Skill system — Loads strategy knowledge from
~/.claude/skills/nethack/
- macOS 15.0+, Xcode 26+
- Homebrew with
tmuxandnethack - Python 3.10+ with Claude Agent SDK
- Claude Code authentication (
claude login)
