利用方法
ここではエンドユーザー向けの実例を示します。
開発依存としてインストール
sh
cd /path/to/your-project
pnpm add -D motion-plus-installersh
cd /path/to/your-project
npm install --save-dev motion-plus-installer一時的に実行(npx / dlx)
sh
pnpm dlx motion-plus-installer i motion-plus@latestsh
npx motion-plus-installer motion-plus@latest環境変数(PowerShell の例)
sh
$env:MOTION_TOKEN = 'your-token'sh
pnpm dlx motion-plus-installer i motion-plus@latestsh
npx motion-plus-installer i motion-plus@latestENV を使う(dotenv-cli)
sh
pnpm dlx dotenv-cli -e .env -- pnpm dlx motion-plus-installer i motion-plus@latestsh
npx dotenv-cli -e .env -- npx motion-plus-installer i motion-plus@latestCI 例(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 リファレンス と 環境変数と設定 を参照してください。