Terminal sidecar that runs beside Claude Code in a split pane. Shows live session status and a poker game driven by your coding lifecycle events.
Via skills.sh (recommended — adds /sidepot skill to any Claude Code session):
npx skills add muratkus/sidepotOne-liner (clones to ~/.sidepot, sets up venv, installs /sidepot skill):
bash -c "$(curl -fsSL https://raw.githubusercontent.com/MuratKus/sidepot/main/install.sh)"Manually:
git clone https://github.com/MuratKus/sidepot.git ~/.sidepot
cd ~/.sidepot
uv venv --python 3.11
uv pip install -e ".[dev]"Then type /sidepot in a terminal-based Claude Code session to launch.
Note:
/sidepotrequires Claude Code in a terminal. Claude Desktop's code panel can't render the TUI — runbash ~/.sidepot/launch.sh claudein a separate terminal instead.
Roguelike poker inspired by Balatro. Score chips × mult to beat blinds, collect jokers, survive 8 antes.
- Blinds: Each ante has a target score (300 → 3000). Beat it to advance.
- Jokers: 12 unique jokers with triggers (always, on test pass, on file change, on hand type, etc.)
- Shop: Buy jokers between rounds. Reroll for $3.
- Lives: Start with 3. Lose one per failed blind. Game over at 0.
- Scoring:
base_chips × mult, modified by jokers
Classic Jacks-or-Better. Starting chips: 500, bet: 25.
| Hand | Payout |
|---|---|
| Royal Flush | 250× |
| Straight Flush | 50× |
| Four of a Kind | 25× |
| Full House | 9× |
| Flush | 6× |
| Straight | 4× |
| Three of a Kind | 3× |
| Two Pair | 2× |
| Jacks or Better | 1× |
| Key | Action | When |
|---|---|---|
1–5 |
Toggle hold on card | After prompt submitted |
D |
Draw / Play hand | After command/tests start |
X |
Discard (Balatro) | During play, uses remaining |
B/N/M |
Buy joker 1/2/3 | In shop |
E |
Reroll shop | In shop ($3) |
S |
Skip shop | In shop |
R |
Reset session + game | Always |
G |
Switch game mode | Always |
Q |
Quit | Always |
Each hook sends the raw JSON payload to the sidecar's HTTP endpoint (localhost:4321/events) via curl. The sidecar translates it into a game event — your file edits, commands, and test results drive the poker hand.
| Claude Code Hook | Matcher | Game Event |
|---|---|---|
SessionStart |
— | Deal a new hand |
UserPromptSubmit |
— | Unlock hold (press 1–5) |
PreToolUse / PostToolUse |
Bash (test cmd) |
tests_started / tests_passed/failed |
PostToolUse |
Write|Edit|MultiEdit |
Show file changed in session panel |
PreToolUse / PostToolUse |
Bash |
command_started / command_finished → unlock draw |
Notification |
— | Pause game (⚠ ATTN) |
Stop |
— | Auto-score final hand |
The hook timeout is 2000ms — if the sidecar isn't running, hooks fail silently. The installer configures hooks automatically. To add them manually, copy from hooks/claude_code.json into ~/.claude/settings.json.
| Command | Description |
|---|---|
./launch.sh claude |
Split pane, live Claude Code events |
./launch.sh |
Split pane, mock events (demo/dev) |
python -m src.main --mode claude |
Direct launch, live mode |
python -m src.main |
Direct launch, mock mode |
python -m src.main --no-tui |
Print events to stdout (debug) |
.venv/bin/pytest tests/ -v133 tests covering deck, hand evaluator, video poker engine, Balatro engine (scoring, jokers, blinds, shop, persistence), session reducer, pause/resume, and Claude Code hook translation.
src/
├── main.py # entry point
├── types/ # all dataclasses and enums
├── events/ # event schema, async bus
├── session/ # pure session state reducer
├── game/ # deck, hand evaluator, balatro engine, jokers
├── adapters/ # mock (timer) + claude_code (HTTP)
├── tui/ # Textual app + all widgets
└── utils/ # card rendering (Rich markup)
tests/ # 133 tests
hooks/claude_code.json # hook config reference