Workout Gate 🏋️
Your AI works hard, so should you.
A Claude Code hook that blocks your prompt until you work out — push-ups or
squats, counted live via webcam. When a challenge fires you pick your pain
(say 6 push-ups or 9 squats). Random reps, session-persistent debt (no
closing the tab to skip), streak stats, and three trigger modes.
Version française : README.fr.md
Requirements
- Python 3.9–3.13 — including the macOS system Python 3.9, so there's no newer Python to install.
- A webcam + an internet connection (first run downloads MediaPipe/OpenCV and a ~9 MB pose model).
- macOS for the zero-config plugin onboarding — it pops the setup in a Terminal and triggers the camera-permission dialog. Linux/Windows work too; Claude just points you at
bootstrap.sh to run once by hand.
git and python3 on your PATH.
Install
As a Claude Code plugin (recommended)
/plugin marketplace add BotchetDig/workout-gate
/plugin install workout-gate@workout-gate
Then start a new session (or run /reload-plugins) — nothing happens
until you do. Onboarding pops up in a Terminal window on its own —
dependencies install, then a 30-second wizard (your max, trigger choice, a
2-pushup camera test). Until setup is done, prompts pass freely. The gate and
/workout-gate:workout then work in every session, and plugin updates never
break the install (the runtime lives in ~/.workout-gate/).
One line, without the plugin
curl -fsSL https://raw.githubusercontent.com/BotchetDig/workout-gate/main/get.sh | bash
Re-running the same line updates the install. Prefer to look around first?
git clone https://github.com/BotchetDig/workout-gate.git && cd workout-gate
./install.sh
The installer sets everything up (venv, dependencies, pose model) then walks
you through a 30-second wizard: it asks your one-set max to size the
challenges to you (25–50% of it), lets you pick a trigger, offers the global
install, and runs a 2-pushup camera test so the macOS permission dialog
happens now — not in the middle of your first gated prompt.
Re-run the wizard anytime with workout setup. Use ./install.sh --no-setup
for a non-interactive install with defaults (every 15 prompts, 5–10 reps).
Usage
Drive it with ! workout from inside Claude Code (the ! prefix runs a shell
command — instant, zero tokens), or just workout from any terminal.
| Command | Effect |
|---|
! workout | open the web dashboard (settings + live stats) in your browser |
! workout tui | the terminal dashboard instead (curses, arrow keys) |
! workout now | force a challenge right now (great for filming) |
! workout stats | per-exercise totals + 7-day chart (arrow keys to switch exercise in a real terminal) |
! workout status | gate state (counter, debt, settings) |
! workout on / off | enable / disable |
! workout stop | close a running challenge window |
! workout preset chill|demo|hardcore | see presets below |
! workout enable|disable squats | turn an exercise on/off |
! workout set reps squats 8 15 | rep range for one exercise |
! workout set mode choice|random | pick the exercise yourself, or at random |
! workout debug on|off | overlay the detected skeleton + live joint angle (handy when adding exercises) |
! workout set freq 15 | one challenge every 15 prompts |
! workout set time 30 | time-based: at most one challenge per 30 min |
! workout set chance 10 | roulette: 10% chance on every prompt |
There's also a /workout-gate:workout slash command, but it routes through
Claude and costs tokens — prefer ! workout for everything above.
Dashboard
! workout (or workout in a terminal) opens the web dashboard in your
browser. It's organised in tabs: an Overview tab (all the settings —
preset, trigger, gate on/off — plus combined stats) and one tab per
exercise, each with its own enable toggle, rep range, today/total counters and
7-day chart. Add an exercise (one entry in detector.py) and its tab appears on
its own. A "force a challenge" button is one click away. It's a tiny local-only
server (stdlib, no dependencies, bound to 127.0.0.1) that shuts itself down a
few minutes after you close the tab.
Prefer the terminal? ! workout tui opens the curses settings dashboard
(arrow keys to navigate, left/right to change values), and ! workout stats is
the dedicated stats viewer (←/→ cycles through ALL + each exercise: total,
streak, record, 7-day chart). Both pop up in a Terminal window on macOS; the
webcam challenge itself is unchanged everywhere.
Presets
- chill — every 25 prompts, 3–6 reps. Everyday use.
- demo — every single prompt, 5–8 reps. Filming mode.
- hardcore — every 5 prompts, 15–25 reps. You asked for it.
How it works