Bun is a fast JavaScript runtime, package manager, bundler, and test runner. (1.4.4+38afee6c8) Usage: bun [...flags] [...args] Commands: run ./my-script.ts Execute a file with Bun dev Run a package.json script test Run unit tests with Bun check Type check a TypeScript project fmt Format JavaScript and TypeScript, like Prettier x vite Execute a package binary (CLI), installing if needed (bunx) repl Start a REPL session with Bun exec Run a shell script directly with Bun install Install dependencies for a package.json (bun i) add @evan/duckdb Add a dependency to package.json (bun a) remove browserify Remove a dependency from package.json (bun rm) update @zarfjs/zarf Update outdated dependencies audit Check installed packages for vulnerabilities dedupe Remove duplicate versions from the lockfile prune Remove packages that are not in the lockfile from node_modules outdated Display latest versions of outdated dependencies link [] Register or link a local npm package unlink Unregister a local npm package publish Publish a package to the npm registry patch Prepare a package for patching pm Additional package management utilities info zod Display package metadata from the registry why tailwindcss Explain why a package is installed build ./a.ts ./b.jsx Bundle TypeScript & JavaScript into a single file init Start an empty Bun project from a built-in template create astro Create a new project from a template (bun c) upgrade Upgrade to latest version of Bun. --help Print help text for command. Flags: --silent Don't print the script command --elide-lines= Number of lines of script output shown when using --filter (default: 0, show all lines) -v, --version Print version and exit --revision Print version with revision and exit -F, --filter= Run a script in all workspace packages matching the pattern -b, --bun Force a script or package to use Bun's runtime instead of Node.js (via symlinking node) --no-orphans Exit when the parent process dies, and on exit kill every descendant. --shell= Control the shell used for package.json scripts. Supports either 'bun' or 'system' --workspaces Run a script in all workspace packages (from the "workspaces" field in package.json) --parallel Run multiple scripts concurrently with Foreman-style output --sequential Run multiple scripts sequentially with Foreman-style output --no-exit-on-error Continue running other scripts when one fails (with --parallel/--sequential) --watch Automatically restart the process on file change --watch-kill-signal= Signal whose handlers run when --watch restarts the process (default: "SIGTERM") --hot Enable auto reload in the Bun runtime, test runner, or bundler --no-clear-screen Disable clearing the terminal screen on reload when --hot or --watch is enabled --check Type check before running. Nothing runs if there are type errors. Alone: bun check --smol Use less memory, but run garbage collection more often --interactive Start a Node.js-compatible REPL, like node --interactive -r, --preload= Import a module before other modules are loaded --require= Alias of --preload, for Node.js compatibility --import= Alias of --preload, for Node.js compatibility --inspect= Activate Bun's debugger --inspect-wait= Activate Bun's debugger, wait for a connection before executing --inspect-brk= Activate Bun's debugger, set breakpoint on first line of code and wait --cpu-prof Start CPU profiler and write profile to disk on exit --cpu-prof-name= Specify the name of the CPU profile file --cpu-prof-dir= Specify the directory where the CPU profile will be saved --cpu-prof-md Output CPU profile in markdown format (grep-friendly, designed for LLM analysis) --cpu-prof-interval= Specify the sampling interval in microseconds for CPU profiling (default: 1000) --heap-prof Write a heap profile to disk on exit (.heapprofile) --heap-prof-name= Specify the name of the heap profile file --heap-prof-dir= Specify the directory where the heap profile will be saved --heap-prof-md Generate markdown heap profile on exit (for CLI analysis) --heap-prof-interval= Specify the average sampling interval in bytes for heap profiling (default: 524288) --if-present Exit without an error if the entrypoint does not exist --no-install Disable auto install in the Bun runtime --install= Configure auto-install behavior. One of "auto" (default, auto-installs when no node_modules), "fallback" (missing packages only), "force" (always). -i Auto-install dependencies during execution. Equivalent to --install=fallback. -e, --eval= Evaluate argument as a script -p, --print= Evaluate argument as a script and print the result --prefer-offline Skip staleness checks for packages in the Bun runtime and resolve from disk --prefer-latest Use the latest matching versions of packages in the Bun runtime, always checking npm --port= Set the default port for Bun.serve --conditions= Pass custom conditions to resolve --fetch-preconnect= Preconnect to a URL while code is loading --experimental-http2-fetch Offer h2 in fetch() TLS ALPN. Same as BUN_FEATURE_FLAG_EXPERIMENTAL_HTTP2_CLIENT=1 --experimental-http3-fetch Honor Alt-Svc: h3 in fetch() and upgrade to HTTP/3. Same as BUN_FEATURE_FLAG_EXPERIMENTAL_HTTP3_CLIENT=1 --max-http-header-size= Set the maximum size of HTTP headers in bytes. Default is 16KiB --insecure-http-parser Use an insecure HTTP parser that accepts invalid HTTP headers --dns-result-order= Set the default order of DNS lookup results. Valid orders: verbatim (default), ipv4first, ipv6first --experimental-stream-iter Enable the experimental stream/iter API (node:stream/iter, node:zlib/iter). --expose-gc Expose gc() on the global object. Has no effect on Bun.gc(). --no-deprecation Suppress all reporting of the custom deprecation. --throw-deprecation Determine whether or not deprecation warnings result in errors. --no-warnings Silence all process warnings --trace-warnings Show stack traces on process warnings --trace-deprecation Show stack traces on deprecations --pending-deprecation Emit pending deprecation warnings --redirect-warnings= Write process warnings to the given file instead of printing to stderr --disable-warning= Silence specific process warnings by code or type --title= Set the process title --zero-fill-buffers Boolean to force Buffer.allocUnsafe(size) to be zero-filled. --use-system-ca Use the system's trusted certificate authorities --use-openssl-ca Use OpenSSL's default CA store --use-bundled-ca Use bundled CA store --tls-min-v1.0 Set the default TLS minimum to TLSv1.0 --tls-min-v1.1 Set the default TLS minimum to TLSv1.1 --tls-min-v1.2 Set the default TLS minimum to TLSv1.2 --tls-min-v1.3 Set the default TLS minimum to TLSv1.3 --tls-max-v1.2 Set the default TLS maximum to TLSv1.2 --tls-max-v1.3 Set the default TLS maximum to TLSv1.3 --redis-preconnect Preconnect to $REDIS_URL at startup --sql-preconnect Preconnect to PostgreSQL at startup --no-addons Throw an error if process.dlopen or bun:ffi cc() is called, and disable export condition "node-addons" --no-ffi-cc Throw an error if bun:ffi cc() is called (disables the C compiler) --unhandled-rejections= One of "strict", "throw", "warn", "none", or "warn-with-error-code" --console-depth= Set the default depth for console.log object inspection (default: 2) --user-agent= Set the default User-Agent header for HTTP requests --cron-title= Title for cron execution mode --cron-period= Cron period for cron execution mode --main-fields= Main fields to lookup in package.json. Defaults to --target dependent --preserve-symlinks Preserve symlinks when resolving files --preserve-symlinks-main Preserve symlinks when resolving the main entry point --extension-order= Defaults to: .tsx,.ts,.jsx,.js,.json --tsconfig-override= Specify custom tsconfig.json. Default $cwd/tsconfig.json -d, --define= Substitute K:V while parsing, e.g. --define process.env.NODE_ENV:"development". Values are parsed as JSON. --drop= Remove function calls, e.g. --drop=console removes all console.* calls. --feature= Enable a feature flag for dead-code elimination, e.g. --feature=SUPER_SECRET -l, --loader= Parse files with .ext:loader, e.g. --loader .js:jsx. Valid loaders: js, jsx, ts, tsx, json, toml, text, file, wasm, napi --no-macros Disable macros from being executed in the bundler, transpiler and runtime --jsx-factory= Changes the function called when compiling JSX elements using the classic JSX runtime --jsx-fragment= Changes the function called when compiling JSX fragments --jsx-import-source= Declares the module specifier to be used for importing the jsx and jsxs factory functions. Default: "react" --jsx-runtime= "automatic" (default) or "classic" --jsx-side-effects Treat JSX elements as having side effects (disable pure annotations) --ignore-dce-annotations Ignore tree-shaking annotations such as @__PURE__ --env-file= Load environment variables from the specified file(s) --no-env-file Disable automatic loading of .env files --cwd= Absolute path to resolve files & entry points from. This just changes the process' cwd. -c, --config= Specify path to Bun config file. Default $cwd/bunfig.toml -h, --help Display this menu and exit (more flags in bun install --help, bun test --help, and bun build --help) Learn more about Bun: https://bun.com/docs Join our Discord community: https://bun.com/discord