bun¶
Bun ¶
Bases: Tool[_R]
Classes:
| Name | Description |
|---|---|
Add |
|
Build |
|
Install |
|
Remove |
|
Run |
|
Test |
|
X |
|
Methods:
| Name | Description |
|---|---|
__call__ |
Bun is a fast JavaScript runtime, package manager, bundler, and test runner. |
flags |
Bind tool-level global options before the subcommand. |
Attributes:
| Name | Type | Description |
|---|---|---|
add |
Add[_R]
|
|
build |
Build[_R]
|
|
install |
Install[_R]
|
|
remove |
Remove[_R]
|
|
run |
Run[_R]
|
|
test |
Test[_R]
|
|
x |
X[_R]
|
|
argv |
Bun[Argv]
|
|
Add ¶
Bases: Tool[_R2]
Methods:
| Name | Description |
|---|---|
__call__ |
Alias: bun a |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
Add[Argv]
|
|
__call__ ¶
__call__(*args: str | PathLike[str], analyze: Flag = ..., backend: Value = ..., ca: Value = ..., cache_dir: Value = ..., cafile: Value = ..., catalog: Value = ..., concurrent_scripts: Value = ..., config: Value = ..., cpu: Value = ..., cwd: Value = ..., dev: Flag = ..., dry_run: Flag = ..., exact: Flag = ..., filter: Value = ..., force: Flag = ..., frozen_lockfile: Flag = ..., global_: Flag = ..., ignore_scripts: Flag = ..., linker: Value = ..., lockfile_only: Flag = ..., minimum_release_age: Value = ..., network_concurrency: Value = ..., no_cache: Flag = ..., no_progress: Flag = ..., no_summary: Flag = ..., no_verify: Flag = ..., omit: Value = ..., only_missing: Flag = ..., optional: Flag = ..., os: Value = ..., peer: Flag = ..., production: Flag = ..., quiet: Flag = ..., registry: Value = ..., save: Flag = ..., save_text_lockfile: Flag = ..., silent: Flag = ..., trust: Flag = ..., verbose: Flag = ..., yarn: Flag = ..., **flags: Any) -> _R2
Alias: bun a
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
analyze
|
Flag
|
Recursively analyze & install dependencies of files passed as arguments (using Bun's bundler). |
...
|
backend
|
Value
|
Platform-specific optimizations for installing dependencies. |
...
|
ca
|
Value
|
Provide a Certificate Authority signing certificate. |
...
|
cache_dir
|
Value
|
Store & load cached data from a specific directory path. |
...
|
cafile
|
Value
|
The same as |
...
|
catalog
|
Value
|
Add the resolved version to the root package.json catalog and depend on it as "catalog:" (use --catalog=NAME for a named catalog). Added in 1.4.0. |
...
|
concurrent_scripts
|
Value
|
Maximum number of concurrent jobs for lifecycle scripts. Defaults to |
...
|
config
|
Value
|
Specify path to config file (bunfig.toml). |
...
|
cpu
|
Value
|
Override CPU architecture for optional dependencies (e.g., x64, arm64, * for all). |
...
|
cwd
|
Value
|
Set a specific cwd. |
...
|
dev
|
Flag
|
Add dependency to "devDependencies". |
...
|
dry_run
|
Flag
|
Perform a dry run without making changes. |
...
|
exact
|
Flag
|
Add the exact version instead of the ^range. |
...
|
filter
|
Value
|
Add the package(s) to the matching workspaces instead of the current package. Added in 1.4.0. |
...
|
force
|
Flag
|
Always request the latest versions from the registry & reinstall all dependencies. |
...
|
frozen_lockfile
|
Flag
|
Disallow changes to lockfile. |
...
|
global_
|
Flag
|
Install globally. |
...
|
ignore_scripts
|
Flag
|
Skip lifecycle scripts in the project's package.json (dependency scripts are never run). |
...
|
linker
|
Value
|
Linker strategy (one of "isolated" or "hoisted"). |
...
|
lockfile_only
|
Flag
|
Generate a lockfile without installing dependencies. |
...
|
minimum_release_age
|
Value
|
Only install packages published at least N seconds ago (security feature). |
...
|
network_concurrency
|
Value
|
Maximum number of concurrent network requests. Defaults to |
...
|
no_cache
|
Flag
|
Ignore manifest cache entirely. |
...
|
no_progress
|
Flag
|
Disable the progress bar. |
...
|
no_summary
|
Flag
|
Don't print a summary. |
...
|
no_verify
|
Flag
|
Skip verifying integrity of newly downloaded packages. |
...
|
omit
|
Value
|
Exclude 'dev', 'optional', or 'peer' dependencies from install. |
...
|
only_missing
|
Flag
|
Only add dependencies to package.json if they are not already present. |
...
|
optional
|
Flag
|
Add dependency to "optionalDependencies". |
...
|
os
|
Value
|
Override operating system for optional dependencies (e.g., linux, darwin, * for all). |
...
|
peer
|
Flag
|
Add dependency to "peerDependencies". |
...
|
production
|
Flag
|
Don't install devDependencies. |
...
|
quiet
|
Flag
|
Only show tarball name when packing. |
...
|
registry
|
Value
|
Use a specific registry by default, overriding .npmrc, bunfig.toml and environment variables. |
...
|
save
|
Flag
|
Save to package.json (true by default). |
...
|
save_text_lockfile
|
Flag
|
Save a text-based lockfile. |
...
|
silent
|
Flag
|
Don't log anything. |
...
|
trust
|
Flag
|
Add to trustedDependencies in the project's package.json and install the package(s). |
...
|
verbose
|
Flag
|
Excessively verbose logging. |
...
|
yarn
|
Flag
|
Write a yarn.lock file (yarn v1). |
...
|
Build ¶
Bases: Tool[_R2]
Methods:
| Name | Description |
|---|---|
__call__ |
Run this verb. |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
Build[Argv]
|
|
__call__ ¶
__call__(entrypoint: str | PathLike[str], /, *args: str | PathLike[str], allow_unresolved: Value = ..., app: Flag = ..., asset: Value = ..., asset_naming: Value = ..., banner: Value = ..., bytecode: Flag = ..., chunk_naming: Value = ..., compile: Flag = ..., compile_autoload_bunfig: Flag = ..., compile_autoload_dotenv: Flag = ..., compile_autoload_package_json: Flag = ..., compile_autoload_tsconfig: Flag = ..., compile_exec_argv: Value = ..., compile_executable_path: Value = ..., conditions: Value = ..., css_chunking: Flag = ..., emit_dce_annotations: Flag = ..., entry_naming: Value = ..., env: Value = ..., external: Value = ..., footer: Value = ..., format: Value = ..., keep_names: Flag = ..., metafile: Value = ..., metafile_md: Value = ..., minify: Flag = ..., minify_identifiers: Flag = ..., minify_syntax: Flag = ..., minify_whitespace: Flag = ..., no_bundle: Flag = ..., no_clear_screen: Flag = ..., outdir: Value = ..., outfile: Value = ..., packages: Value = ..., production: Flag = ..., public_path: Value = ..., react_compiler: Flag = ..., react_fast_refresh: Flag = ..., reject_unresolved: Flag = ..., root: Value = ..., server_components: Flag = ..., sourcemap: Value = ..., splitting: Flag = ..., target: Value = ..., watch: Flag = ..., windows_copyright: Value = ..., windows_description: Value = ..., windows_hide_console: Flag = ..., windows_icon: Value = ..., windows_publisher: Value = ..., windows_title: Value = ..., windows_version: Value = ..., **flags: Any) -> _R2
Run this verb.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
allow_unresolved
|
Value
|
Allow unresolved dynamic import()/require() specifiers matching these glob patterns. Added in 1.3.11. |
...
|
app
|
Flag
|
(EXPERIMENTAL) Build a web app for production using Bun Bake. |
...
|
asset
|
Value
|
Embed a file or directory into the compiled executable, preserving its relative path (requires --compile). Added in 1.4.0. |
...
|
asset_naming
|
Value
|
Customize asset filenames. |
...
|
banner
|
Value
|
Add a banner to the bundled output such as "use client"; for a bundle being used with RSCs. |
...
|
bytecode
|
Flag
|
Use a bytecode cache. |
...
|
chunk_naming
|
Value
|
Customize chunk filenames. |
...
|
compile
|
Flag
|
Generate a standalone Bun executable containing your bundled code. |
...
|
compile_autoload_bunfig
|
Flag
|
Enable autoloading of bunfig.toml in standalone executable. Defaults on. |
...
|
compile_autoload_dotenv
|
Flag
|
Enable autoloading of .env files in standalone executable. Defaults on. |
...
|
compile_autoload_package_json
|
Flag
|
Enable autoloading of package.json at runtime in standalone executable. |
...
|
compile_autoload_tsconfig
|
Flag
|
Enable autoloading of tsconfig.json at runtime in standalone executable. |
...
|
compile_exec_argv
|
Value
|
Prepend arguments to the standalone executable's execArgv. |
...
|
compile_executable_path
|
Value
|
Path to a Bun executable to use for cross-compilation instead of downloading. Added in 1.3.6. |
...
|
conditions
|
Value
|
Pass custom conditions to resolve. |
...
|
css_chunking
|
Flag
|
Chunk CSS files together to reduce duplicated CSS loaded in a browser. |
...
|
emit_dce_annotations
|
Flag
|
Re-emit DCE annotations in bundles. |
...
|
entry_naming
|
Value
|
Customize entry point filenames. |
...
|
env
|
Value
|
Inline environment variables into the bundle as process.env.${name}. |
...
|
external
|
Value
|
Exclude module from transpilation (can use * wildcards). |
...
|
footer
|
Value
|
Add a footer to the bundled output such as // built with bun!. |
...
|
format
|
Value
|
Specifies the module format to build to. |
...
|
keep_names
|
Flag
|
Preserve original function and class names when minifying. |
...
|
metafile
|
Value
|
Write a JSON file with metadata about the build. Added in 1.3.6. |
...
|
metafile_md
|
Value
|
Write a markdown file with a visualization of the module graph (LLM-friendly). Added in 1.3.8. |
...
|
minify
|
Flag
|
Enable all minification flags. |
...
|
minify_identifiers
|
Flag
|
Minify identifiers. |
...
|
minify_syntax
|
Flag
|
Minify syntax and inline data. |
...
|
minify_whitespace
|
Flag
|
Minify whitespace. |
...
|
no_bundle
|
Flag
|
Transpile file only, do not bundle. |
...
|
no_clear_screen
|
Flag
|
Disable clearing the terminal screen on reload when --watch is enabled. |
...
|
outdir
|
Value
|
Default to "dist" if multiple files. |
...
|
outfile
|
Value
|
Write to a file. |
...
|
packages
|
Value
|
Add dependencies to bundle or keep them external. |
...
|
production
|
Flag
|
Set NODE_ENV=production and enable minification. |
...
|
public_path
|
Value
|
A prefix to be appended to any import paths in bundled code. |
...
|
react_compiler
|
Flag
|
Enable the React Compiler optimizing transform. Added in 1.4.0. |
...
|
react_fast_refresh
|
Flag
|
Enable React Fast Refresh transform (does not emit hot-module code, use this for testing). |
...
|
reject_unresolved
|
Flag
|
Fail the build on any dynamic import()/require() specifier that cannot be resolved at build time. Added in 1.3.11. |
...
|
root
|
Value
|
Root directory used for multiple entry points. |
...
|
server_components
|
Flag
|
(EXPERIMENTAL) Enable server components. |
...
|
sourcemap
|
Value
|
Build with sourcemaps - 'linked', 'inline', 'external', or 'none'. |
...
|
splitting
|
Flag
|
Enable code splitting. |
...
|
target
|
Value
|
The intended execution environment for the bundle. |
...
|
watch
|
Flag
|
Automatically restart the process on file change. |
...
|
windows_copyright
|
Value
|
When using --compile targeting Windows, set the executable copyright. |
...
|
windows_description
|
Value
|
When using --compile targeting Windows, set the executable description. |
...
|
windows_hide_console
|
Flag
|
When using --compile targeting Windows, prevent a Command prompt from opening alongside the executable. |
...
|
windows_icon
|
Value
|
When using --compile targeting Windows, assign an executable icon. |
...
|
windows_publisher
|
Value
|
When using --compile targeting Windows, set the executable company name. |
...
|
windows_title
|
Value
|
When using --compile targeting Windows, set the executable product name. |
...
|
windows_version
|
Value
|
When using --compile targeting Windows, set the executable version (e.g. |
...
|
Install ¶
Bases: Tool[_R2]
Methods:
| Name | Description |
|---|---|
__call__ |
Alias: bun i |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
Install[Argv]
|
|
__call__ ¶
__call__(*args: str | PathLike[str], analyze: Flag = ..., backend: Value = ..., ca: Value = ..., cache_dir: Value = ..., cafile: Value = ..., catalog: Value = ..., concurrent_scripts: Value = ..., config: Value = ..., cpu: Value = ..., cwd: Value = ..., dev: Flag = ..., dry_run: Flag = ..., exact: Flag = ..., filter: Value = ..., force: Flag = ..., frozen_lockfile: Flag = ..., global_: Flag = ..., ignore_scripts: Flag = ..., linker: Value = ..., lockfile_only: Flag = ..., minimum_release_age: Value = ..., network_concurrency: Value = ..., no_cache: Flag = ..., no_progress: Flag = ..., no_summary: Flag = ..., no_verify: Flag = ..., omit: Value = ..., only_missing: Flag = ..., optional: Flag = ..., os: Value = ..., peer: Flag = ..., production: Flag = ..., quiet: Flag = ..., registry: Value = ..., save: Flag = ..., save_text_lockfile: Flag = ..., silent: Flag = ..., trust: Flag = ..., verbose: Flag = ..., yarn: Flag = ..., **flags: Any) -> _R2
Alias: bun i
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
analyze
|
Flag
|
Analyze & install all dependencies of files passed as arguments recursively (using Bun's bundler). |
...
|
backend
|
Value
|
Platform-specific optimizations for installing dependencies. |
...
|
ca
|
Value
|
Provide a Certificate Authority signing certificate. |
...
|
cache_dir
|
Value
|
Store & load cached data from a specific directory path. |
...
|
cafile
|
Value
|
The same as |
...
|
catalog
|
Value
|
Add the resolved version to the root package.json catalog and depend on it as "catalog:" (use --catalog=NAME for a named catalog). Added in 1.4.0. |
...
|
concurrent_scripts
|
Value
|
Maximum number of concurrent jobs for lifecycle scripts. Defaults to |
...
|
config
|
Value
|
Specify path to config file (bunfig.toml). |
...
|
cpu
|
Value
|
Override CPU architecture for optional dependencies (e.g., x64, arm64, * for all). |
...
|
cwd
|
Value
|
Set a specific cwd. |
...
|
dev
|
Flag
|
Add dependency to "devDependencies". |
...
|
dry_run
|
Flag
|
Perform a dry run without making changes. |
...
|
exact
|
Flag
|
Add the exact version instead of the ^range. |
...
|
filter
|
Value
|
Install packages for the matching workspaces. |
...
|
force
|
Flag
|
Always request the latest versions from the registry & reinstall all dependencies. |
...
|
frozen_lockfile
|
Flag
|
Disallow changes to lockfile. |
...
|
global_
|
Flag
|
Install globally. |
...
|
ignore_scripts
|
Flag
|
Skip lifecycle scripts in the project's package.json (dependency scripts are never run). |
...
|
linker
|
Value
|
Linker strategy (one of "isolated" or "hoisted"). |
...
|
lockfile_only
|
Flag
|
Generate a lockfile without installing dependencies. |
...
|
minimum_release_age
|
Value
|
Only install packages published at least N seconds ago (security feature). |
...
|
network_concurrency
|
Value
|
Maximum number of concurrent network requests. Defaults to |
...
|
no_cache
|
Flag
|
Ignore manifest cache entirely. |
...
|
no_progress
|
Flag
|
Disable the progress bar. |
...
|
no_summary
|
Flag
|
Don't print a summary. |
...
|
no_verify
|
Flag
|
Skip verifying integrity of newly downloaded packages. |
...
|
omit
|
Value
|
Exclude 'dev', 'optional', or 'peer' dependencies from install. |
...
|
only_missing
|
Flag
|
Only add dependencies to package.json if they are not already present. |
...
|
optional
|
Flag
|
Add dependency to "optionalDependencies". |
...
|
os
|
Value
|
Override operating system for optional dependencies (e.g., linux, darwin, * for all). |
...
|
peer
|
Flag
|
Add dependency to "peerDependencies". |
...
|
production
|
Flag
|
Don't install devDependencies. |
...
|
quiet
|
Flag
|
Only show tarball name when packing. |
...
|
registry
|
Value
|
Use a specific registry by default, overriding .npmrc, bunfig.toml and environment variables. |
...
|
save
|
Flag
|
Save to package.json (true by default). |
...
|
save_text_lockfile
|
Flag
|
Save a text-based lockfile. |
...
|
silent
|
Flag
|
Don't log anything. |
...
|
trust
|
Flag
|
Add to trustedDependencies in the project's package.json and install the package(s). |
...
|
verbose
|
Flag
|
Excessively verbose logging. |
...
|
yarn
|
Flag
|
Write a yarn.lock file (yarn v1). |
...
|
Remove ¶
Bases: Tool[_R2]
Methods:
| Name | Description |
|---|---|
__call__ |
Alias: bun r |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
Remove[Argv]
|
|
__call__ ¶
__call__(*args: str | PathLike[str], backend: Value = ..., ca: Value = ..., cache_dir: Value = ..., cafile: Value = ..., concurrent_scripts: Value = ..., config: Value = ..., cpu: Value = ..., cwd: Value = ..., dry_run: Flag = ..., filter: Value = ..., force: Flag = ..., frozen_lockfile: Flag = ..., global_: Flag = ..., ignore_scripts: Flag = ..., linker: Value = ..., lockfile_only: Flag = ..., minimum_release_age: Value = ..., network_concurrency: Value = ..., no_cache: Flag = ..., no_progress: Flag = ..., no_summary: Flag = ..., no_verify: Flag = ..., omit: Value = ..., os: Value = ..., production: Flag = ..., quiet: Flag = ..., registry: Value = ..., save: Flag = ..., save_text_lockfile: Flag = ..., silent: Flag = ..., trust: Flag = ..., verbose: Flag = ..., yarn: Flag = ..., **flags: Any) -> _R2
Alias: bun r
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
backend
|
Value
|
Platform-specific optimizations for installing dependencies. |
...
|
ca
|
Value
|
Provide a Certificate Authority signing certificate. |
...
|
cache_dir
|
Value
|
Store & load cached data from a specific directory path. |
...
|
cafile
|
Value
|
The same as |
...
|
concurrent_scripts
|
Value
|
Maximum number of concurrent jobs for lifecycle scripts. Defaults to |
...
|
config
|
Value
|
Specify path to config file (bunfig.toml). |
...
|
cpu
|
Value
|
Override CPU architecture for optional dependencies (e.g., x64, arm64, * for all). |
...
|
cwd
|
Value
|
Set a specific cwd. |
...
|
dry_run
|
Flag
|
Perform a dry run without making changes. |
...
|
filter
|
Value
|
Remove the package(s) from the matching workspaces instead of the current package. Added in 1.4.0. |
...
|
force
|
Flag
|
Always request the latest versions from the registry & reinstall all dependencies. |
...
|
frozen_lockfile
|
Flag
|
Disallow changes to lockfile. |
...
|
global_
|
Flag
|
Install globally. |
...
|
ignore_scripts
|
Flag
|
Skip lifecycle scripts in the project's package.json (dependency scripts are never run). |
...
|
linker
|
Value
|
Linker strategy (one of "isolated" or "hoisted"). |
...
|
lockfile_only
|
Flag
|
Generate a lockfile without installing dependencies. |
...
|
minimum_release_age
|
Value
|
Only install packages published at least N seconds ago (security feature). |
...
|
network_concurrency
|
Value
|
Maximum number of concurrent network requests. Defaults to |
...
|
no_cache
|
Flag
|
Ignore manifest cache entirely. |
...
|
no_progress
|
Flag
|
Disable the progress bar. |
...
|
no_summary
|
Flag
|
Don't print a summary. |
...
|
no_verify
|
Flag
|
Skip verifying integrity of newly downloaded packages. |
...
|
omit
|
Value
|
Exclude 'dev', 'optional', or 'peer' dependencies from install. |
...
|
os
|
Value
|
Override operating system for optional dependencies (e.g., linux, darwin, * for all). |
...
|
production
|
Flag
|
Don't install devDependencies. |
...
|
quiet
|
Flag
|
Only show tarball name when packing. |
...
|
registry
|
Value
|
Use a specific registry by default, overriding .npmrc, bunfig.toml and environment variables. |
...
|
save
|
Flag
|
Save to package.json (true by default). |
...
|
save_text_lockfile
|
Flag
|
Save a text-based lockfile. |
...
|
silent
|
Flag
|
Don't log anything. |
...
|
trust
|
Flag
|
Add to trustedDependencies in the project's package.json and install the package(s). |
...
|
verbose
|
Flag
|
Excessively verbose logging. |
...
|
yarn
|
Flag
|
Write a yarn.lock file (yarn v1). |
...
|
Run ¶
Bases: Tool[_R2]
Methods:
| Name | Description |
|---|---|
__call__ |
Run this verb. |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
Run[Argv]
|
|
__call__ ¶
__call__(file: str | PathLike[str], /, *args: str | PathLike[str], bun: Flag = ..., conditions: Value = ..., config: Value = ..., console_depth: Value = ..., cpu_prof: Flag = ..., cpu_prof_dir: Value = ..., cpu_prof_interval: Value = ..., cpu_prof_md: Flag = ..., cpu_prof_name: Value = ..., cron_period: Value = ..., cron_title: Value = ..., cwd: Value = ..., define: Value = ..., disable_warning: Value = ..., dns_result_order: Value = ..., drop: Value = ..., elide_lines: Value = ..., env_file: Value = ..., eval: Value = ..., experimental_http2_fetch: Flag = ..., experimental_http3_fetch: Flag = ..., experimental_stream_iter: Flag = ..., expose_gc: Flag = ..., extension_order: Value = ..., feature: Value = ..., fetch_preconnect: Value = ..., filter: Value = ..., heap_prof: Flag = ..., heap_prof_dir: Value = ..., heap_prof_interval: Value = ..., heap_prof_md: Flag = ..., heap_prof_name: Value = ..., hot: Flag = ..., i: Flag = ..., if_present: Flag = ..., ignore_dce_annotations: Flag = ..., import_: Value = ..., insecure_http_parser: Flag = ..., inspect: Value = ..., inspect_brk: Value = ..., inspect_wait: Value = ..., install: Value = ..., interactive: Flag = ..., jsx_factory: Value = ..., jsx_fragment: Value = ..., jsx_import_source: Value = ..., jsx_runtime: Value = ..., jsx_side_effects: Flag = ..., loader: Value = ..., main_fields: Value = ..., max_http_header_size: Value = ..., no_addons: Flag = ..., no_clear_screen: Flag = ..., no_deprecation: Flag = ..., no_env_file: Flag = ..., no_exit_on_error: Flag = ..., no_install: Flag = ..., no_macros: Flag = ..., no_orphans: Flag = ..., no_warnings: Flag = ..., parallel: Flag = ..., pending_deprecation: Flag = ..., port: Value = ..., prefer_latest: Flag = ..., prefer_offline: Flag = ..., preload: Value = ..., preserve_symlinks: Flag = ..., preserve_symlinks_main: Flag = ..., print: Value = ..., redirect_warnings: Value = ..., redis_preconnect: Flag = ..., require: Value = ..., sequential: Flag = ..., shell: Value = ..., silent: Flag = ..., smol: Flag = ..., sql_preconnect: Flag = ..., throw_deprecation: Flag = ..., title: Value = ..., tls_max_v1_2: Flag = ..., tls_max_v1_3: Flag = ..., tls_min_v1_0: Flag = ..., tls_min_v1_1: Flag = ..., tls_min_v1_2: Flag = ..., tls_min_v1_3: Flag = ..., trace_deprecation: Flag = ..., trace_warnings: Flag = ..., tsconfig_override: Value = ..., unhandled_rejections: Value = ..., use_bundled_ca: Flag = ..., use_openssl_ca: Flag = ..., use_system_ca: Flag = ..., user_agent: Value = ..., watch: Flag = ..., watch_kill_signal: Value = ..., workspaces: Flag = ..., zero_fill_buffers: Flag = ..., **flags: Any) -> _R2
Run this verb.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bun
|
Flag
|
Force a script or package to use Bun's runtime instead of Node.js (via symlinking node). |
...
|
conditions
|
Value
|
Pass custom conditions to resolve. |
...
|
config
|
Value
|
Specify path to Bun config file. |
...
|
console_depth
|
Value
|
Set the default depth for console.log object inspection. Defaults to |
...
|
cpu_prof
|
Flag
|
Start CPU profiler and write profile to disk on exit. |
...
|
cpu_prof_dir
|
Value
|
Specify the directory where the CPU profile will be saved. |
...
|
cpu_prof_interval
|
Value
|
Specify the sampling interval in microseconds for CPU profiling. Defaults to |
...
|
cpu_prof_md
|
Flag
|
Output CPU profile in markdown format (grep-friendly, designed for LLM analysis). Added in 1.3.7. |
...
|
cpu_prof_name
|
Value
|
Specify the name of the CPU profile file. |
...
|
cron_period
|
Value
|
Cron period for cron execution mode. Added in 1.3.11. |
...
|
cron_title
|
Value
|
Title for cron execution mode. Added in 1.3.11. |
...
|
cwd
|
Value
|
Absolute path to resolve files & entry points from. |
...
|
define
|
Value
|
Substitute K:V while parsing, e.g. --define process.env.NODE_ENV:"development". |
...
|
disable_warning
|
Value
|
Silence specific process warnings by code or type. Added in 1.4.0. |
...
|
dns_result_order
|
Value
|
Set the default order of DNS lookup results. |
...
|
drop
|
Value
|
Remove function calls, e.g. --drop=console removes all console.* calls. |
...
|
elide_lines
|
Value
|
Number of lines of script output shown when using --filter . Defaults to |
...
|
env_file
|
Value
|
Load environment variables from the specified file(s). |
...
|
eval
|
Value
|
Evaluate argument as a script. |
...
|
experimental_http2_fetch
|
Flag
|
Offer h2 in fetch() TLS ALPN. Added in 1.3.14. |
...
|
experimental_http3_fetch
|
Flag
|
Honor Alt-Svc: h3 in fetch() and upgrade to HTTP/3. Added in 1.3.14. |
...
|
experimental_stream_iter
|
Flag
|
Enable the experimental stream/iter API (node:stream/iter, node:zlib/iter). Added in 1.4.0. |
...
|
expose_gc
|
Flag
|
Expose gc() on the global object. |
...
|
extension_order
|
Value
|
Defaults to: .tsx,.ts,.jsx,.js,.json. |
...
|
feature
|
Value
|
Enable a feature flag for dead-code elimination, e.g. --feature=SUPER_SECRET. |
...
|
fetch_preconnect
|
Value
|
Preconnect to a URL while code is loading. |
...
|
filter
|
Value
|
Run a script in all workspace packages matching the pattern. |
...
|
heap_prof
|
Flag
|
Write a heap profile to disk on exit (.heapprofile). Added in 1.3.7. |
...
|
heap_prof_dir
|
Value
|
Specify the directory where the heap profile will be saved. Added in 1.3.7. |
...
|
heap_prof_interval
|
Value
|
Specify the average sampling interval in bytes for heap profiling. Defaults to |
...
|
heap_prof_md
|
Flag
|
Generate markdown heap profile on exit (for CLI analysis). Added in 1.3.7. |
...
|
heap_prof_name
|
Value
|
Specify the name of the heap profile file. Added in 1.3.7. |
...
|
hot
|
Flag
|
Enable auto reload in the Bun runtime, test runner, or bundler. |
...
|
i
|
Flag
|
Auto-install dependencies during execution. |
...
|
if_present
|
Flag
|
Exit without an error if the entrypoint does not exist. |
...
|
ignore_dce_annotations
|
Flag
|
Ignore tree-shaking annotations such as @PURE. |
...
|
import_
|
Value
|
Alias of --preload, for Node.js compatibility. |
...
|
insecure_http_parser
|
Flag
|
Use an insecure HTTP parser that accepts invalid HTTP headers. Added in 1.4.0. |
...
|
inspect
|
Value
|
Activate Bun's debugger. |
...
|
inspect_brk
|
Value
|
Activate Bun's debugger, set breakpoint on first line of code and wait. |
...
|
inspect_wait
|
Value
|
Activate Bun's debugger, wait for a connection before executing. |
...
|
install
|
Value
|
Configure auto-install behavior. |
...
|
interactive
|
Flag
|
Start a Node.js-compatible REPL, like node --interactive. Added in 1.4.0. |
...
|
jsx_factory
|
Value
|
Changes the function called when compiling JSX elements using the classic JSX runtime. |
...
|
jsx_fragment
|
Value
|
Changes the function called when compiling JSX fragments. |
...
|
jsx_import_source
|
Value
|
Declares the module specifier to be used for importing the jsx and jsxs factory functions. |
...
|
jsx_runtime
|
Value
|
"automatic" (default) or "classic". |
...
|
jsx_side_effects
|
Flag
|
Treat JSX elements as having side effects (disable pure annotations). |
...
|
loader
|
Value
|
Parse files with .ext:loader, e.g. --loader .js:jsx. |
...
|
main_fields
|
Value
|
Main fields to lookup in package.json. |
...
|
max_http_header_size
|
Value
|
Set the maximum size of HTTP headers in bytes. |
...
|
no_addons
|
Flag
|
Throw an error if process.dlopen is called, and disable export condition "node-addons". |
...
|
no_clear_screen
|
Flag
|
Disable clearing the terminal screen on reload when --hot or --watch is enabled. |
...
|
no_deprecation
|
Flag
|
Suppress all reporting of the custom deprecation. |
...
|
no_env_file
|
Flag
|
Disable automatic loading of .env files. |
...
|
no_exit_on_error
|
Flag
|
Continue running other scripts when one fails (with --parallel/--sequential). Added in 1.3.9. |
...
|
no_install
|
Flag
|
Disable auto install in the Bun runtime. |
...
|
no_macros
|
Flag
|
Disable macros from being executed in the bundler, transpiler and runtime. |
...
|
no_orphans
|
Flag
|
Exit when the parent process dies, and on exit kill every descendant. Added in 1.3.14. |
...
|
no_warnings
|
Flag
|
Silence all process warnings. Added in 1.4.0. |
...
|
parallel
|
Flag
|
Run multiple scripts concurrently with Foreman-style output. Added in 1.3.9. |
...
|
pending_deprecation
|
Flag
|
Emit pending deprecation warnings. Added in 1.4.0. |
...
|
port
|
Value
|
Set the default port for Bun.serve. |
...
|
prefer_latest
|
Flag
|
Use the latest matching versions of packages in the Bun runtime, always checking npm. |
...
|
prefer_offline
|
Flag
|
Skip staleness checks for packages in the Bun runtime and resolve from disk. |
...
|
preload
|
Value
|
Import a module before other modules are loaded. |
...
|
preserve_symlinks
|
Flag
|
Preserve symlinks when resolving files. |
...
|
preserve_symlinks_main
|
Flag
|
Preserve symlinks when resolving the main entry point. |
...
|
print
|
Value
|
Evaluate argument as a script and print the result. |
...
|
redirect_warnings
|
Value
|
Write process warnings to the given file instead of printing to stderr. Added in 1.4.0. |
...
|
redis_preconnect
|
Flag
|
Preconnect to $REDIS_URL at startup. |
...
|
require
|
Value
|
Alias of --preload, for Node.js compatibility. |
...
|
sequential
|
Flag
|
Run multiple scripts sequentially with Foreman-style output. Added in 1.3.9. |
...
|
shell
|
Value
|
Control the shell used for package.json scripts. |
...
|
silent
|
Flag
|
Don't print the script command. |
...
|
smol
|
Flag
|
Use less memory, but run garbage collection more often. |
...
|
sql_preconnect
|
Flag
|
Preconnect to PostgreSQL at startup. |
...
|
throw_deprecation
|
Flag
|
Determine whether or not deprecation warnings result in errors. |
...
|
title
|
Value
|
Set the process title. |
...
|
tls_max_v1_2
|
Flag
|
Set the default TLS maximum to TLSv1.2. Added in 1.4.0. |
...
|
tls_max_v1_3
|
Flag
|
Set the default TLS maximum to TLSv1.3. Added in 1.4.0. |
...
|
tls_min_v1_0
|
Flag
|
Set the default TLS minimum to TLSv1.0. Added in 1.4.0. |
...
|
tls_min_v1_1
|
Flag
|
Set the default TLS minimum to TLSv1.1. Added in 1.4.0. |
...
|
tls_min_v1_2
|
Flag
|
Set the default TLS minimum to TLSv1.2. Added in 1.4.0. |
...
|
tls_min_v1_3
|
Flag
|
Set the default TLS minimum to TLSv1.3. Added in 1.4.0. |
...
|
trace_deprecation
|
Flag
|
Show stack traces on deprecations. Added in 1.4.0. |
...
|
trace_warnings
|
Flag
|
Show stack traces on process warnings. Added in 1.4.0. |
...
|
tsconfig_override
|
Value
|
Specify custom tsconfig.json. |
...
|
unhandled_rejections
|
Value
|
One of "strict", "throw", "warn", "none", or "warn-with-error-code". |
...
|
use_bundled_ca
|
Flag
|
Use bundled CA store. |
...
|
use_openssl_ca
|
Flag
|
Use OpenSSL's default CA store. |
...
|
use_system_ca
|
Flag
|
Use the system's trusted certificate authorities. |
...
|
user_agent
|
Value
|
Set the default User-Agent header for HTTP requests. |
...
|
watch
|
Flag
|
Automatically restart the process on file change. |
...
|
watch_kill_signal
|
Value
|
Signal whose handlers run when --watch restarts the process. Defaults to |
...
|
workspaces
|
Flag
|
Run a script in all workspace packages (from the "workspaces" field in package.json). |
...
|
zero_fill_buffers
|
Flag
|
Boolean to force Buffer.allocUnsafe(size) to be zero-filled. |
...
|
Test ¶
Bases: Tool[_R2]
Methods:
| Name | Description |
|---|---|
__call__ |
Run this verb. |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
Test[Argv]
|
|
__call__ ¶
__call__(*args: str | PathLike[str], bail: Value = ..., changed: Value = ..., concurrent: Flag = ..., coverage: Flag = ..., coverage_dir: Value = ..., coverage_reporter: Value = ..., dots: Flag = ..., isolate: Flag = ..., max_concurrency: Value = ..., no_orphans: Flag = ..., only: Flag = ..., only_failures: Flag = ..., parallel: Value = ..., parallel_delay: Value = ..., pass_with_no_tests: Flag = ..., path_ignore_patterns: Value = ..., randomize: Flag = ..., reporter: Value = ..., reporter_outfile: Value = ..., rerun_each: Value = ..., retry: Value = ..., seed: Value = ..., shard: Value = ..., test_name_pattern: Value = ..., test_worker: Flag = ..., timeout: Value = ..., timings: Value = ..., todo: Flag = ..., update_snapshots: Flag = ..., update_timings: Flag = ..., **flags: Any) -> _R2
Run this verb.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bail
|
Value
|
Exit the test suite after |
...
|
changed
|
Value
|
Only run test files affected by changed files according to git. Added in 1.3.13. |
...
|
concurrent
|
Flag
|
Treat all tests as |
...
|
coverage
|
Flag
|
Generate a coverage profile. |
...
|
coverage_dir
|
Value
|
Directory for coverage files. |
...
|
coverage_reporter
|
Value
|
Report coverage in 'text' and/or 'lcov'. |
...
|
dots
|
Flag
|
Enable dots reporter. |
...
|
isolate
|
Flag
|
Run each test file in a fresh global object. |
...
|
max_concurrency
|
Value
|
Maximum number of concurrent tests to execute at once. |
...
|
no_orphans
|
Flag
|
Exit when the parent process dies, and on exit kill every descendant. Added in 1.3.14. |
...
|
only
|
Flag
|
Run only tests that are marked with "test.only()" or "describe.only()". |
...
|
only_failures
|
Flag
|
Only display test failures, hiding passing tests. |
...
|
parallel
|
Value
|
Run test files in parallel using N worker processes. Added in 1.3.13. |
...
|
parallel_delay
|
Value
|
Milliseconds the first --parallel worker must be busy before spawning the rest. Added in 1.3.13. |
...
|
pass_with_no_tests
|
Flag
|
Exit with code 0 when no tests are found. |
...
|
path_ignore_patterns
|
Value
|
Glob patterns for test file paths to ignore. Added in 1.3.11. |
...
|
randomize
|
Flag
|
Run tests in random order. |
...
|
reporter
|
Value
|
Test output reporter format. |
...
|
reporter_outfile
|
Value
|
Output file path for the reporter format (required with --reporter). |
...
|
rerun_each
|
Value
|
Re-run each test file |
...
|
retry
|
Value
|
Default retry count for all tests, overridden by per-test { retry: N }. Added in 1.3.10. |
...
|
seed
|
Value
|
Set the random seed for test randomization. |
...
|
shard
|
Value
|
Run a subset of test files, e.g. '--shard=⅓' runs the first of three shards. Added in 1.3.13. |
...
|
test_name_pattern
|
Value
|
Run only tests with a name that matches the given regex. |
...
|
test_worker
|
Flag
|
(internal) Run as a --parallel worker, receiving files over IPC. Added in 1.3.13. |
...
|
timeout
|
Value
|
Set the per-test timeout in milliseconds, default is 5000. |
...
|
timings
|
Value
|
JSON file(s) of per-file durations (ms); several are merged, e.g. one per CI shard. Added in 1.4.0. |
...
|
todo
|
Flag
|
Include tests that are marked with "test.todo()". |
...
|
update_snapshots
|
Flag
|
Update snapshot files. |
...
|
update_timings
|
Flag
|
After the run, write measured per-file durations to the first --timings file (only this shard's files under --shard; merged with what was read otherwise). Added in 1.4.0. |
...
|
X ¶
Bases: Tool[_R2]
Methods:
| Name | Description |
|---|---|
__call__ |
Execute an npm package executable (CLI), automatically installing into a |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
X[Argv]
|
|
__call__ ¶
__call__(*args: str | PathLike[str], bun: Flag = ..., no_install: Flag = ..., package: Value = ..., silent: Flag = ..., verbose: Flag = ..., **flags: Any) -> _R2
Execute an npm package executable (CLI), automatically installing into a global shared cache if not installed in node_modules.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bun
|
Flag
|
Force the command to run with Bun instead of Node.js. |
...
|
no_install
|
Flag
|
Skip installation if package is not already installed. |
...
|
package
|
Value
|
Specify package to install when binary name differs from package name. |
...
|
silent
|
Flag
|
Suppress output during installation. |
...
|
verbose
|
Flag
|
Enable verbose output during installation. |
...
|
__call__ ¶
__call__(*args: str | PathLike[str], bun: Flag = ..., conditions: Value = ..., config: Value = ..., console_depth: Value = ..., cpu_prof: Flag = ..., cpu_prof_dir: Value = ..., cpu_prof_interval: Value = ..., cpu_prof_md: Flag = ..., cpu_prof_name: Value = ..., cron_period: Value = ..., cron_title: Value = ..., cwd: Value = ..., define: Value = ..., disable_warning: Value = ..., dns_result_order: Value = ..., drop: Value = ..., elide_lines: Value = ..., env_file: Value = ..., eval: Value = ..., experimental_http2_fetch: Flag = ..., experimental_http3_fetch: Flag = ..., experimental_stream_iter: Flag = ..., expose_gc: Flag = ..., extension_order: Value = ..., feature: Value = ..., fetch_preconnect: Value = ..., filter: Value = ..., heap_prof: Flag = ..., heap_prof_dir: Value = ..., heap_prof_interval: Value = ..., heap_prof_md: Flag = ..., heap_prof_name: Value = ..., hot: Flag = ..., i: Flag = ..., if_present: Flag = ..., ignore_dce_annotations: Flag = ..., import_: Value = ..., insecure_http_parser: Flag = ..., inspect: Value = ..., inspect_brk: Value = ..., inspect_wait: Value = ..., install: Value = ..., interactive: Flag = ..., jsx_factory: Value = ..., jsx_fragment: Value = ..., jsx_import_source: Value = ..., jsx_runtime: Value = ..., jsx_side_effects: Flag = ..., loader: Value = ..., main_fields: Value = ..., max_http_header_size: Value = ..., no_addons: Flag = ..., no_clear_screen: Flag = ..., no_deprecation: Flag = ..., no_env_file: Flag = ..., no_exit_on_error: Flag = ..., no_install: Flag = ..., no_macros: Flag = ..., no_orphans: Flag = ..., no_warnings: Flag = ..., parallel: Flag = ..., pending_deprecation: Flag = ..., port: Value = ..., prefer_latest: Flag = ..., prefer_offline: Flag = ..., preload: Value = ..., preserve_symlinks: Flag = ..., preserve_symlinks_main: Flag = ..., print: Value = ..., redirect_warnings: Value = ..., redis_preconnect: Flag = ..., require: Value = ..., revision: Flag = ..., sequential: Flag = ..., shell: Value = ..., silent: Flag = ..., smol: Flag = ..., sql_preconnect: Flag = ..., throw_deprecation: Flag = ..., title: Value = ..., tls_max_v1_2: Flag = ..., tls_max_v1_3: Flag = ..., tls_min_v1_0: Flag = ..., tls_min_v1_1: Flag = ..., tls_min_v1_2: Flag = ..., tls_min_v1_3: Flag = ..., trace_deprecation: Flag = ..., trace_warnings: Flag = ..., tsconfig_override: Value = ..., unhandled_rejections: Value = ..., use_bundled_ca: Flag = ..., use_openssl_ca: Flag = ..., use_system_ca: Flag = ..., user_agent: Value = ..., watch: Flag = ..., watch_kill_signal: Value = ..., workspaces: Flag = ..., zero_fill_buffers: Flag = ..., **flags: Any) -> _R
Bun is a fast JavaScript runtime, package manager, bundler, and test runner.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bun
|
Flag
|
Force a script or package to use Bun's runtime instead of Node.js (via symlinking node). |
...
|
conditions
|
Value
|
Pass custom conditions to resolve. |
...
|
config
|
Value
|
Specify path to Bun config file. |
...
|
console_depth
|
Value
|
Set the default depth for console.log object inspection. Defaults to |
...
|
cpu_prof
|
Flag
|
Start CPU profiler and write profile to disk on exit. |
...
|
cpu_prof_dir
|
Value
|
Specify the directory where the CPU profile will be saved. |
...
|
cpu_prof_interval
|
Value
|
Specify the sampling interval in microseconds for CPU profiling. Defaults to |
...
|
cpu_prof_md
|
Flag
|
Output CPU profile in markdown format (grep-friendly, designed for LLM analysis). Added in 1.3.7. |
...
|
cpu_prof_name
|
Value
|
Specify the name of the CPU profile file. |
...
|
cron_period
|
Value
|
Cron period for cron execution mode. Added in 1.3.11. |
...
|
cron_title
|
Value
|
Title for cron execution mode. Added in 1.3.11. |
...
|
cwd
|
Value
|
Absolute path to resolve files & entry points from. |
...
|
define
|
Value
|
Substitute K:V while parsing, e.g. --define process.env.NODE_ENV:"development". Added in 1.4.0. |
...
|
disable_warning
|
Value
|
Silence specific process warnings by code or type. Added in 1.4.0. |
...
|
dns_result_order
|
Value
|
Set the default order of DNS lookup results. |
...
|
drop
|
Value
|
Remove function calls, e.g. --drop=console removes all console.* calls. Added in 1.4.0. |
...
|
elide_lines
|
Value
|
Number of lines of script output shown when using --filter . Defaults to |
...
|
env_file
|
Value
|
Load environment variables from the specified file(s). |
...
|
eval
|
Value
|
Evaluate argument as a script. |
...
|
experimental_http2_fetch
|
Flag
|
Offer h2 in fetch() TLS ALPN. Added in 1.3.14. |
...
|
experimental_http3_fetch
|
Flag
|
Honor Alt-Svc: h3 in fetch() and upgrade to HTTP/3. Added in 1.3.14. |
...
|
experimental_stream_iter
|
Flag
|
Enable the experimental stream/iter API (node:stream/iter, node:zlib/iter). Added in 1.4.0. |
...
|
expose_gc
|
Flag
|
Expose gc() on the global object. |
...
|
extension_order
|
Value
|
Defaults to: .tsx,.ts,.jsx,.js,.json. Added in 1.4.0. |
...
|
feature
|
Value
|
Enable a feature flag for dead-code elimination, e.g. --feature=SUPER_SECRET. Added in 1.4.0. |
...
|
fetch_preconnect
|
Value
|
Preconnect to a URL while code is loading. |
...
|
filter
|
Value
|
Run a script in all workspace packages matching the pattern. |
...
|
heap_prof
|
Flag
|
Write a heap profile to disk on exit (.heapprofile). Added in 1.3.7. |
...
|
heap_prof_dir
|
Value
|
Specify the directory where the heap profile will be saved. Added in 1.3.7. |
...
|
heap_prof_interval
|
Value
|
Specify the average sampling interval in bytes for heap profiling. Defaults to |
...
|
heap_prof_md
|
Flag
|
Generate markdown heap profile on exit (for CLI analysis). Added in 1.3.7. |
...
|
heap_prof_name
|
Value
|
Specify the name of the heap profile file. Added in 1.3.7. |
...
|
hot
|
Flag
|
Enable auto reload in the Bun runtime, test runner, or bundler. |
...
|
i
|
Flag
|
Auto-install dependencies during execution. |
...
|
if_present
|
Flag
|
Exit without an error if the entrypoint does not exist. |
...
|
ignore_dce_annotations
|
Flag
|
Ignore tree-shaking annotations such as @PURE. Added in 1.4.0. |
...
|
import_
|
Value
|
Alias of --preload, for Node.js compatibility. |
...
|
insecure_http_parser
|
Flag
|
Use an insecure HTTP parser that accepts invalid HTTP headers. Added in 1.4.0. |
...
|
inspect
|
Value
|
Activate Bun's debugger. |
...
|
inspect_brk
|
Value
|
Activate Bun's debugger, set breakpoint on first line of code and wait. |
...
|
inspect_wait
|
Value
|
Activate Bun's debugger, wait for a connection before executing. |
...
|
install
|
Value
|
Configure auto-install behavior. |
...
|
interactive
|
Flag
|
Start a Node.js-compatible REPL, like node --interactive. Added in 1.4.0. |
...
|
jsx_factory
|
Value
|
Changes the function called when compiling JSX elements using the classic JSX runtime. Added in 1.4.0. |
...
|
jsx_fragment
|
Value
|
Changes the function called when compiling JSX fragments. Added in 1.4.0. |
...
|
jsx_import_source
|
Value
|
Declares the module specifier to be used for importing the jsx and jsxs factory functions. Added in 1.4.0. |
...
|
jsx_runtime
|
Value
|
"automatic" (default) or "classic". Added in 1.4.0. |
...
|
jsx_side_effects
|
Flag
|
Treat JSX elements as having side effects (disable pure annotations). Added in 1.4.0. |
...
|
loader
|
Value
|
Parse files with .ext:loader, e.g. --loader .js:jsx. Added in 1.4.0. |
...
|
main_fields
|
Value
|
Main fields to lookup in package.json. Added in 1.4.0. |
...
|
max_http_header_size
|
Value
|
Set the maximum size of HTTP headers in bytes. |
...
|
no_addons
|
Flag
|
Throw an error if process.dlopen is called, and disable export condition "node-addons". |
...
|
no_clear_screen
|
Flag
|
Disable clearing the terminal screen on reload when --hot or --watch is enabled. |
...
|
no_deprecation
|
Flag
|
Suppress all reporting of the custom deprecation. |
...
|
no_env_file
|
Flag
|
Disable automatic loading of .env files. |
...
|
no_exit_on_error
|
Flag
|
Continue running other scripts when one fails (with --parallel/--sequential). Added in 1.3.9. |
...
|
no_install
|
Flag
|
Disable auto install in the Bun runtime. |
...
|
no_macros
|
Flag
|
Disable macros from being executed in the bundler, transpiler and runtime. Added in 1.4.0. |
...
|
no_orphans
|
Flag
|
Exit when the parent process dies, and on exit kill every descendant. Added in 1.3.14. |
...
|
no_warnings
|
Flag
|
Silence all process warnings. Added in 1.4.0. |
...
|
parallel
|
Flag
|
Run multiple scripts concurrently with Foreman-style output. Added in 1.3.9. |
...
|
pending_deprecation
|
Flag
|
Emit pending deprecation warnings. Added in 1.4.0. |
...
|
port
|
Value
|
Set the default port for Bun.serve. |
...
|
prefer_latest
|
Flag
|
Use the latest matching versions of packages in the Bun runtime, always checking npm. |
...
|
prefer_offline
|
Flag
|
Skip staleness checks for packages in the Bun runtime and resolve from disk. |
...
|
preload
|
Value
|
Import a module before other modules are loaded. |
...
|
preserve_symlinks
|
Flag
|
Preserve symlinks when resolving files. Added in 1.4.0. |
...
|
preserve_symlinks_main
|
Flag
|
Preserve symlinks when resolving the main entry point. Added in 1.4.0. |
...
|
print
|
Value
|
Evaluate argument as a script and print the result. |
...
|
redirect_warnings
|
Value
|
Write process warnings to the given file instead of printing to stderr. Added in 1.4.0. |
...
|
redis_preconnect
|
Flag
|
Preconnect to $REDIS_URL at startup. |
...
|
require
|
Value
|
Alias of --preload, for Node.js compatibility. |
...
|
revision
|
Flag
|
Print version with revision and exit. |
...
|
sequential
|
Flag
|
Run multiple scripts sequentially with Foreman-style output. Added in 1.3.9. |
...
|
shell
|
Value
|
Control the shell used for package.json scripts. |
...
|
silent
|
Flag
|
Don't print the script command. |
...
|
smol
|
Flag
|
Use less memory, but run garbage collection more often. |
...
|
sql_preconnect
|
Flag
|
Preconnect to PostgreSQL at startup. |
...
|
throw_deprecation
|
Flag
|
Determine whether or not deprecation warnings result in errors. |
...
|
title
|
Value
|
Set the process title. |
...
|
tls_max_v1_2
|
Flag
|
Set the default TLS maximum to TLSv1.2. Added in 1.4.0. |
...
|
tls_max_v1_3
|
Flag
|
Set the default TLS maximum to TLSv1.3. Added in 1.4.0. |
...
|
tls_min_v1_0
|
Flag
|
Set the default TLS minimum to TLSv1.0. Added in 1.4.0. |
...
|
tls_min_v1_1
|
Flag
|
Set the default TLS minimum to TLSv1.1. Added in 1.4.0. |
...
|
tls_min_v1_2
|
Flag
|
Set the default TLS minimum to TLSv1.2. Added in 1.4.0. |
...
|
tls_min_v1_3
|
Flag
|
Set the default TLS minimum to TLSv1.3. Added in 1.4.0. |
...
|
trace_deprecation
|
Flag
|
Show stack traces on deprecations. Added in 1.4.0. |
...
|
trace_warnings
|
Flag
|
Show stack traces on process warnings. Added in 1.4.0. |
...
|
tsconfig_override
|
Value
|
Specify custom tsconfig.json. Added in 1.4.0. |
...
|
unhandled_rejections
|
Value
|
One of "strict", "throw", "warn", "none", or "warn-with-error-code". |
...
|
use_bundled_ca
|
Flag
|
Use bundled CA store. |
...
|
use_openssl_ca
|
Flag
|
Use OpenSSL's default CA store. |
...
|
use_system_ca
|
Flag
|
Use the system's trusted certificate authorities. |
...
|
user_agent
|
Value
|
Set the default User-Agent header for HTTP requests. |
...
|
watch
|
Flag
|
Automatically restart the process on file change. |
...
|
watch_kill_signal
|
Value
|
Signal whose handlers run when --watch restarts the process. Defaults to |
...
|
workspaces
|
Flag
|
Run a script in all workspace packages (from the "workspaces" field in package.json). |
...
|
zero_fill_buffers
|
Flag
|
Boolean to force Buffer.allocUnsafe(size) to be zero-filled. |
...
|
flags ¶
flags(*, bun: Flag = ..., conditions: Value = ..., config: Value = ..., console_depth: Value = ..., cpu_prof: Flag = ..., cpu_prof_dir: Value = ..., cpu_prof_interval: Value = ..., cpu_prof_md: Flag = ..., cpu_prof_name: Value = ..., cron_period: Value = ..., cron_title: Value = ..., cwd: Value = ..., define: Value = ..., disable_warning: Value = ..., dns_result_order: Value = ..., drop: Value = ..., elide_lines: Value = ..., env_file: Value = ..., eval: Value = ..., experimental_http2_fetch: Flag = ..., experimental_http3_fetch: Flag = ..., experimental_stream_iter: Flag = ..., expose_gc: Flag = ..., extension_order: Value = ..., feature: Value = ..., fetch_preconnect: Value = ..., filter: Value = ..., heap_prof: Flag = ..., heap_prof_dir: Value = ..., heap_prof_interval: Value = ..., heap_prof_md: Flag = ..., heap_prof_name: Value = ..., hot: Flag = ..., i: Flag = ..., if_present: Flag = ..., ignore_dce_annotations: Flag = ..., import_: Value = ..., insecure_http_parser: Flag = ..., inspect: Value = ..., inspect_brk: Value = ..., inspect_wait: Value = ..., install: Value = ..., interactive: Flag = ..., jsx_factory: Value = ..., jsx_fragment: Value = ..., jsx_import_source: Value = ..., jsx_runtime: Value = ..., jsx_side_effects: Flag = ..., loader: Value = ..., main_fields: Value = ..., max_http_header_size: Value = ..., no_addons: Flag = ..., no_clear_screen: Flag = ..., no_deprecation: Flag = ..., no_env_file: Flag = ..., no_exit_on_error: Flag = ..., no_install: Flag = ..., no_macros: Flag = ..., no_orphans: Flag = ..., no_warnings: Flag = ..., parallel: Flag = ..., pending_deprecation: Flag = ..., port: Value = ..., prefer_latest: Flag = ..., prefer_offline: Flag = ..., preload: Value = ..., preserve_symlinks: Flag = ..., preserve_symlinks_main: Flag = ..., print: Value = ..., redirect_warnings: Value = ..., redis_preconnect: Flag = ..., require: Value = ..., revision: Flag = ..., sequential: Flag = ..., shell: Value = ..., silent: Flag = ..., smol: Flag = ..., sql_preconnect: Flag = ..., throw_deprecation: Flag = ..., title: Value = ..., tls_max_v1_2: Flag = ..., tls_max_v1_3: Flag = ..., tls_min_v1_0: Flag = ..., tls_min_v1_1: Flag = ..., tls_min_v1_2: Flag = ..., tls_min_v1_3: Flag = ..., trace_deprecation: Flag = ..., trace_warnings: Flag = ..., tsconfig_override: Value = ..., unhandled_rejections: Value = ..., use_bundled_ca: Flag = ..., use_openssl_ca: Flag = ..., use_system_ca: Flag = ..., user_agent: Value = ..., watch: Flag = ..., watch_kill_signal: Value = ..., workspaces: Flag = ..., zero_fill_buffers: Flag = ..., **flags: Any) -> Self
Bind tool-level global options before the subcommand.
tools.docker.flags(host=...) puts a tool's own
options ahead of the verb, where they belong.