Skip to content

利用方法

ここではエンドユーザー向けの実例を示します。

開発依存としてインストール

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

一時的に実行(npx / dlx)

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

環境変数(PowerShell の例)

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

ENV を使う(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 例(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

注意

  • MOTION_TOKEN は機密情報です。CI ではシークレットとして保存してください(トークンノート参照)。
  • .tgz の扱い(--keep / --no-keep)に注意してください。
トークンノート

ローカル検証では .env を使うことが便利ですが、本番や CI では必ずシークレットストアを利用してください。

詳細は CLI リファレンス環境変数と設定 を参照してください。

MIT ライセンスの下で公開されています。