A command-line interface for the Hevy fitness tracking app. Manage your workouts, routines, and exercises directly from the terminal.
# Install
$> go install github.com/nsampre/hevycli@latest
# Configure with your API key from https://hevy.com/settings?developer
$> hevycli config set-api-key <your-api-key-uuid>
# View your workout history
$> hevycli workouts list
ββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββ¬βββββββββββββββββββ¬ββββββββββββ¬βββββββββββ
β ID β TITLE β DATE β EXERCISES β DURATION β
ββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββΌβββββββββββββββββββΌββββββββββββΌβββββββββββ€
β f75e9c13-32d7-407d-9715-011f5d5698fa β Morning workout βοΈ β 2025-06-19 04:21 β 5 β 38m β
β 9544ef0f-ccfb-4943-afb8-0ebf677c2e26 β Morning workout βοΈ β 2025-06-18 05:35 β 6 β 48m β
β a856d5f3-6210-4522-8f9d-167d98254e43 β Morning workout βοΈ β 2025-06-13 05:00 β 6 β 54m β
β 34a12b2b-bb18-496c-bab5-37c49b474fcd β Morning workout βοΈ β 2025-06-10 06:23 β 5 β 45m β
β 1682b279-6b4f-4b38-b8f0-37760deaf184 β Afternoon workout πͺ β 2025-06-07 13:31 β 5 β 37m β
β 5c101486-c9fb-41c2-ba53-21e2a0f4b2cd β Morning workout βοΈ β 2025-06-05 04:53 β 6 β 35m β
β ba663cbc-107f-4b9c-9871-b39102d2660c β Morning workout βοΈ β 2025-06-03 05:08 β 5 β 33m β
β 78f694da-7e2d-4d0b-85f1-c2058f37ce85 β Morning workout βοΈ β 2025-05-27 05:03 β 4 β 32m β
β 8cea716c-2d37-4d4e-99c7-cf5e633d9dc2 β Morning workout βοΈ β 2025-05-26 05:25 β 4 β 44m β
β 98965cac-d64f-47e8-abae-53fe4edf50ab β Morning workout βοΈ β 2025-05-23 04:29 β 5 β 36m β
ββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββ΄βββββββββββββββββββ΄ββββββββββββ΄βββββββββββ
$> hevycli workouts get f75e9c13-32d7-407d-9715-011f5d5698fa
Workout: Morning workout βοΈ
ID: f75e9c13-32d7-407d-9715-011f5d5698fa
Short ID:
Date: 2025-06-19 04:21
Duration: 38 minutes
Exercises (5):
1. Hip Abduction (Machine)
βββββββ¬βββββββββ¬βββββββββββββββββ¬βββββββ¬ββββββββββββββββββ¬ββββββββββββββββββ¬ββββββ
β SET β TYPE β WEIGHT ( KG ) β REPS β DISTANCE ( M ) β DURATION ( S ) β RPE β
βββββββΌβββββββββΌβββββββββββββββββΌβββββββΌββββββββββββββββββΌββββββββββββββββββΌββββββ€
β 1 β normal β 85.0 β 10 β - β - β - β
β 2 β normal β 90.0 β 10 β - β - β - β
β 3 β normal β 95.0 β 12 β - β - β - β
βββββββ΄βββββββββ΄βββββββββββββββββ΄βββββββ΄ββββββββββββββββββ΄ββββββββββββββββββ΄ββββββ
2. Hip Adduction (Machine)
βββββββ¬βββββββββ¬βββββββββββββββββ¬βββββββ¬ββββββββββββββββββ¬ββββββββββββββββββ¬ββββββ
β SET β TYPE β WEIGHT ( KG ) β REPS β DISTANCE ( M ) β DURATION ( S ) β RPE β
βββββββΌβββββββββΌβββββββββββββββββΌβββββββΌββββββββββββββββββΌββββββββββββββββββΌββββββ€
β 1 β normal β 95.0 β 10 β - β - β - β
β 2 β normal β 95.0 β 10 β - β - β - β
β 3 β normal β 95.0 β 10 β - β - β - β
βββββββ΄βββββββββ΄βββββββββββββββββ΄βββββββ΄ββββββββββββββββββ΄ββββββββββββββββββ΄ββββββ
3. Leg Press Horizontal (Machine)
βββββββ¬βββββββββ¬βββββββββββββββββ¬βββββββ¬ββββββββββββββββββ¬ββββββββββββββββββ¬ββββββ
β SET β TYPE β WEIGHT ( KG ) β REPS β DISTANCE ( M ) β DURATION ( S ) β RPE β
βββββββΌβββββββββΌβββββββββββββββββΌβββββββΌββββββββββββββββββΌββββββββββββββββββΌββββββ€
β 1 β normal β 181.0 β 8 β - β - β - β
β 2 β normal β 181.0 β 8 β - β - β - β
β 3 β normal β 181.0 β 8 β - β - β - β
βββββββ΄βββββββββ΄βββββββββββββββββ΄βββββββ΄ββββββββββββββββββ΄ββββββββββββββββββ΄ββββββ
4. Bulgarian Split Squat
βββββββ¬βββββββββ¬βββββββββββββββββ¬βββββββ¬ββββββββββββββββββ¬ββββββββββββββββββ¬ββββββ
β SET β TYPE β WEIGHT ( KG ) β REPS β DISTANCE ( M ) β DURATION ( S ) β RPE β
βββββββΌβββββββββΌβββββββββββββββββΌβββββββΌββββββββββββββββββΌββββββββββββββββββΌββββββ€
β 1 β normal β 30.0 β 16 β - β - β - β
β 2 β normal β 30.0 β 16 β - β - β - β
β 3 β normal β 30.0 β 16 β - β - β - β
βββββββ΄βββββββββ΄βββββββββββββββββ΄βββββββ΄ββββββββββββββββββ΄ββββββββββββββββββ΄ββββββ
5. Sumo Squat (Dumbbell)
βββββββ¬βββββββββ¬βββββββββββββββββ¬βββββββ¬ββββββββββββββββββ¬ββββββββββββββββββ¬ββββββ
β SET β TYPE β WEIGHT ( KG ) β REPS β DISTANCE ( M ) β DURATION ( S ) β RPE β
βββββββΌβββββββββΌβββββββββββββββββΌβββββββΌββββββββββββββββββΌββββββββββββββββββΌββββββ€
β 1 β normal β 15.0 β 12 β - β - β - β
β 2 β normal β 15.0 β 12 β - β - β - β
β 3 β normal β 15.0 β 12 β - β - β - β
βββββββ΄βββββββββ΄βββββββββββββββββ΄βββββββ΄ββββββββββββββββββ΄ββββββββββββββββββ΄ββββββ# Get detailed workout information (supports short IDs)
hevycli workouts get 437d04ad
# View total workout count
hevycli workouts count
# Output: Total workouts: 247
# List your routines
hevycli routines list
# Export data as JSON
hevycli workouts list --format json > workouts.json- Go 1.24.0 or later
- Hevy Pro subscription
- Hevy API key (get it from https://hevy.com/settings?developer)
The easiest way to install:
go install github.com/nsampre/hevycli@latestThis will install the hevycli binary to your $GOPATH/bin directory (usually ~/go/bin).
Make sure $GOPATH/bin is in your PATH:
export PATH=$PATH:$(go env GOPATH)/bingit clone https://github.com/nsampre/hevycli.git
cd hevycli
go build -o hevycli .For a smaller binary:
go build -ldflags="-s -w" -o hevycli .sudo cp hevycli /usr/local/bin/Set your Hevy API key:
hevycli config set-api-key <your-api-key-uuid>View current configuration:
hevycli config showYou can also set your API key via environment variable:
export HEVY_API_KEY=<your-api-key-uuid>--format- Output format:table(default) orjson--debug- Enable debug output for API requests
List recent workouts:
hevycli workouts list
hevycli workouts list --page 2 --page-size 20
hevycli workouts list --format jsonGet workout details:
hevycli workouts get <workout-id>Get total workout count:
hevycli workouts countList routines:
hevycli routines list
hevycli routines list --page 2Get routine details:
hevycli routines get <routine-id>List exercise templates:
hevycli exercises list
hevycli exercises list --page 2 --page-size 20Get exercise template details:
hevycli exercises get <template-id>Get exercise history:
hevycli exercises history <template-id>
hevycli exercises history <template-id> --from 2024-01-01# View your last 5 workouts
hevycli workouts list --page-size 5
# Get detailed information about a specific workout
hevycli workouts get abc123def456
# Export all routines as JSON
hevycli routines list --format json > routines.json
# Check progress on bench press over time
hevycli exercises history <bench-press-template-id> --from 2024-01-01
# See total workout count
hevycli workouts counthevycli/
βββ cmd/ # CLI commands
β βββ root.go # Root command & global flags
β βββ config.go # Configuration commands
β βββ workouts.go # Workout commands
β βββ routines.go # Routine commands
β βββ exercises.go # Exercise commands
βββ internal/
β βββ api/ # API client
β β βββ client.go # HTTP client
β β βββ types.go # API types
β β βββ workouts.go # Workout endpoints
β β βββ routines.go # Routine endpoints
β β βββ exercises.go # Exercise endpoints
β βββ config/ # Configuration management
β β βββ config.go # Config loading/saving
β βββ display/ # Output formatting
β βββ format.go # Table/JSON formatting
βββ main.go # Entry point
βββ go.mod # Go module definition
βββ README.md # This file
go build -o hevycli.go test ./...go fmt ./...go mod tidyThis CLI uses the official Hevy API: https://api.hevyapp.com/docs/
This project is not officially associated with Hevy. Use at your own risk.
Contributions are welcome! Please feel free to submit a Pull Request.