Commands
bun pm bin
Print the path to Bun’s bin directory.
-g flag, prints the global bin directory:
bun pm cache
Print the path to Bun’s cache directory.
bun pm ls
List installed dependencies in a tree structure.
bun list
bun pm hash
Generate and print the hash of the current lockfile.
bun pm hash-string
Print the string used to generate the lockfile hash.
bun pm hash-print
Print the hash stored in the current lockfile.
bun pm migrate
Migrate from another package manager’s lockfile to bun.lockb.
package-lock.json(npm)yarn.lock(Yarn)pnpm-lock.yaml(pnpm)
bun.lockb):
bun pm pack
Create a tarball of the current workspace.
bun pm scan
Scan packages in the lockfile for security vulnerabilities.
bun pm why
Show why a package is installed and what depends on it.
bun pm whoami
Print the currently logged-in npm username.
bun whoami
bun pm view
View package information from the registry.
bun pm version
Bump the version in package.json and create a git tag.
patch- 1.0.0 → 1.0.1minor- 1.0.0 → 1.1.0major- 1.0.0 → 2.0.0prepatch- 1.0.0 → 1.0.1-0preminor- 1.0.0 → 1.1.0-0premajor- 1.0.0 → 2.0.0-0prerelease- 1.0.0 → 1.0.1-0 or 1.0.1-0 → 1.0.1-1
bun pm pkg
Manage fields in package.json.
Get field
Set field
Delete field
Fix common errors
bun pm untrusted
Print current untrusted dependencies with scripts.
bun pm trust
Trust dependencies and allow their install scripts to run.
bun pm default-trusted
Print the default list of trusted dependencies.
Global flags
These flags work with mostbun pm commands: