A cli app that unifies all Node package managers. The command line application automatically detects and maps commands for most popular Node package managers.
The app aims to make life easier for developers who work on multiple projects using different package managers. Remembering which project uses which PM or checking it every time becomes labor work at some point.
The package is available on npmjs CDN. Install xum
globally using your preferred PM:
npm i -g @drfrost/xum
yarn global add @drfrost/xum
To verify that the app was successfuly installed, run xum --version
.
The app uses a modified preferred-pm
package internally which essentially detects following package managers:
- npm
- yarn
- pnpm
- bun
XUM takes the best from both npm and yarn. The following commands are currently implemented:
Command | Description |
---|---|
xum info | Display information about preferred package managers for current directory/workspace. |
xum install | Install dependencies |
xum run | Run a script found in package.json. |
xum add | Add specified dependencies. |
xum upgrade | Update specified dependencies. |
xum list | List project dependencies. |
xum remove | Remove specified dependencies. |
xum dev add | Add specified dev dependencies. |
xum init | Initialize new package. Prompt will ask for preferred PM if not provided with the --manager flag. |
xum | Run a wildcard command. Use with caution since your command won't be validated. Use with the --manager flag to make sure you run commands for the correct PM. |
xum help | Display help. |
ℹ️ We will gradually implement more commands and eventually we hope to deprecate the wild
command.
Most commands accept the --manager <npm|yarn|pnpm|bun>
flag which will force using the specified package manager.
How to run an unsupported command?
In order to run an unsupported command, use the xum <command>
command. e.g. xum audit
which in a yarn workspace will execute yarn list
. Since 1.0.0-alpha.6
you can omit the wild
part and simply pass the actual command. However same as with the wild command, it will not be validated and it's advised to append the --manager <npm|yarn|pnpm|bun>
flag. The warning prompt can be skipped by passing the --skip-prompt
flag.