CLI Reference
This page provides a consolidated reference for major options and usage examples of the motion-plus-installer CLI.
Basics
TIP
If installed locally, you can invoke ./node_modules/.bin/motion-plus-installer directly.If installed globally, run motion-plus-installer --help to check availability.
This CLI follows a subcommand-based design.Installation operations must be executed explicitly using the install (alias: i) subcommand.
Subcommands and Key Options
install (
i): Downloads and installs the specified package.Arguments must follow thepkg@versionformat (e.g.,motion-plus@latest).- Options (applied to the subcommand):
-s, --storage <subdir>: (Subdirectory insidenode_modules) used for download caching.Default:.motion-plus-installer-t, --token <token>: Bearer token for API calls. (If omitted, theMOTION_TOKENenvironment variable is used.Execution fails if neither is set).--keep/--no-keep: Retain or delete downloaded.tgzfiles (default:--keep).--force: Overwrite existing cache and re-download (default: false).--retry <n>: Number of retry attempts for downloads (default:2).--out <path>: Output downloaded.tgzdirectly to the specified path (without auto-prefixing insidenode_modules).--pm-cmd <cmd>: Explicit package manager command (e.g.,pnpm,npm,yarn).Auto-detected if omitted.--proxy <url>: Specify an HTTP(S) proxy. (Automatically setsHTTP_PROXY/HTTPS_PROXYduring execution).-q, --quiet: Minimize log output.--no-pretty: Disable formatting features like color and path shortening.
Advanced Option
-a, --allow-default: Falls back tomotion-plus@latestonly when neither arguments nor environment variables are provided.Avoid using this unless requiredfor automation scenarios such as CI.- Options (applied to the subcommand):
clear-cache (
cc): Deletes cached download artifacts (.tgz).- Options:
-s, --storage <subdir>: Target storage (default:.motion-plus-installer).--all: Remove the entire storage directory recursively.-q, --quiet: Suppress log output.
- Options:
Other (global) options:
-V, --version: Display the CLI version.-h, --help: Show help output (commander standard).
Pre-execution Checklist
- Ensure that
MOTION_TOKENis available.Specify it via--tokenor set theMOTION_TOKENenvironment variable. - Specify target packages in
pkg@versionformat.Uselatestto omit version numbers (e.g.,motion-plus@latest). - In CI environments, store
MOTION_TOKENas a secret.
For details on environment variables and configuration, refer to Environment Variables & Configuration.
Usage Examples
- Install the latest version:
motion-plus-installer install motion-plus@latest
# Short form
motion-plus-installer i motion-plus@latest- Install a specific version:
motion-plus-installer install motion-plus@2.0.0-alpha.5- Clear cache (delete
.tgzfiles from default storage):
motion-plus-installer clear-cache- ストレージを丸ごと削除:
motion-plus-installer clear-cache --all実際のコマンド例(npx / pnpm dlx、.env 例、CI スニペットなど)は、サイトの 利用方法 ページに集約しています。