bun-list
TLDR
View documentation for the original command
SYNOPSIS
bun-list [filter...] [--global] [--json] [--only] [--depth <n>]
PARAMETERS
--global
Show globally installed packages instead of project-local
--json
Output as JSON for machine-readable format
--only
Display only direct (top-level) dependencies
--depth <n>
Limit dependency tree depth (default: 1, 0 for infinite)
--help, -h
Display help message
--version, -V
Print the version number
DESCRIPTION
The bun-list command, part of the Bun toolkit, displays installed dependencies for JavaScript/TypeScript projects managed by Bun's fast package manager. Bun is an incredibly speedy alternative to Node.js, npm, and Webpack, performing installs up to 30x faster.
It outputs a dependency tree similar to npm ls or yarn list, showing direct and transitive dependencies. Filter by package name to focus on specific ones. Customize output with JSON for scripting or limit to direct deps only.
Ideal for developers using Bun (bun install, bun add), it integrates seamlessly with bun run and bun test. Run in project root with bun.lockb file. Supports global packages too. Enhances workflow in modern JS ecosystems.
CAVEATS
Requires Bun installed (≥1.0); only lists packages from bun.lockb. No support for yarn.lock/npm-shrinkwrap. Global mode needs Bun configured for globals.
EXAMPLE USAGE
bun-list react — filter for React packages.
bun-list --json — JSON output.bun-list --global — list globals.
EXIT CODES
0 on success; 1 if no packages or error.
HISTORY
Introduced in Bun 0.5.0 (Jan 2023) as bun pm ls; bun-list alias added in 1.0 (Sep 2023) for convenience. Developed by Oven (Jarred Sumner) to match npm/yarn ergonomics with superior speed.


