A TypeScript/Node.js client for the Hevy app API.
npm install hevy-client
import { HevyClient } from "hevy-client";
const client = new HevyClient("your-api-key");
// Get workouts
const workouts = await client.getWorkouts();
// Create a workout
const newWorkout = await client.createWorkout({
workout: {
title: "Morning Workout 💪",
description: "Push day",
start_time: new Date().toISOString(),
end_time: new Date().toISOString(),
is_private: false,
exercises: [
{
exercise_template_id: "05293BCA",
sets: [
{
type: "normal",
weight_kg: 100,
reps: 10,
},
],
},
],
},
});
getWorkouts(params?: Pagination)
createWorkout(workout: Workout)
getWorkoutCount()
getWorkoutEvents(params?: Pagination & { since?: string })
getWorkout(workoutId: string)
getRoutines(params?: Pagination)
createRoutine(routine: Routine)
getExerciseTemplates(params?: Pagination)
getExerciseTemplate(templateId: string)
getRoutineFolders(params?: Pagination)
createRoutineFolder(folder: { title: string })
getRoutineFolder(folderId: number)
The package includes TypeScript definitions for all request and response types.