Explore these examples to get a better understanding of how to use PxPlusPackageManager (pxpm) in different scenarios.
Open your terminal.
Run the following command to install a package:
pxpm install example-package
Follow any on-screen prompts for confirmation.
Once the installation is complete, you can start using the package.
Open your terminal.
Run the following command to update all installed packages:
pxpm update
Confirm any prompts for updating individual packages.
After the update process, your packages will be up-to-date.
Open your terminal.
Run the following command to update a specific package to another version:
pxpm update example-package@^2
Replace example-package with the name of your target package and ^2 with the desired version range or specific version.
Confirm any prompts for updating the package.
After the update process, the specified package will be updated to the desired version.
Open your terminal.
Run the following command to remove a package:
pxpm remove example-package
Confirm the removal when prompted.
The specified package will be uninstalled from your system.
Create an API key on the website and store it in your CI/deploy secret storage (or a .env file that is not committed to version control).
In your deploy script, provide the key through the PXPM_TOKEN environment variable so no interactive login is needed:
export PXPM_TOKEN=<your-api-key>
pxpm install
That's it — every pxpm command in the script authenticates with the key automatically. If the key ever expires or is revoked, pxpm will exit with a clear error telling you to generate a new one.