Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content
movekit-devPublic

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

movekit

TypeScript SDK and CLI for MoveKit, a library of 697 looping 3D exercise animations with posters, muscles, equipment, and coaching cues. Zero dependencies, Node 20+, and works with no API key.

MoveKit 3D exercise animations: Barbell Bench Press, Dumbbell Goblet Squat, Cable Row, and Kettlebell Swing

Previews from the 697-exercise library (16 primary muscles, 29 equipment types). Clean H.264 MP4 clips ship via the API.

Docs | Browse all exercises | OpenAPI spec | Agent skills & MCP | Static JSON/CSV DB


Try it in 10 seconds

No API key or account is required to start. Without a key, MoveKit searches all 697 exercises and downloads the 12 sample clips.

# Search the library
npx movekit search "bench press" --equipment dumbbell

# Check how well MoveKit covers your existing exercise list
npx movekit check "Bench Press" "Pull Ups" "Romanian Deadlift" "Goblet Squat"

# Import the 12 sample MP4 clips, first-frame posters, and catalog.json into ./movekit/
npx movekit import

Sample output:

$ npx movekit search "bench press" --equipment dumbbell --limit 3
3 of 8 exercises matching "bench press" (equipment: dumbbell)

  dumbbell-bench-press            Dumbbell Bench Press            Chest        Dumbbell, Bench   beginner
  incline-dumbbell-bench-press    Incline Dumbbell Bench Press    Chest        Dumbbell, Bench   beginner
  decline-dumbbell-bench-press    Decline Dumbbell Bench Press    Chest        Dumbbell, Bench   intermediate

$ npx movekit import
MoveKit import complete (sample): 12 exercises, 24 files downloaded (43.8 MB), 0 skipped
  catalog: ./movekit/catalog.json
  assets:  ./movekit/assets

When you own a MoveKit pack or single exercises, set MOVEKIT_API_KEY in .env.local (or your environment) and run npx movekit import again. The same command pulls everything you own into the same folder. For web apps with a public/ folder, pass --assets-dir public/movekit (or MOVEKIT_ASSETS_DIR=public/movekit) once; later runs remember that folder automatically.

On MoveKit Hosted? Run npx movekit sync-hosted (add --csv for a spreadsheet export) to write the exact same movekit/catalog.json layout backed by clean streaming URLs.

One-line switch from free previews to paid

Build your prototype against the free watermarked previews (previews.movekit.com), then flip mode to "local" (after npx movekit import or unzipping a paid pack) or "hosted" (after npx movekit sync-hosted) without touching a single player component:

import { createExerciseMediaResolver } from "movekit";
import catalog from "./movekit/catalog.json"; // or exercise-database JSON / Paid Pack metadata.json

const media = createExerciseMediaResolver({
  mode: "local", // "preview" (dev/staging) | "local" (self-hosted) | "hosted" (MoveKit Hosted)
  catalog,
  localBaseUrl: "/movekit",
});

const { videoUrl, posterUrl } = media.resolve("barbell-bench-press");

createExerciseMediaResolver reads exercise-database, npx movekit import, npx movekit sync-hosted, Paid Pack ZIP metadata.json, and raw /v1/embeds payloads using the same stable id and slug join keys. Optional fallbackToPreview: true works in development only and throws in production (NODE_ENV=production) so watermarked previews never leak into shipped apps.

Install the SDK

npm install movekit
import { createMoveKitClient } from "movekit";

// Works keyless out of the box. Pass { apiKey: process.env.MOVEKIT_API_KEY } for owned clips.
const movekit = createMoveKitClient();

// Search the full catalogue
const { data } = await movekit.listExercises({
  q: "squat",
  muscle: "Quadriceps",
  access: "all",
  limit: 10,
});

// Read full coaching cues and asset hashes for an owned or sample exercise
const { data: exercise } = await movekit.getExercise("cable-row-bar-standing-row");

// Match your app's exercise names against MoveKit
const report = await movekit.checkCoverage(["Bench Press", "Pull Ups", "Plank"]);
console.log(`${report.matchedCount}/${report.total} matched`);

Prefer plain HTTP? curl "https://api.movekit.com/v1/exercises?limit=1" works with no key too.

Playing clips in your app

Every clip is a 16:9 H.264 MP4 paired with an exact first-frame poster. Play them muted and looping inline so they look like crisp GIFs at a fraction of the file size.

React / Next.js

<video
  src={videoSrc}
  poster={posterSrc}
  autoPlay
  loop
  muted
  playsInline
  style={{ aspectRatio: "16 / 9", width: "100%", borderRadius: 12 }}
/>

React Native / Expo (expo-video)

const player = useVideoPlayer(source, (p) => {
  p.loop = true;
  p.muted = true;
  p.play();
});
return <VideoView player={player} nativeControls={false} style={{ width: "100%", aspectRatio: 16 / 9 }} />;
Flutter and SwiftUI examples

Flutter (video_player)

final controller = VideoPlayerController.asset('assets/movekit/ex75-video.mp4')
  ..setLooping(true)
  ..setVolume(0);
await controller.initialize();
controller.play();

SwiftUI (AVKit)

let item = AVPlayerItem(url: clipURL)
let player = AVQueuePlayer(playerItem: item)
player.isMuted = true
let looper = AVPlayerLooper(player: player, templateItem: item)
player.play()

Full guides (including Jetpack Compose and reduced-motion handling) live in movekit-dev/agent-skills and movekit.com/docs/guides/show-clips.

Coding agents and MCP

Connect MoveKit to Claude Code, Cursor, Codex, VS Code, or ChatGPT with no API key:

# Install the MoveKit agent skill (includes player code for React, Expo, Flutter, SwiftUI, Compose)
npx skills add movekit-dev/agent-skills

# Or add the hosted MCP server directly in Claude Code
claude mcp add --transport http movekit https://movekit.com/mcp

Building an AI workout coach? The catalogue MCP endpoint (https://movekit.com/mcp/catalog) exposes search, coverage checks, audited form cues, and interactive workout cards (render_workout_plan, show_exercise, browse_exercises).

Self-Hosted vs MoveKit Hosted

Every MoveKit pack or individual clip is a one-time purchase that includes API access.

Self-Hosted (default) MoveKit Hosted (optional add-on)
Delivery Imported into your app bundle or your own S3/R2/CDN; plays offline Streamed from media.movekit.com with no videos in your app bundle
Best for Fixed workout libraries, offline apps, zero monthly media cost AI workout coaches or open-ended exercise pickers
Pricing One-time purchase (API access included) Optional monthly add-on from US$29/mo (25 GB), US$99/mo (100 GB), or US$299/mo (500 GB) in US list prices, localized by country
Setup npx movekit import npx movekit sync-hosted or client.listEmbeds({ include: "metadata" })

CLI & SDK reference

All CLI commands (8 commands)
Command What it does
npx movekit search <query> Search all 697 exercises (--muscle, --equipment, --difficulty, --pattern, --licensed, --limit, --json)
npx movekit list List sample/owned exercises, or all 697 with --all
npx movekit info <slug|id> Show metadata, form cues, common mistakes, and asset hashes
npx movekit check <names...> Check coverage of exercise names (or --file list.txt) against MoveKit
npx movekit taxonomies Print all 16 muscles, 29 equipment types, 3 difficulties, and 14 patterns
npx movekit import Download verified MP4 clips, posters, and catalog.json (--dry-run, --dir, --assets-dir, --limit, --slugs)
npx movekit sync-hosted Sync MoveKit Hosted streaming URLs and metadata into catalog.json (--dry-run, --dir, --csv, --limit, --slugs)
npx movekit status Show account mode, owned count, Hosted status, and limits
All SDK methods and error handling

Core exports in "movekit" use standard Web fetch and crypto.subtle (safe in Node 20+, Deno, Bun, and edge runtimes). Filesystem importing lives in "movekit/importer".

Method Endpoint / Source Purpose
listExercises(params?) GET /v1/exercises Search and filter with cursor pagination
iterateExercises(params?) GET /v1/exercises Async generator walking all pages via nextCursor
getExercise(idOrSlug) GET /v1/exercises/{id} Full owned/sample metadata, cues, and assets
getTaxonomies() GET /v1/taxonomies Accepted muscle, equipment, difficulty, and pattern values
getEntitlements() GET /v1/entitlements Purchase grants, licensed IDs, and Hosted status
getUsage() GET /v1/usage Rate limits and per-file-version download caps (key required)
createDeliveries(assetIds) POST /v1/deliveries Issue 300s signed download links for 1 to 50 owned assets
getDownloadUrls(input) POST /v1/deliveries Auto-batched helper accepting Exercise, Exercise[], or assetIds[]
downloadDelivery(delivery) GET /media/{grantId} Download bytes without Authorization, verifying size and SHA-256
listEmbeds(params?) GET /v1/embeds Hosted streaming URLs (include: "metadata" returns cues and taxonomy in one pass)
createExerciseMediaResolver(opts) Universal core Unified "preview" | "local" | "hosted" media resolver across all MoveKit catalogue formats
fetchCatalog() GET /catalog.json Fetch all 697 public CC BY 4.0 exercise records
checkCoverage(names) /catalog.json + /v1/entitlements Match exercise names (slug, name, alias, normalized, fuzzy)
getOpenApiSpec() GET /v1/openapi.json Fetch the live OpenAPI 3.1.2 contract
importExercises(options?) movekit/importer Build-time Node importer writing movekit/assets/ and catalog.json
syncHostedExercises(options?) movekit/importer Sync MoveKit Hosted streaming URLs into movekit/catalog.json (plus optional CSV)

Non-2xx responses throw a typed MoveKitError with status, code, requestId, retryable, nextAction, retryAfter (from Retry-After on 429/503), and purchase (on 403 asset_not_licensed). Retryable 429/502/503/504 errors retry automatically up to maxRetries (default 2).

Sample exercise JSON record (GET /v1/exercises/75)
{
  "id": "75",
  "slug": "cable-row-bar-standing-row",
  "name": "Cable Row Bar Standing Row",
  "aliases": ["Standing Cable Row", "Standing Neutral-Grip Cable Row"],
  "primaryMuscles": ["Back"],
  "secondaryMuscles": ["Biceps"],
  "equipment": ["Cable Machine"],
  "implementsNeeded": null,
  "movementPattern": ["Pull"],
  "difficulty": "beginner",
  "durationSeconds": 5.8,
  "access": "licensed",
  "description": "A standing cable row using a paired neutral-grip handle to pull toward the torso while the feet stay planted.",
  "instructions": [
    "Attach a paired neutral-grip row handle and set the pulley so the cable runs toward your mid-torso.",
    "Hold the upright grips with your palms facing each other and step back until the cable is taut."
  ],
  "commonMistakes": [
    "Leaning far backward to move the handle.",
    "Shrugging the shoulders throughout the pull."
  ],
  "assets": [
    {
      "id": "ex75-video",
      "version": "golden-release-20261004:ae121e3065d855ff190bcdbe66cc267172046f2ec09f9d189f8007bbf49b715d",
      "sha256": "d74cedbbfbc4d6d93afd73cbbf4ca7e6d4ef1d876d12be14913c617974ba8109",
      "bytes": 1843302,
      "mediaType": "video/mp4"
    }
  ]
}

License

  • SDK, CLI, and importer code: MIT License.
  • Promotional preview visuals (assets/): Copyright MoveKit, excluded from MIT (see assets/NOTICE.md).
  • Public catalogue metadata (movekit.com/catalog.json): CC BY 4.0 data only (MoveKit, https://movekit.com).
  • MoveKit 3D videos, posters, and licensed copy: Covered by the MoveKit License Agreement, not MIT or CC BY. No attribution required for licensed clips; raw media may not be redistributed or used to train AI models.

Releases

Packages

Contributors

Languages