initial commit

This commit is contained in:
i2p
2026-08-27 21:09:14 +00:00
commit a5b6d59437
12681 changed files with 3253832 additions and 0 deletions
+176
View File
@@ -0,0 +1,176 @@
## CLI Usage
```bash
bun add <package> <@version>
```
### Dependency Management
<ParamField path="--production" type="boolean">
Don't install devDependencies. Alias: <code>-p</code>
</ParamField>
<ParamField path="--omit" type="string">
Exclude <code>dev</code>, <code>optional</code>, or <code>peer</code> dependencies from install
</ParamField>
<ParamField path="--global" type="boolean">
Install globally. Alias: <code>-g</code>
</ParamField>
<ParamField path="--dev" type="boolean">
Add dependency to <code>devDependencies</code>. Alias: <code>-d</code>
</ParamField>
<ParamField path="--optional" type="boolean">
Add dependency to <code>optionalDependencies</code>
</ParamField>
<ParamField path="--peer" type="boolean">
Add dependency to <code>peerDependencies</code>
</ParamField>
<ParamField path="--exact" type="boolean">
Add the exact version instead of the <code>^</code> range. Alias: <code>-E</code>
</ParamField>
<ParamField path="--only-missing" type="boolean">
Only add dependencies to <code>package.json</code> if they are not already present
</ParamField>
<ParamField path="--catalog" type="string">
Add the resolved version to the root <code>package.json</code> catalog and depend on it as <code>catalog:</code>;{" "}
<code>--catalog=NAME</code> targets <code>catalogs.NAME</code>
</ParamField>
<ParamField path="--filter" type="string">
Add the package(s) to the matching workspaces instead of the current package. Alias: <code>-F</code>
</ParamField>
### Project Files & Lockfiles
<ParamField path="--yarn" type="boolean">
Write a <code>yarn.lock</code> file (yarn v1). Alias: <code>-y</code>
</ParamField>
<ParamField path="--no-save" type="boolean">
Don't update <code>package.json</code> or save a lockfile
</ParamField>
<ParamField path="--save" type="boolean" default="true">
Save to <code>package.json</code>
</ParamField>
<ParamField path="--frozen-lockfile" type="boolean">
Disallow changes to lockfile
</ParamField>
<ParamField path="--trust" type="boolean">
Add to <code>trustedDependencies</code> in the project's <code>package.json</code> and install the package(s)
</ParamField>
<ParamField path="--save-text-lockfile" type="boolean">
Save a text-based lockfile
</ParamField>
<ParamField path="--lockfile-only" type="boolean">
Generate a lockfile without installing dependencies
</ParamField>
### Installation Control
<ParamField path="--dry-run" type="boolean">
Resolve the packages but don't install them, update <code>package.json</code>, or save a lockfile (the project's own
lifecycle scripts still run)
</ParamField>
<ParamField path="--force" type="boolean">
Always request the latest versions from the registry &amp; reinstall all dependencies. Alias: <code>-f</code>
</ParamField>
<ParamField path="--no-verify" type="boolean">
Skip verifying integrity of newly downloaded packages
</ParamField>
<ParamField path="--ignore-scripts" type="boolean">
Skip lifecycle scripts for all packages, including the project's <code>package.json</code> and trusted dependencies
</ParamField>
<ParamField path="--analyze" type="boolean">
Recursively analyze &amp; install dependencies of files passed as arguments (using Bun's bundler). Alias:{" "}
<code>-a</code>
</ParamField>
### Network & Registry
<ParamField path="--ca" type="string">
Provide a Certificate Authority signing certificate
</ParamField>
<ParamField path="--cafile" type="string">
Same as <code>--ca</code>, but as a file path to the certificate
</ParamField>
<ParamField path="--registry" type="string">
Use a specific registry by default, overriding <code>.npmrc</code>, <code>bunfig.toml</code>, and environment
variables
</ParamField>
<ParamField path="--network-concurrency" type="number" default="48">
Maximum number of concurrent network requests
</ParamField>
### Performance &amp; Resource
<ParamField path="--backend" type="string">
Platform-specific optimizations for installing dependencies. Possible values: <code>clonefile</code> (default on
macOS), <code>hardlink</code> (default on Linux and Windows), <code>symlink</code>, <code>copyfile</code>
</ParamField>
<ParamField path="--concurrent-scripts" type="number">
Maximum number of concurrent jobs for lifecycle scripts (default: 2x CPU cores)
</ParamField>
### Caching
<ParamField path="--cache-dir" type="string">
Store &amp; load cached data from a specific directory path
</ParamField>
<ParamField path="--no-cache" type="boolean">
Ignore manifest cache entirely
</ParamField>
### Output &amp; Logging
<ParamField path="--silent" type="boolean">
Don't log anything
</ParamField>
<ParamField path="--verbose" type="boolean">
Excessively verbose logging
</ParamField>
<ParamField path="--no-progress" type="boolean">
Disable the progress bar
</ParamField>
<ParamField path="--no-summary" type="boolean">
Don't print a summary
</ParamField>
### Global Configuration &amp; Context
<ParamField path="--config" type="string">
Specify path to config file (<code>bunfig.toml</code>). Alias: <code>-c</code>
</ParamField>
<ParamField path="--cwd" type="string">
Set a specific current working directory
</ParamField>
### Help
<ParamField path="--help" type="boolean">
Print this help menu. Alias: <code>-h</code>
</ParamField>
+260
View File
@@ -0,0 +1,260 @@
## CLI Usage
```bash
bun build <entry points>
```
### General Configuration
<ParamField path="--production" type="boolean">
Set <code>NODE_ENV=production</code> and enable minification
</ParamField>
<ParamField path="--bytecode" type="boolean">
Use a bytecode cache when compiling
</ParamField>
<ParamField path="--target" type="string" default="browser">
Intended execution environment for the bundle. One of <code>browser</code>, <code>bun</code>, or <code>node</code>
</ParamField>
<ParamField path="--conditions" type="string">
Pass custom resolution conditions
</ParamField>
<ParamField path="--env" type="string" default="disable">
Inline environment variables into the bundle as <code>process.env.${name}</code>. To inline variables matching a
prefix, use a glob like <code>FOO_PUBLIC_*</code>
</ParamField>
### Output & File Handling
<ParamField path="--outdir" type="string" default="dist">
Output directory (used when building multiple entry points)
</ParamField>
<ParamField path="--outfile" type="string">
Write output to a specific file
</ParamField>
<ParamField path="--metafile" type="string">
Write a JSON file with metadata about the build
</ParamField>
<ParamField path="--metafile-md" type="string">
Write a markdown file with a visualization of the module graph (LLM-friendly)
</ParamField>
<ParamField path="--sourcemap" type="string" default="none">
Generate source maps. One of <code>linked</code>, <code>inline</code>, <code>external</code>, or <code>none</code>
</ParamField>
<ParamField path="--banner" type="string">
Add a banner to the output (e.g. <code>"use client"</code> for React Server Components)
</ParamField>
<ParamField path="--footer" type="string">
Add a footer to the output (e.g. <code>// built with bun!</code>)
</ParamField>
<ParamField path="--format" type="string" default="esm">
Module format of the output bundle. One of <code>esm</code>, <code>cjs</code>, or <code>iife</code>. Defaults to{" "}
<code>cjs</code> when <code>--bytecode</code> is used.
</ParamField>
### File Naming
<ParamField path="--entry-naming" type="string" default="[dir]/[name].[ext]">
Customize entry point filenames
</ParamField>
<ParamField path="--chunk-naming" type="string" default="[name]-[hash].[ext]">
Customize chunk filenames
</ParamField>
<ParamField path="--asset-naming" type="string" default="[name]-[hash].[ext]">
Customize asset filenames
</ParamField>
### Bundling Options
<ParamField path="--root" type="string">
Root directory used when bundling multiple entry points
</ParamField>
<ParamField path="--splitting" type="boolean">
Enable code splitting for shared modules
</ParamField>
<ParamField path="--public-path" type="string">
Prefix the bundler adds to import paths in bundled code
</ParamField>
<ParamField path="--external" type="string">
Exclude modules from the bundle (supports wildcards). Alias: <code>-e</code>
</ParamField>
<ParamField path="--allow-unresolved" type="string" default="*">
Allow unresolved dynamic import()/require() specifiers matching these glob patterns. Pass <code>''</code> to allow
opaque specifiers
</ParamField>
<ParamField path="--reject-unresolved" type="boolean">
Fail the build on any dynamic import()/require() specifier that cannot be resolved at build time
</ParamField>
<ParamField path="--packages" type="string" default="bundle">
How to treat dependencies: <code>external</code> or <code>bundle</code>
</ParamField>
<ParamField path="--no-bundle" type="boolean">
Transpile only — do not bundle
</ParamField>
<ParamField path="--css-chunking" type="boolean">
Chunk CSS files together to reduce duplication (only when multiple entry points import CSS)
</ParamField>
### Minification & Optimization
<ParamField path="--emit-dce-annotations" type="boolean" default="true">
Re-emit Dead Code Elimination annotations. Disabled when <code>--minify-whitespace</code> is used
</ParamField>
<ParamField path="--minify" type="boolean">
Enable all minification options
</ParamField>
<ParamField path="--minify-syntax" type="boolean">
Minify syntax and inline constants
</ParamField>
<ParamField path="--minify-whitespace" type="boolean">
Minify whitespace
</ParamField>
<ParamField path="--minify-identifiers" type="boolean">
Minify variable and function identifiers
</ParamField>
<ParamField path="--keep-names" type="boolean">
Preserve original function and class names when minifying
</ParamField>
### Development Features
<ParamField path="--watch" type="boolean">
Rebuild automatically when files change
</ParamField>
<ParamField path="--no-clear-screen" type="boolean">
Dont clear the terminal when rebuilding with <code>--watch</code>
</ParamField>
<ParamField path="--react-fast-refresh" type="boolean">
Enable React Fast Refresh transform (for development testing)
</ParamField>
<ParamField path="--react-compiler" type="boolean">
Run the React Compiler over `.jsx`/`.tsx` files, automatically memoizing components and hooks. The bundler derives the
output mode from `--target` (`browser` → client, `bun`/`node` → ssr). Experimental.
</ParamField>
### Standalone Executables
<ParamField path="--compile" type="boolean">
Generate a standalone Bun executable containing the bundle
</ParamField>
<ParamField path="--compile-exec-argv" type="string">
Prepend arguments to the standalone executables <code>execArgv</code>
</ParamField>
<ParamField path="--compile-autoload-dotenv" type="boolean" default="true">
Enable autoloading of <code>.env</code> files in the standalone executable
</ParamField>
<ParamField path="--no-compile-autoload-dotenv" type="boolean">
Disable autoloading of <code>.env</code> files in the standalone executable
</ParamField>
<ParamField path="--compile-autoload-bunfig" type="boolean" default="true">
Enable autoloading of <code>bunfig.toml</code> in the standalone executable
</ParamField>
<ParamField path="--no-compile-autoload-bunfig" type="boolean">
Disable autoloading of <code>bunfig.toml</code> in the standalone executable
</ParamField>
<ParamField path="--compile-autoload-tsconfig" type="boolean" default="false">
Enable autoloading of <code>tsconfig.json</code> at runtime in the standalone executable
</ParamField>
<ParamField path="--no-compile-autoload-tsconfig" type="boolean">
Disable autoloading of <code>tsconfig.json</code> at runtime in the standalone executable
</ParamField>
<ParamField path="--compile-autoload-package-json" type="boolean" default="false">
Enable autoloading of <code>package.json</code> at runtime in the standalone executable
</ParamField>
<ParamField path="--no-compile-autoload-package-json" type="boolean">
Disable autoloading of <code>package.json</code> at runtime in the standalone executable
</ParamField>
<ParamField path="--compile-executable-path" type="string">
Path to a Bun executable to use for cross-compilation instead of downloading
</ParamField>
<ParamField path="--asset" type="string">
Embed a file or directory into the compiled executable under its basename; a directory keeps its internal tree, so{" "}
<code>--asset ./static/public</code> embeds <code>public/...</code> (requires <code>--compile</code>)
</ParamField>
### Windows Executable Details
<ParamField path="--windows-hide-console" type="boolean">
Prevent a console window from opening when running a compiled Windows executable
</ParamField>
<ParamField path="--windows-icon" type="string">
Set an icon for the Windows executable
</ParamField>
<ParamField path="--windows-title" type="string">
Set the Windows executable product name
</ParamField>
<ParamField path="--windows-publisher" type="string">
Set the Windows executable company name
</ParamField>
<ParamField path="--windows-version" type="string">
Set the Windows executable version (e.g. <code>1.2.3.4</code>)
</ParamField>
<ParamField path="--windows-description" type="string">
Set the Windows executable description
</ParamField>
<ParamField path="--windows-copyright" type="string">
Set the Windows executable copyright notice
</ParamField>
### Experimental & App Building
<ParamField path="--app" type="boolean">
<b>(EXPERIMENTAL)</b> Build a web app for production using Bun Bake
</ParamField>
<ParamField path="--server-components" type="boolean">
<b>(EXPERIMENTAL)</b> Enable React Server Components
</ParamField>
<ParamField path="--debug-dump-server-files" type="boolean">
When <code>--app</code> is set, dump all server files to disk even for static builds
</ParamField>
<ParamField path="--debug-no-minify" type="boolean">
When <code>--app</code> is set, disable all minification
</ParamField>
+49
View File
@@ -0,0 +1,49 @@
## Usage
```bash
bunx [flags] <package>[@version] [flags and arguments for the package]
```
Execute an npm package executable (CLI). If the package isn't installed in `node_modules`, Bun installs it into a global shared cache.
### Flags
<ParamField path="--bun" type="boolean">
Force the command to run with Bun instead of Node.js, even if the executable contains a Node shebang (`#!/usr/bin/env
node`)
</ParamField>
<ParamField path="-p, --package" type="string">
Specify package to install when binary name differs from package name
</ParamField>
<ParamField path="--no-install" type="boolean">
Skip installation if package is not already installed
</ParamField>
<ParamField path="--verbose" type="boolean">
Enable verbose output during installation
</ParamField>
<ParamField path="--silent" type="boolean">
Suppress output during installation
</ParamField>
### Examples
```bash terminal icon="terminal"
# Run Prisma migrations
bunx prisma migrate
# Format a file with Prettier
bunx prettier foo.js
# Run a specific version of a package
bunx [email protected] app.js
# Use --package when binary name differs from package name
bunx -p @angular/cli ng new my-app
# Force running with Bun instead of Node.js, even if the executable contains a Node shebang
bunx --bun vite dev foo.js
```
+78
View File
@@ -0,0 +1,78 @@
## CLI Usage
```bash terminal icon="terminal"
bun init <folder?>
```
### Initialization Options
<ParamField path="--yes" type="boolean">
{" "}
Accept all default prompts without asking questions. Alias: <code>-y</code>{" "}
</ParamField>
<ParamField path="--minimal" type="boolean">
{" "}
Only initialize type definitions (skip app scaffolding). Alias: <code>-m</code>{" "}
</ParamField>
### Project Templates
<ParamField path="--react" type="string|boolean">
{" "}
Scaffold a React project. When used without a value, creates a baseline React app.
<br /> Accepts values for presets:{" "}
<ul>
{" "}
<li>
<code>tailwind</code> React app preconfigured with Tailwind CSS
</li>{" "}
<li>
<code>shadcn</code> React app with <code>@shadcn/ui</code> and Tailwind CSS
</li>{" "}
</ul>{" "}
Examples:{" "}
<pre>
<code>
bun init --react{"\n"}bun init --react=tailwind{"\n"}bun init --react=shadcn
</code>
</pre>{" "}
</ParamField>
### Output & Files
<ParamField path="(result)" type="info">
{" "}
Initializes project files and configuration for the chosen options. Exact files vary by template.{" "}
</ParamField>
### Help
<ParamField path="--help" type="boolean">
{" "}
Print this help menu. Alias: <code>-h</code>{" "}
</ParamField>
### Examples
- Accept all defaults
```bash terminal icon="terminal"
bun init -y
```
- React
```bash terminal icon="terminal"
bun init --react
```
- React + Tailwind CSS
```bash terminal icon="terminal"
bun init --react=tailwind
```
- React + @shadcn/ui
```bash terminal icon="terminal"
bun init --react=shadcn
```
+174
View File
@@ -0,0 +1,174 @@
## CLI Usage
```sh terminal icon="terminal"
bun install <name>@<version>
```
### General Configuration
<ParamField path="--config" type="string">
Specify path to config file (bunfig.toml)
</ParamField>
<ParamField path="--cwd" type="string">
Set a specific cwd
</ParamField>
### Dependency Scope & Management
<ParamField path="--production" type="boolean">
Don't install devDependencies
</ParamField>
<ParamField path="--no-save" type="boolean">
Don't update package.json or save a lockfile
</ParamField>
<ParamField path="--save" type="boolean" default="true">
Save to package.json
</ParamField>
<ParamField path="--omit" type="string">
Exclude 'dev', 'optional', or 'peer' dependencies from install
</ParamField>
<ParamField path="--only-missing" type="boolean">
Only add dependencies to package.json if they are not already present
</ParamField>
### Dependency Type & Versioning
<ParamField path="--dev" type="boolean">
Add dependency to "devDependencies"
</ParamField>
<ParamField path="--optional" type="boolean">
Add dependency to "optionalDependencies"
</ParamField>
<ParamField path="--peer" type="boolean">
Add dependency to "peerDependencies"
</ParamField>
<ParamField path="--exact" type="boolean">
Add the exact version instead of the ^ range
</ParamField>
### Lockfile Control
<ParamField path="--yarn" type="boolean">
Write a yarn.lock file (yarn v1)
</ParamField>
<ParamField path="--frozen-lockfile" type="boolean">
Disallow changes to lockfile
</ParamField>
<ParamField path="--save-text-lockfile" type="boolean">
Save a text-based lockfile
</ParamField>
<ParamField path="--lockfile-only" type="boolean">
Generate a lockfile without installing dependencies
</ParamField>
### Network & Registry Settings
<ParamField path="--ca" type="string">
Provide a Certificate Authority signing certificate
</ParamField>
<ParamField path="--cafile" type="string">
File path to Certificate Authority signing certificate
</ParamField>
<ParamField path="--registry" type="string">
Use a specific registry by default, overriding .npmrc, bunfig.toml and environment variables
</ParamField>
### Installation Process Control
<ParamField path="--dry-run" type="boolean">
Resolve dependencies but don't install packages, update package.json, or save a lockfile (the project's own lifecycle
scripts still run)
</ParamField>
<ParamField path="--force" type="boolean">
Always request the latest versions from the registry & reinstall all dependencies
</ParamField>
<ParamField path="--global" type="boolean">
Install globally
</ParamField>
<ParamField path="--backend" type="string">
Platform-specific optimizations: "clonefile", "hardlink", "symlink", "copyfile"
</ParamField>
<ParamField path="--filter" type="string">
Install packages for the matching workspaces
</ParamField>
<ParamField path="--analyze" type="boolean">
Recursively analyze & install all dependencies of files passed as arguments
</ParamField>
### Caching Options
<ParamField path="--cache-dir" type="string">
Store & load cached data from a specific directory path
</ParamField>
<ParamField path="--no-cache" type="boolean">
Ignore manifest cache entirely
</ParamField>
### Output & Logging
<ParamField path="--silent" type="boolean">
Don't log anything
</ParamField>
<ParamField path="--verbose" type="boolean">
Excessively verbose logging
</ParamField>
<ParamField path="--no-progress" type="boolean">
Disable the progress bar
</ParamField>
<ParamField path="--no-summary" type="boolean">
Don't print a summary
</ParamField>
### Security & Integrity
<ParamField path="--no-verify" type="boolean">
Skip verifying integrity of newly downloaded packages
</ParamField>
<ParamField path="--trust" type="boolean">
Add to trustedDependencies in the project's package.json and install the package(s)
</ParamField>
### Concurrency & Performance
<ParamField path="--concurrent-scripts" type="number">
Maximum number of concurrent jobs for lifecycle scripts (default: 2x CPU cores)
</ParamField>
<ParamField path="--network-concurrency" type="number" default="48">
Maximum number of concurrent network requests
</ParamField>
### Lifecycle Script Management
<ParamField path="--ignore-scripts" type="boolean">
Skip lifecycle scripts for all packages, including the project's package.json and trusted dependencies
</ParamField>
### Help Information
<ParamField path="--help" type="boolean">
Print this help menu
</ParamField>
+164
View File
@@ -0,0 +1,164 @@
# CLI Usage
```bash
bun link <packages>
```
### Installation Scope
<ParamField path="--global" type="boolean">
Install globally. Alias: <code>-g</code>
</ParamField>
### Dependency Management
<ParamField path="--production" type="boolean">
Don't install devDependencies. Alias: <code>-p</code>
</ParamField>
<ParamField path="--omit" type="string">
Exclude <code>dev</code>, <code>optional</code>, or <code>peer</code> dependencies from install
</ParamField>
### Project Files &amp; Lockfiles
<ParamField path="--yarn" type="boolean">
Write a <code>yarn.lock</code> file (yarn v1). Alias: <code>-y</code>
</ParamField>
<ParamField path="--frozen-lockfile" type="boolean">
Disallow changes to lockfile
</ParamField>
<ParamField path="--save-text-lockfile" type="boolean">
Save a text-based lockfile
</ParamField>
<ParamField path="--lockfile-only" type="boolean">
Generate a lockfile without installing dependencies
</ParamField>
<ParamField path="--no-save" type="boolean">
Has no effect. <code>bun link</code> updates <code>package.json</code> and the lockfile only with <code>--save</code>
</ParamField>
<ParamField path="--save" type="boolean">
Save to <code>package.json</code>
</ParamField>
<ParamField path="--trust" type="boolean">
Add to <code>trustedDependencies</code> in the project's <code>package.json</code> and install the package(s)
</ParamField>
### Installation Control
<ParamField path="--force" type="boolean">
Always request the latest versions from the registry &amp; reinstall all dependencies. Alias: <code>-f</code>
</ParamField>
<ParamField path="--no-verify" type="boolean">
Skip verifying integrity of newly downloaded packages
</ParamField>
<ParamField path="--backend" type="string">
Platform-specific optimizations for installing dependencies. One of <code>clonefile</code>, <code>hardlink</code>,{" "}
<code>symlink</code>, or <code>copyfile</code>
</ParamField>
<ParamField path="--linker" type="string">
Linker strategy (one of <code>isolated</code> or <code>hoisted</code>)
</ParamField>
<ParamField path="--dry-run" type="boolean">
With <code>bun link &lt;package&gt;</code>, resolve but don't install packages, update <code>package.json</code>, or
save a lockfile. Has no effect on bare <code>bun link</code>, which still registers the current package
</ParamField>
<ParamField path="--ignore-scripts" type="boolean">
Skip lifecycle scripts for all packages, including the project's <code>package.json</code> and trusted dependencies
</ParamField>
### Network &amp; Registry
<ParamField path="--ca" type="string">
Provide a Certificate Authority signing certificate
</ParamField>
<ParamField path="--cafile" type="string">
Same as <code>--ca</code>, but as a file path to the certificate
</ParamField>
<ParamField path="--registry" type="string">
Use a specific registry by default, overriding <code>.npmrc</code>, <code>bunfig.toml</code>, and environment
variables
</ParamField>
<ParamField path="--network-concurrency" type="number" default="48">
Maximum number of concurrent network requests
</ParamField>
### Performance &amp; Resource
<ParamField path="--concurrent-scripts" type="number">
Maximum number of concurrent jobs for lifecycle scripts (default: 2x CPU cores)
</ParamField>
### Caching
<ParamField path="--cache-dir" type="string">
Store &amp; load cached data from a specific directory path
</ParamField>
<ParamField path="--no-cache" type="boolean">
Ignore manifest cache entirely
</ParamField>
### Output &amp; Logging
<ParamField path="--silent" type="boolean">
Don't log anything
</ParamField>
<ParamField path="--quiet" type="boolean">
Disable the progress bar
</ParamField>
<ParamField path="--verbose" type="boolean">
Excessively verbose logging
</ParamField>
<ParamField path="--no-progress" type="boolean">
Disable the progress bar
</ParamField>
<ParamField path="--no-summary" type="boolean">
Don't print a summary
</ParamField>
### Platform Targeting
<ParamField path="--cpu" type="string">
Override CPU architecture for optional dependencies (e.g., <code>x64</code>, <code>arm64</code>, <code>*</code> for
all)
</ParamField>
<ParamField path="--os" type="string">
Override operating system for optional dependencies (e.g., <code>linux</code>, <code>darwin</code>, <code>*</code> for
all)
</ParamField>
### Global Configuration &amp; Context
<ParamField path="--config" type="string">
Specify path to config file (<code>bunfig.toml</code>). Alias: <code>-c</code>
</ParamField>
<ParamField path="--cwd" type="string">
Set a specific current working directory
</ParamField>
### Help
<ParamField path="--help" type="boolean">
Print this help menu. Alias: <code>-h</code>
</ParamField>
+144
View File
@@ -0,0 +1,144 @@
## CLI Usage
```bash terminal icon="terminal"
bun outdated <filter>
```
### General Options
<ParamField path="-c, --config" type="string">
Specify path to config file (<code>bunfig.toml</code>)
</ParamField>
<ParamField path="--cwd" type="string">
Set a specific cwd
</ParamField>
<ParamField path="-h, --help" type="boolean">
Print this help menu
</ParamField>
<ParamField path="-F, --filter" type="string">
Display outdated dependencies for each matching workspace
</ParamField>
<ParamField path="-r, --recursive" type="boolean">
Check outdated packages in all workspaces
</ParamField>
### Output & Logging
<ParamField path="--silent" type="boolean">
Don't log anything
</ParamField>
<ParamField path="--verbose" type="boolean">
Excessively verbose logging
</ParamField>
<ParamField path="--no-progress" type="boolean">
Disable the progress bar
</ParamField>
<ParamField path="--no-summary" type="boolean">
Don't print a summary
</ParamField>
### Dependency Scope & Target
<ParamField path="-p, --production" type="boolean">
Don't install devDependencies
</ParamField>
<ParamField path="--omit" type="string">
Exclude <code>dev</code>, <code>optional</code>, or <code>peer</code> dependencies from install
</ParamField>
<ParamField path="-g, --global" type="boolean">
Install globally
</ParamField>
### Lockfile & Package.json
<ParamField path="-y, --yarn" type="boolean">
Write a <code>yarn.lock</code> file (yarn v1)
</ParamField>
<ParamField path="--no-save" type="boolean">
Don't update <code>package.json</code> or save a lockfile
</ParamField>
<ParamField path="--save" type="boolean" default="true">
Save to <code>package.json</code> (true by default)
</ParamField>
<ParamField path="--frozen-lockfile" type="boolean">
Disallow changes to lockfile
</ParamField>
<ParamField path="--save-text-lockfile" type="boolean">
Save a text-based lockfile
</ParamField>
<ParamField path="--lockfile-only" type="boolean">
Generate a lockfile without installing dependencies
</ParamField>
<ParamField path="--trust" type="boolean">
Add to <code>trustedDependencies</code> in the project's <code>package.json</code> and install the package(s)
</ParamField>
### Network & Registry
<ParamField path="--ca" type="string">
Provide a Certificate Authority signing certificate
</ParamField>
<ParamField path="--cafile" type="string">
Same as <code>--ca</code>, but as a file path to the certificate
</ParamField>
<ParamField path="--registry" type="string">
Use a specific registry by default, overriding <code>.npmrc</code>, <code>bunfig.toml</code> and environment variables
</ParamField>
<ParamField path="--network-concurrency" type="number" default="48">
Maximum number of concurrent network requests (default 48)
</ParamField>
### Caching
<ParamField path="--cache-dir" type="string">
Store &amp; load cached data from a specific directory path
</ParamField>
<ParamField path="--no-cache" type="boolean">
Ignore manifest cache entirely
</ParamField>
### Execution Behavior
<ParamField path="--dry-run" type="boolean">
Has no effect. <code>bun outdated</code> is read-only
</ParamField>
<ParamField path="-f, --force" type="boolean">
Always request the latest versions from the registry &amp; reinstall all dependencies
</ParamField>
<ParamField path="--no-verify" type="boolean">
Skip verifying integrity of newly downloaded packages
</ParamField>
<ParamField path="--ignore-scripts" type="boolean">
Skip lifecycle scripts for all packages, including the project's <code>package.json</code> and trusted dependencies
</ParamField>
<ParamField path="--backend" type="string">
Platform-specific optimizations for installing dependencies. Possible values: <code>clonefile</code> (default on
macOS), <code>hardlink</code> (default on Linux and Windows), <code>symlink</code>, <code>copyfile</code>
</ParamField>
<ParamField path="--concurrent-scripts" type="number">
Maximum number of concurrent jobs for lifecycle scripts (default: 2x CPU cores)
</ParamField>
+176
View File
@@ -0,0 +1,176 @@
# CLI Usage
```bash
bun patch <package>@<version>
```
### Patch Generation
<ParamField path="--commit" type="boolean">
Install a package containing modifications in <code>dir</code>
</ParamField>
<ParamField path="--patches-dir" type="string">
The directory to put the patch file in (only if --commit is used)
</ParamField>
### Dependency Management
<ParamField path="--production" type="boolean">
Don't install devDependencies. Alias: <code>-p</code>
</ParamField>
<ParamField path="--ignore-scripts" type="boolean">
Skip lifecycle scripts for all packages, including the project's <code>package.json</code> and trusted dependencies
</ParamField>
<ParamField path="--trust" type="boolean">
Add to <code>trustedDependencies</code> in the project's <code>package.json</code> and install the package(s)
</ParamField>
<ParamField path="--global" type="boolean">
Install globally. Alias: <code>-g</code>
</ParamField>
<ParamField path="--omit" type="string">
Exclude <code>dev</code>, <code>optional</code>, or <code>peer</code> dependencies from install
</ParamField>
### Project Files &amp; Lockfiles
<ParamField path="--yarn" type="boolean">
Write a <code>yarn.lock</code> file (yarn v1). Alias: <code>-y</code>
</ParamField>
<ParamField path="--no-save" type="boolean">
Don't update <code>package.json</code> or save a lockfile
</ParamField>
<ParamField path="--save" type="boolean" default="true">
Save to <code>package.json</code> (true by default)
</ParamField>
<ParamField path="--frozen-lockfile" type="boolean">
Disallow changes to lockfile
</ParamField>
<ParamField path="--save-text-lockfile" type="boolean">
Save a text-based lockfile
</ParamField>
<ParamField path="--lockfile-only" type="boolean">
Generate a lockfile without installing dependencies
</ParamField>
### Installation Control
<ParamField path="--backend" type="string">
Platform-specific optimizations for installing dependencies. Possible values: <code>clonefile</code> (default on
macOS), <code>hardlink</code> (default on Linux and Windows), <code>symlink</code>, <code>copyfile</code>
</ParamField>
<ParamField path="--linker" type="string">
Linker strategy (one of <code>isolated</code> or <code>hoisted</code>)
</ParamField>
<ParamField path="--minimum-release-age" type="number">
Only install packages published at least N seconds ago (security feature)
</ParamField>
<ParamField path="--dry-run" type="boolean">
Don't install packages, update <code>package.json</code>, or save a lockfile. The package is still copied into{" "}
<code>node_modules</code> for patching, and <code>--commit</code> still writes the patch file
</ParamField>
<ParamField path="--force" type="boolean">
Always request the latest versions from the registry &amp; reinstall all dependencies. Alias: <code>-f</code>
</ParamField>
<ParamField path="--no-verify" type="boolean">
Skip verifying integrity of newly downloaded packages
</ParamField>
### Network &amp; Registry
<ParamField path="--ca" type="string">
Provide a Certificate Authority signing certificate
</ParamField>
<ParamField path="--cafile" type="string">
Same as <code>--ca</code>, but as a file path to the certificate
</ParamField>
<ParamField path="--registry" type="string">
Use a specific registry by default, overriding <code>.npmrc</code>, <code>bunfig.toml</code>, and environment
variables
</ParamField>
<ParamField path="--network-concurrency" type="number" default="48">
Maximum number of concurrent network requests (default 48)
</ParamField>
### Performance &amp; Resource
<ParamField path="--concurrent-scripts" type="number">
Maximum number of concurrent jobs for lifecycle scripts (default: 2x CPU cores)
</ParamField>
### Caching
<ParamField path="--cache-dir" type="string">
Store &amp; load cached data from a specific directory path
</ParamField>
<ParamField path="--no-cache" type="boolean">
Ignore manifest cache entirely
</ParamField>
### Output &amp; Logging
<ParamField path="--silent" type="boolean">
Don't log anything
</ParamField>
<ParamField path="--quiet" type="boolean">
Disable the progress bar
</ParamField>
<ParamField path="--verbose" type="boolean">
Excessively verbose logging
</ParamField>
<ParamField path="--no-progress" type="boolean">
Disable the progress bar
</ParamField>
<ParamField path="--no-summary" type="boolean">
Don't print a summary
</ParamField>
### Platform Targeting
<ParamField path="--cpu" type="string">
Override CPU architecture for optional dependencies (e.g., <code>x64</code>, <code>arm64</code>, <code>*</code> for
all)
</ParamField>
<ParamField path="--os" type="string">
Override operating system for optional dependencies (e.g., <code>linux</code>, <code>darwin</code>, <code>*</code> for
all)
</ParamField>
### Global Configuration &amp; Context
<ParamField path="--config" type="string">
Specify path to config file (<code>bunfig.toml</code>). Alias: <code>-c</code>
</ParamField>
<ParamField path="--cwd" type="string">
Set a specific current working directory
</ParamField>
### Help
<ParamField path="--help" type="boolean">
Print this help menu. Alias: <code>-h</code>
</ParamField>
+204
View File
@@ -0,0 +1,204 @@
## CLI Usage
```bash terminal icon="terminal"
bun publish dist
```
### Publishing Options
<ParamField path="--access" type="string">
Set the access level of the package being published, either `public` or `restricted`. Unscoped packages are always public; publishing an unscoped package with `--access restricted` is an error.
```sh terminal icon="terminal"
bun publish --access public
```
You can also set `--access` in the `publishConfig` field of your `package.json`.
```json package.json icon="file-json"
{
"publishConfig": {
"access": "restricted" // [!code ++]
}
}
```
</ParamField>
<ParamField path="--tag" type="string" default="latest">
Set the tag of the package version being published. By default, the tag is `latest`. The initial version of a package is always given the `latest` tag in addition to the specified tag.
```sh terminal icon="terminal"
bun publish --tag alpha
```
You can also set `--tag` in the `publishConfig` field of your `package.json`.
```json package.json icon="file-json"
{
"publishConfig": {
"tag": "next" // [!code ++]
}
}
```
</ParamField>
<ParamField path="--dry-run" type="boolean">
Simulate the publish process without publishing the package, to verify its contents first.
```sh
bun publish --dry-run
```
</ParamField>
<ParamField path="--tolerate-republish" type="boolean">
`bun publish` exits with code 0 instead of 1 when the version being published already exists in the registry.
</ParamField>
<ParamField path="--gzip-level" type="string" default="9">
Specify the level of gzip compression to use when packing the package. Only applies to `bun publish` without a tarball
path argument. Values range from `0` to `9` (default is `9`).
</ParamField>
<ParamField path="--auth-type" type="string" default="web">
If you have 2FA enabled for your npm account, `bun publish` prompts you for a one-time password, either through a browser or the CLI. `--auth-type` tells the npm registry which method you prefer: `web` (the default) or `legacy`.
```sh terminal icon="terminal"
bun publish --auth-type legacy
...
This operation requires a one-time password.
Enter OTP: 123456
...
```
</ParamField>
<ParamField path="--otp" type="string">
Provide a one-time password directly to the CLI. A valid password skips the extra one-time password prompt before publishing.
```sh terminal icon="terminal"
bun publish --otp 123456
```
<Note>
`bun publish` respects the `NPM_CONFIG_TOKEN` environment variable, so you can publish from GitHub Actions or other
automated workflows.
</Note>
</ParamField>
### Registry Configuration
#### Custom Registry
<ParamField path="--registry" type="string">
Use a specific registry by default, overriding .npmrc, bunfig.toml and environment variables. A registry configured
for the package's scope (`@scope:registry=` in .npmrc or `[install.scopes]` in bunfig.toml) still takes precedence.
</ParamField>
```bash
bun publish --registry https://my-private-registry.com
```
#### SSL Certificates
<ParamField path="--ca" type="string">
Provide Certificate Authority signing certificate
</ParamField>
<ParamField path="--cafile" type="string">
Path to Certificate Authority certificate file
</ParamField>
<CodeGroup>
```bash Inline Certificate
bun publish --ca "-----BEGIN CERTIFICATE-----..."
```
```bash Certificate File
bun publish --cafile ./ca-cert.pem
```
</CodeGroup>
### General Options
#### Dependency Management
<ParamField path="-p, --production" type="boolean">
Don't install devDependencies
</ParamField>
<ParamField path="--omit" type="string">
Exclude dependency types: `dev`, `optional`, or `peer`
</ParamField>
<ParamField path="-f, --force" type="boolean">
Always request the latest versions from the registry & reinstall all dependencies
</ParamField>
#### Script Control
<ParamField path="--ignore-scripts" type="boolean">
Skip lifecycle scripts during packing and publishing
</ParamField>
<ParamField path="--trust" type="boolean">
Add packages to trustedDependencies and run their scripts
</ParamField>
<Note>
**Lifecycle Scripts** — When you publish a pre-built tarball, Bun does not run lifecycle scripts such as
`prepublishOnly` and `prepack`; they only run when Bun packs the package itself.
</Note>
#### File Management
<ParamField path="--no-save" type="boolean">
Don't update package.json or lockfile
</ParamField>
<ParamField path="--frozen-lockfile" type="boolean">
Disallow changes to lockfile
</ParamField>
<ParamField path="--yarn" type="boolean">
Generate yarn.lock file (yarn v1 compatible)
</ParamField>
#### Performance
<ParamField path="--backend" type="string">
Platform optimizations: `clonefile` (default on macOS), `hardlink` (default on Linux and Windows), `symlink`, or
`copyfile`
</ParamField>
<ParamField path="--network-concurrency" type="number" default="48">
Maximum concurrent network requests
</ParamField>
<ParamField path="--concurrent-scripts" type="number">
Maximum concurrent lifecycle scripts (default: 2x CPU cores)
</ParamField>
#### Output Control
<ParamField path="--silent" type="boolean">
Suppress all output
</ParamField>
<ParamField path="--verbose" type="boolean">
Show detailed logging
</ParamField>
<ParamField path="--no-progress" type="boolean">
Hide progress bar
</ParamField>
<ParamField path="--no-summary" type="boolean">
Don't print publish summary
</ParamField>
+151
View File
@@ -0,0 +1,151 @@
## CLI Usage
```bash terminal icon="terminal"
bun remove <package>
```
### General Information
<ParamField path="--help" type="boolean">
Print this help menu. Alias: <code>-h</code>
</ParamField>
### Configuration
<ParamField path="--config" type="string">
Specify path to config file (<code>bunfig.toml</code>). Alias: <code>-c</code>
</ParamField>
### Package.json Interaction
<ParamField path="--no-save" type="boolean">
Don't update <code>package.json</code> or save a lockfile
</ParamField>
<ParamField path="--save" type="boolean" default="true">
Save to <code>package.json</code> (true by default)
</ParamField>
<ParamField path="--trust" type="boolean">
Add to <code>trustedDependencies</code> in the project's <code>package.json</code> and install the package(s)
</ParamField>
<ParamField path="--filter" type="string">
Remove the package(s) from the matching workspaces instead of the current package. Alias: <code>-F</code>
</ParamField>
### Lockfile Behavior
<ParamField path="--yarn" type="boolean">
Write a <code>yarn.lock</code> file (yarn v1). Alias: <code>-y</code>
</ParamField>
<ParamField path="--frozen-lockfile" type="boolean">
Disallow changes to lockfile
</ParamField>
<ParamField path="--save-text-lockfile" type="boolean">
Save a text-based lockfile
</ParamField>
<ParamField path="--lockfile-only" type="boolean">
Generate a lockfile without installing dependencies
</ParamField>
### Dependency Filtering
<ParamField path="--production" type="boolean">
Don't install devDependencies. Alias: <code>-p</code>
</ParamField>
<ParamField path="--omit" type="string">
Exclude <code>dev</code>, <code>optional</code>, or <code>peer</code> dependencies from install
</ParamField>
### Network & Registry
<ParamField path="--ca" type="string">
Provide a Certificate Authority signing certificate
</ParamField>
<ParamField path="--cafile" type="string">
Same as <code>--ca</code>, but as a file path to the certificate
</ParamField>
<ParamField path="--registry" type="string">
Use a specific registry by default, overriding <code>.npmrc</code>, <code>bunfig.toml</code> and environment variables
</ParamField>
### Execution Control & Validation
<ParamField path="--dry-run" type="boolean">
Resolve the change but don't remove packages, update <code>package.json</code>, or save a lockfile (the project's own
lifecycle scripts still run)
</ParamField>
<ParamField path="--force" type="boolean">
Always request the latest versions from the registry &amp; reinstall all dependencies. Alias: <code>-f</code>
</ParamField>
<ParamField path="--no-verify" type="boolean">
Skip verifying integrity of newly downloaded packages
</ParamField>
### Output & Logging
<ParamField path="--silent" type="boolean">
Don't log anything
</ParamField>
<ParamField path="--verbose" type="boolean">
Excessively verbose logging
</ParamField>
<ParamField path="--no-progress" type="boolean">
Disable the progress bar
</ParamField>
<ParamField path="--no-summary" type="boolean">
Don't print a summary
</ParamField>
### Caching
<ParamField path="--cache-dir" type="string">
Store &amp; load cached data from a specific directory path
</ParamField>
<ParamField path="--no-cache" type="boolean">
Ignore manifest cache entirely
</ParamField>
### Script Execution
<ParamField path="--ignore-scripts" type="boolean">
Skip lifecycle scripts for all packages, including the project's <code>package.json</code> and trusted dependencies
</ParamField>
<ParamField path="--concurrent-scripts" type="number">
Maximum number of concurrent jobs for lifecycle scripts (default: 2x CPU cores)
</ParamField>
### Scope & Path
<ParamField path="--global" type="boolean">
Install globally. Alias: <code>-g</code>
</ParamField>
<ParamField path="--cwd" type="string">
Set a specific cwd
</ParamField>
### Advanced & Performance
<ParamField path="--backend" type="string">
Platform-specific optimizations for installing dependencies. Possible values: <code>clonefile</code> (default on
macOS), <code>hardlink</code> (default on Linux and Windows), <code>symlink</code>, <code>copyfile</code>
</ParamField>
<ParamField path="--network-concurrency" type="number" default="48">
Maximum number of concurrent network requests (default 48)
</ParamField>
+316
View File
@@ -0,0 +1,316 @@
# CLI Usage
```bash
bun run <file or script>
```
### General Execution Options
<ParamField path="--silent" type="boolean">
Don't print the script command
</ParamField>
<ParamField path="--if-present" type="boolean">
Exit without an error if the entrypoint does not exist
</ParamField>
<ParamField path="--eval" type="string">
Evaluate argument as a script. Alias: <code>-e</code>
</ParamField>
<ParamField path="--print" type="string">
Evaluate argument as a script and print the result. Alias: <code>-p</code>
</ParamField>
<ParamField path="--help" type="boolean">
Display this menu and exit. Alias: <code>-h</code>
</ParamField>
### Workspace Management
<ParamField path="--elide-lines" type="number" default="10">
Number of lines of script output shown when using --filter (default: 10). Set to 0 to show all lines
</ParamField>
<ParamField path="--filter" type="string">
Run a script in all workspace packages matching the pattern. Alias: <code>-F</code>
</ParamField>
<ParamField path="--workspaces" type="boolean">
Run a script in all workspace packages (from the <code>workspaces</code> field in <code>package.json</code>)
</ParamField>
<ParamField path="--parallel" type="boolean">
Run multiple scripts or workspace scripts concurrently with prefixed output
</ParamField>
<ParamField path="--sequential" type="boolean">
Run multiple scripts or workspace scripts one after another with prefixed output
</ParamField>
<ParamField path="--no-exit-on-error" type="boolean">
When using <code>--parallel</code> or <code>--sequential</code>, continue running other scripts when one fails
</ParamField>
### Runtime &amp; Process Control
<ParamField path="--bun" type="boolean">
Force a script or package to use Bun's runtime instead of Node.js (via symlinking node). Alias: <code>-b</code>
</ParamField>
<ParamField path="--shell" type="string">
Control the shell used for <code>package.json</code> scripts. Supports either <code>bun</code> or <code>system</code>
</ParamField>
<ParamField path="--interactive" type="boolean">
Open the Node.js-compatible REPL (<code>node:repl</code>). When combined with <code>-e</code>, starts the REPL and
then evaluates the script. Under <code>--interactive</code>, <code>-e</code> is raw JavaScript (matching{" "}
<code>node -i -e</code>). Use <code>bun repl</code> for TypeScript. Distinct from <code>bun repl</code>, which is
Bun's native REPL.
</ParamField>
<ParamField path="--smol" type="boolean">
Use less memory, but run garbage collection more often
</ParamField>
<ParamField path="--expose-gc" type="boolean">
Expose <code>gc()</code> on the global object. Has no effect on <code>Bun.gc()</code>
</ParamField>
<ParamField path="--no-deprecation" type="boolean">
Silence all deprecation warnings
</ParamField>
<ParamField path="--throw-deprecation" type="boolean">
Throw deprecation warnings as errors
</ParamField>
<ParamField path="--title" type="string">
Set the process title
</ParamField>
<ParamField path="--zero-fill-buffers" type="boolean">
Force <code>Buffer.allocUnsafe(size)</code> to be zero-filled
</ParamField>
<ParamField path="--no-addons" type="boolean">
Throw an error if <code>process.dlopen</code> is called, and disable export condition <code>node-addons</code>
</ParamField>
<ParamField path="--unhandled-rejections" type="string">
One of <code>strict</code>, <code>throw</code>, <code>warn</code>, <code>none</code>, or{" "}
<code>warn-with-error-code</code>
</ParamField>
<ParamField path="--console-depth" type="number" default="2">
Set the default depth for <code>console.log</code> object inspection (default: 2)
</ParamField>
### Development Workflow
<ParamField path="--watch" type="boolean">
Automatically restart the process on file change
</ParamField>
<ParamField path="--watch-kill-signal" type="string" default="SIGTERM">
Signal whose handlers run when --watch restarts the process
</ParamField>
<ParamField path="--hot" type="boolean">
Enable auto reload in the Bun runtime, test runner, or bundler
</ParamField>
<ParamField path="--no-clear-screen" type="boolean">
Disable clearing the terminal screen on reload when --hot or --watch is enabled
</ParamField>
### Debugging
<ParamField path="--inspect" type="string">
Activate Bun's debugger
</ParamField>
<ParamField path="--inspect-wait" type="string">
Activate Bun's debugger, wait for a connection before executing
</ParamField>
<ParamField path="--inspect-brk" type="string">
Activate Bun's debugger, set breakpoint on first line of code and wait
</ParamField>
### Dependency &amp; Module Resolution
<ParamField path="--preload" type="string">
Import a module before Bun loads other modules. Alias: <code>-r</code>
</ParamField>
<ParamField path="--require" type="string">
Alias of --preload, for Node.js compatibility
</ParamField>
<ParamField path="--import" type="string">
Alias of --preload, for Node.js compatibility
</ParamField>
<ParamField path="--no-install" type="boolean">
Disable auto install in the Bun runtime
</ParamField>
<ParamField path="--install" type="string" default="auto">
Configure auto-install behavior. One of <code>auto</code> (default, auto-installs when no node_modules),{" "}
<code>fallback</code> (missing packages only), <code>force</code> (always)
</ParamField>
<ParamField path="-i" type="boolean">
Auto-install dependencies during execution. Equivalent to --install=fallback
</ParamField>
<ParamField path="--prefer-offline" type="boolean">
Skip staleness checks for packages in the Bun runtime and resolve from disk
</ParamField>
<ParamField path="--prefer-latest" type="boolean">
Use the latest matching versions of packages in the Bun runtime, always checking npm
</ParamField>
<ParamField path="--conditions" type="string">
Pass custom conditions to resolve
</ParamField>
<ParamField path="--main-fields" type="string">
Main fields to lookup in <code>package.json</code>
</ParamField>
<ParamField path="--preserve-symlinks" type="boolean">
Preserve symlinks when resolving files
</ParamField>
<ParamField path="--preserve-symlinks-main" type="boolean">
Preserve symlinks when resolving the main entry point
</ParamField>
<ParamField path="--extension-order" type="string" default=".tsx,.ts,.jsx,.cts,.cjs,.js,.mjs,.mts,.json,.node">
Defaults to: <code>.tsx,.ts,.jsx,.cts,.cjs,.js,.mjs,.mts,.json,.node</code>
</ParamField>
### Transpilation &amp; Language Features
<ParamField path="--tsconfig-override" type="string">
Specify custom <code>tsconfig.json</code>. Default <code>$cwd/tsconfig.json</code>
</ParamField>
<ParamField path="--define" type="string">
Substitute K:V while parsing, e.g. <code>--define process.env.NODE_ENV:"development"</code>. Bun parses values as
JSON. Alias: <code>-d</code>
</ParamField>
<ParamField path="--drop" type="string">
Remove function calls, e.g. <code>--drop=console</code> removes all <code>console.*</code> calls
</ParamField>
<ParamField path="--loader" type="string">
Parse files with <code>.ext:loader</code>, e.g. <code>--loader .js:jsx</code>. Valid loaders: <code>js</code>,{" "}
<code>jsx</code>, <code>ts</code>, <code>tsx</code>, <code>json</code>, <code>toml</code>, <code>text</code>,{" "}
<code>file</code>, <code>wasm</code>, <code>napi</code>. Alias: <code>-l</code>
</ParamField>
<ParamField path="--no-macros" type="boolean">
Disable macro execution in the bundler, transpiler and runtime
</ParamField>
<ParamField path="--jsx-factory" type="string">
Changes the function called when compiling JSX elements using the classic JSX runtime
</ParamField>
<ParamField path="--jsx-fragment" type="string">
Changes the function called when compiling JSX fragments
</ParamField>
<ParamField path="--jsx-import-source" type="string" default="react">
Declares the module specifier used to import the jsx and jsxs factory functions. Default: <code>react</code>
</ParamField>
<ParamField path="--jsx-runtime" type="string" default="automatic">
<code>automatic</code> (default) or <code>classic</code>
</ParamField>
<ParamField path="--jsx-side-effects" type="boolean">
Treat JSX elements as having side effects (disable pure annotations)
</ParamField>
<ParamField path="--ignore-dce-annotations" type="boolean">
Ignore tree-shaking annotations such as <code>@__PURE__</code>
</ParamField>
### Networking &amp; Security
<ParamField path="--port" type="number">
Set the default port for <code>Bun.serve</code>
</ParamField>
<ParamField path="--fetch-preconnect" type="string">
Preconnect to a URL while code is loading
</ParamField>
<ParamField path="--max-http-header-size" type="number" default="16384">
Set the maximum size of HTTP headers in bytes. Default is 16KiB
</ParamField>
<ParamField path="--dns-result-order" type="string" default="verbatim">
Set the default order of DNS lookup results. Valid orders: <code>verbatim</code> (default), <code>ipv4first</code>,{" "}
<code>ipv6first</code>
</ParamField>
<ParamField path="--use-system-ca" type="boolean">
Use the system's trusted certificate authorities
</ParamField>
<ParamField path="--use-openssl-ca" type="boolean">
Use OpenSSL's default CA store
</ParamField>
<ParamField path="--use-bundled-ca" type="boolean">
Use bundled CA store
</ParamField>
<ParamField path="--redis-preconnect" type="boolean">
Preconnect to <code>$REDIS_URL</code> at startup
</ParamField>
<ParamField path="--sql-preconnect" type="boolean">
Preconnect to PostgreSQL at startup
</ParamField>
<ParamField path="--user-agent" type="string">
Set the default User-Agent header for HTTP requests
</ParamField>
### Global Configuration &amp; Context
<ParamField path="--env-file" type="string">
Load environment variables from the specified file(s)
</ParamField>
<ParamField path="--cwd" type="string">
Absolute path to resolve files &amp; entrypoints from. This only changes the process' cwd
</ParamField>
<ParamField path="--config" type="string">
Specify path to Bun config file. Default <code>$cwd/bunfig.toml</code>. Alias: <code>-c</code>
</ParamField>
## Examples
Run a JavaScript or TypeScript file:
```bash
bun run ./index.js
bun run ./index.tsx
```
Run a package.json script:
```bash
bun run dev
bun run lint
```
+104
View File
@@ -0,0 +1,104 @@
# CLI Usage
```bash
bun test <patterns>
```
### Execution Control
<ParamField path="--timeout" type="number" default="5000">
Set the per-test timeout in milliseconds (default 5000)
</ParamField>
<ParamField path="--rerun-each" type="number">
Re-run each test file <code>NUMBER</code> times to help catch certain bugs
</ParamField>
<ParamField path="--retry" type="number">
Retry failed tests up to <code>NUMBER</code> times. Per-test <code>{`{ retry: N }`}</code> overrides this flag
</ParamField>
<ParamField path="--concurrent" type="boolean">
Treat all tests as <code>test.concurrent()</code> tests
</ParamField>
<ParamField path="--randomize" type="boolean">
Run tests in random order
</ParamField>
<ParamField path="--seed" type="number">
Set the random seed for test randomization
</ParamField>
<ParamField path="--bail" type="number">
Exit the test suite after <code>NUMBER</code> failures. If you do not specify a number, it defaults to 1.
</ParamField>
<ParamField path="--max-concurrency" type="number" default="20">
Maximum number of concurrent tests to execute at once (default 20)
</ParamField>
### Test Filtering
<ParamField path="--todo" type="boolean">
Include tests that are marked with <code>test.todo()</code>
</ParamField>
<ParamField path="--test-name-pattern" type="string">
Run only tests with a name that matches the given regex. Alias: <code>-t</code>
</ParamField>
### Reporting
<ParamField path="--reporter" type="string">
Test output reporter format. Available: <code>junit</code> (requires --reporter-outfile), <code>dots</code>. Default:
console output.
</ParamField>
<ParamField path="--reporter-outfile" type="string">
Output file path for the reporter format (required with --reporter=junit)
</ParamField>
<ParamField path="--dots" type="boolean">
Enable dots reporter. Shorthand for --reporter=dots
</ParamField>
### Coverage
<ParamField path="--coverage" type="boolean">
Generate a coverage profile
</ParamField>
<ParamField path="--coverage-reporter" type="string" default="text">
Report coverage in <code>text</code> and/or <code>lcov</code>. Defaults to <code>text</code>
</ParamField>
<ParamField path="--coverage-dir" type="string" default="coverage">
Directory for coverage files. Defaults to <code>coverage</code>
</ParamField>
### Snapshots
<ParamField path="--update-snapshots" type="boolean">
Update snapshot files. Alias: <code>-u</code>
</ParamField>
## Examples
Run all test files:
```bash terminal icon="terminal"
bun test
```
Run all test files with "foo" or "bar" in the file name:
```bash terminal icon="terminal"
bun test foo bar
```
Run all test files, only including tests whose name includes "baz":
```bash terminal icon="terminal"
bun test --test-name-pattern baz
```
+155
View File
@@ -0,0 +1,155 @@
## CLI Usage
```bash terminal icon="terminal"
bun update [<name>[@<version>] | <pattern>]...
bun up
```
### Update Strategy
<ParamField path="--force" type="boolean">
Always request the latest versions from the registry &amp; reinstall all dependencies. Alias: <code>-f</code>
</ParamField>
<ParamField path="--latest" type="boolean">
Update packages to their latest versions. Alias: <code>-L</code>
</ParamField>
### Dependency Scope
<ParamField path="--dev" type="boolean">
Only update <code>devDependencies</code>. Alias: <code>-D</code>
</ParamField>
<ParamField path="--prod" type="boolean">
Only update <code>dependencies</code> and <code>optionalDependencies</code>. Aliases: <code>-P</code>,{" "}
<code>--production</code>
</ParamField>
<ParamField path="--no-optional" type="boolean">
Don't update <code>optionalDependencies</code>
</ParamField>
<ParamField path="--global" type="boolean">
Install globally. Alias: <code>-g</code>
</ParamField>
<ParamField path="--omit" type="string">
Exclude <code>dev</code>, <code>optional</code>, or <code>peer</code> dependencies from install
</ParamField>
### Project File Management
<ParamField path="--yarn" type="boolean">
Write a <code>yarn.lock</code> file (yarn v1). Alias: <code>-y</code>
</ParamField>
<ParamField path="--no-save" type="boolean">
Don't update <code>package.json</code> or save a lockfile
</ParamField>
<ParamField path="--save" type="boolean" default="true">
Save to <code>package.json</code> (true by default)
</ParamField>
<ParamField path="--frozen-lockfile" type="boolean">
Disallow changes to lockfile
</ParamField>
<ParamField path="--save-text-lockfile" type="boolean">
Save a text-based lockfile
</ParamField>
<ParamField path="--lockfile-only" type="boolean">
Generate a lockfile without installing dependencies
</ParamField>
### Network & Registry
<ParamField path="--ca" type="string">
Provide a Certificate Authority signing certificate
</ParamField>
<ParamField path="--cafile" type="string">
Same as <code>--ca</code>, but as a file path to the certificate
</ParamField>
<ParamField path="--registry" type="string">
Use a specific registry by default, overriding <code>.npmrc</code>, <code>bunfig.toml</code> and environment variables
</ParamField>
<ParamField path="--network-concurrency" type="number" default="48">
Maximum number of concurrent network requests (default 48)
</ParamField>
### Caching
<ParamField path="--cache-dir" type="string">
Store &amp; load cached data from a specific directory path
</ParamField>
<ParamField path="--no-cache" type="boolean">
Ignore manifest cache entirely
</ParamField>
### Output & Logging
<ParamField path="--silent" type="boolean">
Don't log anything
</ParamField>
<ParamField path="--verbose" type="boolean">
Excessively verbose logging
</ParamField>
<ParamField path="--no-progress" type="boolean">
Disable the progress bar
</ParamField>
<ParamField path="--no-summary" type="boolean">
Don't print a summary
</ParamField>
### Script Execution
<ParamField path="--ignore-scripts" type="boolean">
Skip lifecycle scripts for all packages, including the project's <code>package.json</code> and trusted dependencies
</ParamField>
<ParamField path="--concurrent-scripts" type="number">
Maximum number of concurrent jobs for lifecycle scripts (default: 2x CPU cores)
</ParamField>
### Installation Controls
<ParamField path="--no-verify" type="boolean">
Skip verifying integrity of newly downloaded packages
</ParamField>
<ParamField path="--trust" type="boolean">
Add to <code>trustedDependencies</code> in the project's <code>package.json</code> and install the package(s)
</ParamField>
<ParamField path="--backend" type="string">
Platform-specific optimizations for installing dependencies. Possible values: <code>clonefile</code> (default on
macOS), <code>hardlink</code> (default on Linux and Windows), <code>symlink</code>, <code>copyfile</code>
</ParamField>
### General & Environment
<ParamField path="--config" type="string">
Specify path to config file (<code>bunfig.toml</code>). Alias: <code>-c</code>
</ParamField>
<ParamField path="--dry-run" type="boolean">
Resolve updates but don't install packages, update <code>package.json</code>, or save a lockfile (the project's own
lifecycle scripts still run)
</ParamField>
<ParamField path="--cwd" type="string">
Set a specific cwd
</ParamField>
<ParamField path="--help" type="boolean">
Print this help menu. Alias: <code>-h</code>
</ParamField>