pkg
Detect the project's package manager from lockfiles and execute install, add, remove, run scripts, list, and outdated commands across npm, yarn, pnpm, and others without manual setup.
Instructions
Drive whichever package manager the project uses, without having to know which: npm, pnpm, yarn, bun, deno, pip, uv, poetry, pipenv, cargo, go, composer, bundler, maven, gradle, dotnet. Actions: detect, install, add, remove, run (a script/task), scripts (list them), list, outdated. Detection reads lockfiles, so it picks the manager the repo actually uses.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Project directory. Default: server cwd. | |
| dev | No | add: install as a dev dependency. | |
| args | No | run: arguments passed to the script. | |
| action | No | What to do. Default detect. | |
| script | No | run: the script or task name. | |
| manager | No | Force a manager instead of detecting one. | |
| packages | No | add/remove: package names (versions allowed, e.g. "lodash@4"). | |
| max_bytes | No | Byte cap on returned output. | |
| timeout_ms | No | Timeout. Installs default to 600000 (10 min). |