← スキル一覧に戻る

ni
by fohte
My configuration files for Neovim, Zsh, Tmux and so on
⭐ 1🍴 0📅 2026年1月24日
SKILL.md
name: ni description: Use ni (@antfu/ni) for package manager operations. Use this skill when installing dependencies, running scripts, or executing packages in JavaScript/TypeScript projects.
ni - Package Manager Agnostic Commands
JavaScript/TypeScript プロジェクトでパッケージマネージャー操作を行う際は、npm, yarn, pnpm, bun などを直接使用せず、@antfu/ni のコマンドを使用すること。
ni はプロジェクトの lockfile を自動検出し、適切なパッケージマネージャーコマンドに変換する。
コマンド対応表
| ni コマンド | 用途 | npm 相当 |
|---|---|---|
ni | 依存関係のインストール | npm install |
ni <pkg> | パッケージ追加 | npm install <pkg> |
ni -D <pkg> | devDependencies に追加 | npm install -D <pkg> |
nr <script> | スクリプト実行 | npm run <script> |
nlx <pkg> | パッケージ実行 | npx <pkg> |
nu | 依存関係の更新 | npm update |
nun <pkg> | パッケージ削除 | npm uninstall <pkg> |
nci | クリーンインストール | npm ci |
使用例
# 依存関係をインストール
ni
# パッケージを追加
ni axios
# devDependencies に追加
ni -D typescript @types/node
# スクリプト実行
nr build
nr test
nr lint
# npx 相当
nlx eslint --fix .
nlx prettier --write .
# パッケージ削除
nun lodash
# クリーンインストール
nci
注意事項
niは mise でグローバルインストール済み (config/mise/home-config.toml)- lockfile が存在しないプロジェクトでは、
niはデフォルトで npm を使用する nrでスクリプトを実行する際、引数は--なしでそのまま渡せる
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です