Track your gym workouts, routines, and progress with both a web interface and command-line application.
- Log Workouts: Record exercises, sets, reps, and weights
- Create Routines: Save your favorite workout routines for quick logging
- View History: Review your past workouts
- Track Progress: Monitor your improvement on specific exercises over time
- Statistics: See overall stats including total workouts, exercises, and most frequent exercises
- Persistent Storage: All data saved locally (localStorage for web, JSON for CLI)
- Any modern web browser (Chrome, Firefox, Safari, Edge)
- No installation required!
Simply open index.html in your web browser:
# Option 1: Open directly
open index.html # macOS
xdg-open index.html # Linux
start index.html # Windows
# Option 2: Use a local server (recommended)
python3 -m http.server 8000
# Then visit: http://localhost:8000- 📊 Dashboard: View your stats and recent activity
- ➕ Log Workout: Easy form-based workout logging
- 📅 History: Browse all past workouts
- 📋 Routines: Create and manage workout routines
- 📈 Progress: Track performance on specific exercises
All data is stored in your browser's localStorage - no server needed!
- Python 3.6 or higher (no external dependencies required!)
- Clone this repository or download the files
- Make the script executable (optional):
chmod +x gym_tracker.py
Run the application:
python3 gym_tracker.pyOr if you made it executable:
./gym_tracker.pyRecord a new workout session. You can:
- Use a saved routine or create a custom workout
- Log multiple exercises with multiple sets
- Record reps, weight, and optional notes for each set
Example:
Exercise: Bench Press
Set 1 - Reps: 10, Weight: 135 lbs
Set 2 - Reps: 8, Weight: 145 lbs
Set 3 - Reps: 6, Weight: 155 lbs
Display your recent workouts with all details. You can specify how many workouts to show (default: 10).
Save a workout routine with predefined exercises for quick logging later.
Example Routines:
- Push Day: Bench Press, Overhead Press, Tricep Dips
- Pull Day: Pull-ups, Barbell Rows, Bicep Curls
- Leg Day: Squats, Deadlifts, Leg Press, Calf Raises
View all your saved workout routines.
Track your progress on a specific exercise over time. Enter an exercise name to see all instances you've performed it, with dates and details.
See your overall workout statistics:
- Total number of workouts
- Total exercises logged
- Total sets completed
- Most frequent exercises
Save and exit the application.
All workout data is stored in gym_data.json in the same directory as the script. This file is created automatically on first use.
Data structure:
{
"workouts": [
{
"date": "2026-01-01T10:30:00",
"exercises": [
{
"name": "Bench Press",
"sets": [
{"reps": 10, "weight": 135, "notes": ""}
]
}
]
}
],
"routines": {
"Push Day": ["Bench Press", "Overhead Press", "Tricep Dips"]
}
}- Be Consistent: Log your workouts immediately after finishing for best results
- Use Routines: Create routines for your regular workout splits to save time
- Track Progress: Regularly check your progress on key exercises to stay motivated
- Add Notes: Use the notes field to record how the set felt, form cues, or other observations
- Backup Your Data: Periodically backup
gym_data.jsonto avoid losing your history
-
Create a routine for your workout split:
- Run the app and select "3. Create Routine"
- Name it "Push Day"
- Add exercises: Bench Press, Overhead Press, Tricep Dips, Lateral Raises
-
Log your workout:
- Select "1. Log Workout"
- Choose "Push Day" routine
- Log sets for each exercise
-
Track your progress:
- Select "5. View Progress"
- Enter "Bench Press"
- See your improvement over time!
Feel free to submit issues or pull requests for improvements!
MIT License - feel free to use and modify as needed.
Happy lifting! 💪