A VS Code extension that, on a timer (default 45 minutes from when VS Code starts), locks your editor with a break panel and won't let you continue until you do 10 pushups — validated live with your webcam.
Install
- Go to the Releases page and download the latest
gym-pushups-break-*.vsix. - In VS Code, open the Extensions panel →
...menu → Install from VSIX…, then pick the downloaded file. (Or from a terminal:code --install-extension gym-pushups-break-0.1.0.vsix.) - Reload VS Code. The countdown starts automatically.
How it works
- When VS Code finishes starting up, a countdown begins (shown in the status
bar:
🔥 Pushups in 9:58). - After the interval, a break panel opens and locks. It turns on your webcam and runs a pose model (TensorFlow.js MoveNet) locally inside the panel.
- Get into pushup position so the camera sees your upper body (a side angle works best). Each time you go down (elbows bent) and back up (arms extended), a rep is counted automatically.
- Once you hit the required reps, the panel unlocks, shows a success message, and the timer restarts for the next break.
While the break is active, the panel is "sticky": if you close it or switch
away, it re-opens / re-focuses itself (this is the "task cannot continue"
enforcement). Turn that off with gymPushups.strictLock: false.
Try it
npm install
npm run compile
Then press F5 in VS Code to launch an Extension Development Host. To test
without waiting for the timer, run Gym Pushups: Trigger Break Now from the
Command Palette (or click the status-bar item).
Commands
| Command | What it does |
|---|---|
Gym Pushups: Trigger Break Now |
Start a pushup break immediately |
Gym Pushups: Start / Restart Timer |
(Re)start the countdown |
Gym Pushups: Stop Timer |
Stop the countdown |
Gym Pushups: Reset Timer |
Reset the countdown |
Settings
| Setting | Default | Description |
|---|---|---|
gymPushups.enabled |
true |
Enable the automatic timer |
gymPushups.intervalMinutes |
45 |
Minutes before a break triggers |
gymPushups.requiredPushups |
10 |
Reps required to unlock |
gymPushups.strictLock |
true |
Re-open/re-focus the panel until reps are done |
Notes & limitations
- Camera: the panel uses
getUserMediainside a VS Code webview. If access is blocked, allow camera for VS Code in your OS privacy settings, then click Retry camera. - Model download: MoveNet is fetched once from a CDN (jsdelivr + Google storage), so the first break needs internet. Inference itself runs locally on your GPU/CPU.
- Rep detection uses the elbow angle (shoulder→elbow→wrist). It's a heuristic — good lighting and a clear side view of one arm give the most reliable counts. Use Recalibrate if the rep state gets stuck.
- VS Code extensions can't truly freeze the whole editor process;
strictLockis the strongest enforcement the extension API allows (sticky, self-reopening panel + warnings).