Skip to content

Usage

This section provides practical examples for end users.

Install as a development dependency

sh
cd /path/to/your-project
pnpm add -D motion-plus-installer
sh
cd /path/to/your-project
npm install --save-dev motion-plus-installer

Run temporarily (npx / dlx)

sh
pnpm dlx motion-plus-installer i motion-plus@latest
sh
npx motion-plus-installer motion-plus@latest

Environment variables (PowerShell example)

PowerShell
sh
$env:MOTION_TOKEN = 'your-token'
sh
pnpm dlx motion-plus-installer i motion-plus@latest
sh
npx motion-plus-installer i motion-plus@latest

Using ENV files (dotenv-cli)

sh
pnpm dlx dotenv-cli -e .env -- pnpm dlx motion-plus-installer i motion-plus@latest
sh
npx dotenv-cli -e .env -- npx motion-plus-installer i motion-plus@latest

CI Example (GitHub Actions)

yaml
- name: Install CLI
  run: pnpm add --save-dev motion-plus-installer
- name: Run installer
  env:
    MOTION_TOKEN: ${{ secrets.MOTION_TOKEN }}
  run: npx motion-plus-installer i motion-plus@latest

Warning

  • MOTION_TOKEN is sensitive information.In CI environments, store it as a secret (see Token Notes).
  • Be mindful of how .tgz files are handled (--keep / --no-keep).
Token Notes

Using .env is convenient for local testing, but in production or CI you must rely on a secret store.

For more details, see the CLI Reference and Environment Variables & Configuration.

Released under the MIT License.