bun command cheatsheetsmirror

bun command cheatsheets

32 pages from the tldr pages documentation, rendered as plain static HTML for fast reading. Synced from upstream commit c90cc0beba84 on 2026-11-23.

Guides

  • bun

    JavaScript runtime and toolkit. Includes a bundler, a test runner, and a package manager. More information: https://bun.com/docs.

  • bun add

    Add and install new dependencies to the current project. More information: https://bun.com/docs.

  • bun audit

    Check installed packages for known security vulnerabilities. More information: https://bun.com/docs/pm/cli/audit.

  • bun build

    Bundle JavaScript and TypeScript files with Bun's fast native bundler. More information: https://bun.com/docs/bundler.

  • bun create

    Create a new project from a template. More information: https://bun.com/docs/runtime/templating/create.

  • bun exec

    Execute shell commands or script files using Bun's runtime. Note: When running from a shell, remember to escape quotes. More information: https://bun.com/docs/runtime/shell.

  • bun feedback

    Send feedback to Bun. More information: https://bun.com/docs/feedback#use-bun-feedback.

  • bun-info

    Display package metadata from the npm registry. More information: https://bun.com/docs/pm/cli/info.

  • bun init

    Scaffold an empty Bun project. More information: https://bun.com/docs/runtime/templating/init.

  • bun install

    Install JavaScript dependencies for a project from package.json. More information: https://bun.com/docs/pm/cli/install.

  • bun link

    Register a local package as linkable or link a registered package into a project. See also: bun unlink. More information: https://bun.com/docs/pm/cli/link.

  • bun outdated

    List dependencies that have newer versions available. More information: https://bun.com/docs/pm/cli/outdated.

  • bun patch

    Prepare a package for patching or generate a patch file. More information: https://bun.com/docs/pm/cli/patch.

  • bun pm bin

    Display the path to bin directories. More information: https://bun.com/docs/pm/cli/pm#bin.

  • bun pm cache

    Manage Bun's cache. More information: https://bun.com/docs/pm/cli/pm#cache.

  • bun pm hash

    Generate and inspect the hash of the current lockfile. More information: https://bun.com/docs/pm/cli/pm#hash.

  • bun pm ls

    List installed dependencies and their versions. More information: https://bun.com/docs/pm/cli/pm#ls.

  • bun pm migrate

    Convert another package manager's lockfile to a Bun-compatible lockfile without installing anything. More information: https://bun.com/docs/pm/cli/pm#migrate.

  • bun pm pack

    Create a .tgz archive containing the files that would be published to npm (same behavior as npm pack). More information: https://bun.com/docs/pm/cli/pm#pack.

  • bun pm pkg

    Manage package.json data with get, set, delete, and fix operations. More information: https://bun.com/docs/pm/cli/pm#pkg.

  • bun pm scan

    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/o…

  • bun pm trust

    Mark dependencies as trusted. More information: https://bun.com/docs/pm/cli/pm#trust.

  • bun pm version

    Manage the version field in package.json. More information: https://bun.com/docs/pm/cli/pm#version.

  • bun pm

    A set of utilities for working with Bun's package manager. Some subcommands such as pack, pkg, etc. have their own usage documentation. More information: https://bun.com/docs/pm/cli/pm.

  • bun publish

    Publish a package to the npm registry. More information: https://bun.com/docs/pm/cli/publish.

  • bun remove

    Remove a dependency from package.json. More information: https://bun.com/docs/pm/cli/remove.

  • bun run

    Execute a JavaScript/TypeScript file, or a script from package.json. More information: https://bun.com/docs/runtime.

  • bun test

    Run tests using Bun's built-in test runner. It is a fast, Jest-compatible test runner that looks for *.test.ts (and similar) files. More information: https://bun.com/docs/test.

  • bun unlink

    Unregister the current directory as a linkable package. See also: bun link. More information: https://bun.com/docs/pm/cli/link#unlinking.

  • bun update

    Update dependencies in a Bun project. More information: https://bun.com/docs/pm/cli/update.

  • bun upgrade

    Upgrade Bun to the latest version. More information: https://bun.com/docs/installation#upgrading.

  • bun why

    Explain why a package is installed by showing its dependency chain. More information: https://bun.com/docs/pm/cli/why.