mirror of
https://github.com/tldr-pages/tldr.git
synced 2026-08-28 11:25:16 +08:00
ni: add page (#21957)
Co-authored-by: Ivan Baluta <ivanbaluta.dev@gmail.com>
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
# ni
|
||||
|
||||
> Use the right package manager (npm, yarn, pnpm, bun, or deno) automatically.
|
||||
> Detect the current project's lockfile to run the corresponding commands.
|
||||
> Note: In PowerShell, `ni` is a built-in alias for `New-Item`. To use this tool, the alias must be removed.
|
||||
> More information: <https://github.com/antfu-collective/ni>.
|
||||
|
||||
- Install all dependencies (equivalent to `npm install`, `yarn install`, etc.):
|
||||
|
||||
`ni`
|
||||
|
||||
- Install a specific package (-D for dev dependencies):
|
||||
|
||||
`ni {{package}}`
|
||||
|
||||
- Run a `package.json` script (interactively select if no script is provided):
|
||||
|
||||
`nr {{script}}`
|
||||
|
||||
- Download and execute a command from a package (equivalent to `npx`, `pnpm dlx`, etc.):
|
||||
|
||||
`nlx {{package}}`
|
||||
|
||||
- Upgrade dependencies:
|
||||
|
||||
`nup`
|
||||
|
||||
- Uninstall a package:
|
||||
|
||||
`nun {{package}}`
|
||||
|
||||
- Clean install dependencies (equivalent to `npm ci`, etc.):
|
||||
|
||||
`nci`
|
||||
|
||||
- Use the current package manager agent directly for arbitrary commands:
|
||||
|
||||
`na {{command}}`
|
||||
Reference in New Issue
Block a user