workout-gate
A Claude Code hook that blocks your prompt until you do your push-ups, counted live via webcam. Random reps, session-persistent debt (no closing the tab to skip), streak stats, and three trigger modes. Your AI works hard, so should you.
What is it?
What it is
A Claude Code and Codex plugin that blocks AI prompts until you complete a live webcam‑counted workout (push‑ups or squats).
Why it exists
To enforce physical activity while using AI coding assistants, ensuring the user works out before the AI can respond.
Who should use it
Developers using Claude Code/CodexFitness enthusiastsUsers integrating physical activity into workflows
Who should avoid it
Users without a webcamThose uncomfortable with camera permissionsUsers who dislike prompt-blocking mechanics
How it works
A quick walkthrough in plain English
How workout-gate works
Step 1 of 3
You interact with it
Open workout-gate, send a request, or connect it to your stack.
Features
Advantages
- Motivates users to exercise before coding
- Encourages healthy habits without manual tracking
- Provides detailed analytics and streaks to track progress
- Easy to install and configure with minimal setup
- Works across multiple tools (Claude Code, Codex) with shared state
- Zero‑token control commands via shell shortcuts
- Fail‑open guarantees users never get locked out
- Customizable triggers and rep ranges to fit fitness levels
- Dashboard and TUI give clear visibility into settings and stats
- Supports adding new exercises with minimal code changes
Disadvantages
- Requires a webcam and internet connection for pose detection
- Depends on MediaPipe/OpenCV which may be heavy to install
- Initial setup wizard can be time‑consuming on first run
- May block prompts if the webcam is unavailable or misconfigured
- Complexity of integration may be overkill for casual users
- Requires macOS for zero‑config onboarding (Linux/Windows need manual steps)
- Potential privacy concerns with webcam usage
- May interfere with workflow if users forget to finish reps
Installation
native
1. As a Claude Code plugin (CLI + desktop, recommended): /plugin marketplace add BotchetDig/workout-gate /plugin install workout-gate@workout-gate 2. One‑line install (no plugin): curl -fsSL https://raw.githubusercontent.com/BotchetDig/workout-gate/main/get.sh | bash 3. Manual install via git: git clone https://github.com/BotchetDig/workout-gate.git && cd workout-gate ./install.sh 4. Global install (gate every Claude Code session): ./install.sh --global # or: workout global on workout global off # to remove 5. Codex CLI without the plugin: workout codex on workout codex off (approve the hook once with `/hooks` in a new Codex CLI session.)
FAQ
How do I install Workout Gate as a Claude Code plugin?
Run `/plugin marketplace add BotchetDig/workout-gate` then `/plugin install workout-gate@workout-gate`. After installing, start a new session or run `/reload-plugins`. The onboarding wizard will appear in a Terminal window to configure your max, trigger choice, and test the camera.
What commands can I use to control the gate from the terminal?
Use `workout` (or `! workout` inside Claude Code) for the web dashboard, `workout tui` for the terminal dashboard, `workout now` to force a challenge, `workout status` to see gate state, `workout on/off` to enable/disable, and `workout preset chill|demo|hardcore` to switch presets.
How are challenges triggered and what modes are available?
The gate counts prompts via a UserPromptSubmit hook. You can set a fixed frequency (`workout set freq 15`), a time-based limit (`workout set time 30`), or a roulette chance (`workout set chance 10`). In `choice` mode you pick push-ups or squats; in `random` mode the gate picks for you.
Can I add my own exercise to Workout Gate?
Yes. Add a subclass of `ExerciseCounter` in `detector.py` defining the joint angles and thresholds, then add an entry to the `EXERCISES` registry with label, counter class, cue, default reps, and max. The dashboard, presets, and stats will automatically pick up the new exercise.
What escape hatches exist if I get locked out?
You can always run `workout off` from any terminal, use gate-management prompts like `/workout ...` in Claude Code or bare `workout ...` in Codex, set the environment variable `WORKOUT_GATE_OFF=1`, rely on fail-open behavior (no webcam or crash lets the prompt through), or avoid a second webcam window if a challenge is already running elsewhere.
Featured in Videos
YouTube tutorials and walkthroughs for workout-gate
Alternatives
Similar projects ranked by category, topics, and text overlap.