Commands
| Command | Description | Example |
|---|---|---|
ni, ni <pkg>, ni -D <pkg> |
Install dependency, devDependency | ni, ni react, ni -D @types/react |
nup, nup <pkg> |
Upgrade dependencies | nup, nup react |
nun <pkg> |
Uninstall dependency | nun react |
nr <script> |
Run npm script | nr lint, nr test |
nlx <pkg> |
Execute npm package (npx) |
nlx tsc |
Rules
- NEVER use
npm,pnpm,yarn, orbundirectly unless explicitly instructed. USE the commands mentioned above. - Prefer existing
package.jsonscripts vianr <script>(e.g.lint,typecheck,format) over running tools directly withnlx/npxwhen available. For example, usenr lintinstead ofnlx eslintornr typecheckinstead ofnlx tsc. Usenlx <tool>whenpackage.jsonhas no matching script.