bun pm
A set of utilities for working with Bun's package manager. Some subcommands such as `pack`, `pkg` have their own usage documentation.
More info →Subcommands (10)
Display the path to `bin` directories.
Manage Bun's cache.
Generate and inspect the hash of the current lockfile.
List installed dependencies and their versions.
Convert another package manager's lockfile to a Bun-compatible lockfile without installing anything.
Create a `.tgz` archive containing the files that would be published to npm (same behavior as `npm pack`).
Manage package.json data with `get`, `set`, `delete`, and `fix` operations.
Scan packages for security vulnerabilities using Bun's integrated security scanner. This scan also runs automatically during `bun install` after configuring the scanner in `bunfig.toml` and installing `@bun-security-scanner/osv` from npm.
Mark dependencies as trusted. See also: `bun pm untrusted`.
Manage the `version` field in `package.json`.
Examples (8)
Create a tarball of the current workspace
Print the path to the `bin` directory
Display the default trusted dependencies
bun pm default-trustedGenerate and print the hash of the current lockfile
List the current untrusted dependencies that contain scripts
bun pm untrustedMigrate another package manager's lockfile without installing anything
Get a property from `package.json`
bun pm pkg get property