Overview
The CLI caches registry manifests and component assets on disk so repeated installs are instant and work offline.
motion-core cacheUsage
# Print cache location and TTLs
motion-core cache
# Delete every cached manifest and asset
motion-core cache --clear --force# Print cache location and TTLs
motion-core cache
# Delete every cached manifest and asset
motion-core cache --clear --forceOptions
| Flag | Description |
|---|---|
--clear | Requests cache deletion. On its own it only prints a warning, acting as a safeguard against accidental data loss. |
--force | Must be combined with --clear |
What gets cached?
- Registry manifest () – includes metadata about every component (name, slug, dependencies, preview assets). Default TTL: 10 minutes.
registry.json - Component manifest () – a map of registry paths → base64 encoded file contents that power
components.json. Default TTL: 24 hours, also used as a fallback when offline.motion-core add
Both TTLs can be customized via environment variables:
export MOTION_CORE_CACHE_DIR="$HOME/.cache/motion-core"
export MOTION_CORE_CACHE_TTL_MS=120000 # registry TTL (2 min)
export MOTION_CORE_ASSET_CACHE_TTL_MS=3600000 # asset TTL (1 h)export MOTION_CORE_CACHE_DIR="$HOME/.cache/motion-core"
export MOTION_CORE_CACHE_TTL_MS=120000 # registry TTL (2 min)
export MOTION_CORE_ASSET_CACHE_TTL_MS=3600000 # asset TTL (1 h)When to clear the cache
- Registry updates introduced new components but still shows an old version.
motion-core list - After manually editing files inside the cache directory and wanting to revert to a clean state.
Remember that clearing the cache deletes every cached manifest and asset. The next CLI command will re-download them, so make sure you have an internet connection or keep a backup if you rely on offline usage.