All apps/Bun

Bun

bun

Bun is an all-in-one toolkit for JavaScript and TypeScript apps.

Runs as bun, bunx|macOS, Linux, Windows|bun.com

Command form

ai-draft · 10 tasks · 34 fields

Run a script or file with Bun's runtime. Use the subcommand tabs for run, install, add, test, build and init; debugger, JSX and loader options are left out.

Opens the form; the finished command lands at your prompt, unrun
otty gui bun
Run a file with BunExample values, fixed in this page — nothing here reaches a terminal
Basic
File or script*
file
Restart on change
--watch
TasksEach one presets the form for one job
Run and restart on change
filewatch
ParametersOnly these flags are editable in the form
File or script
Entry file to run.
path · positional 0
Hot reload
Auto reload in the runtime, test runner or bundler.
boolean
--hot
Restart on change
Automatically restart the process on file change.
boolean
--watch

bun run

Run script

Run a package.json script or executable. Flags are not in the completion data.

Run scriptExample values, fixed in this page — nothing here reaches a terminal
Basic
Script*
devstring
TasksEach one presets the form for one job
Run dev
script
ParametersOnly these flags are editable in the form
Script
string · positional 0
devbuildstarttest

bun i

Install dependencies

Install dependencies from package.json (bun i).

Install dependenciesExample values, fixed in this page — nothing here reaches a terminal
Basic
Production only
--production
Frozen lockfile
--frozen-lockfile
TasksEach one presets the form for one job
Reproducible install
frozen_lockfileproduction
Dry run
dry_run
ParametersOnly these flags are editable in the form
Production only
Do not install devDependencies.
boolean
--production-p
Frozen lockfile
Disallow changes to the lockfile.
boolean
--frozen-lockfile
Dry run
Do not install anything.
boolean
--dry-run
Force reinstall
boolean
--force-f
Global
boolean
--global-g
Skip lifecycle scripts
boolean
--ignore-scripts
Working directory
path
--cwd

bun a

Add packages

Add dependencies to package.json (bun a).

Add packagesExample values, fixed in this page — nothing here reaches a terminal
Basic
Packages*
string
Exact version
--exact
TasksEach one presets the form for one job
Add dependency
packageexact
Add dev dependency
packagedev
ParametersOnly these flags are editable in the form
Packages
string · positional 0 · repeatable
As devDependency
boolean
--dev-d
As optionalDependency
boolean
--optional
Exact version
boolean
--exact
Global
boolean
--global-g
Dry run
boolean
--dry-run

bun test

Run tests

Run unit tests with Bun.

Run testsExample values, fixed in this page — nothing here reaches a terminal
Basic
Test files or filters
string
Coverage
--coverage
TasksEach one presets the form for one job
Tests with coverage
filescoverage
Watch mode
fileswatch
ParametersOnly these flags are editable in the form
Test files or filters
string · positional 0 · repeatable
Test name pattern
Run only tests whose name matches this regex.
string
--test-name-pattern-t
Per-test timeout (ms)
integer
--timeout
Only test.only()
boolean
--only
Coverage
boolean
--coverage
Update snapshots
Rewrites snapshot files.
boolean
--update-snapshots
Watch
boolean
--watch
Re-run each file N times
integer
--rerun-each

bun build

Bundle files

Bundle entry points with Bun's bundler.

Bundle filesExample values, fixed in this page — nothing here reaches a terminal
Basic
Entry points*
file
Output directory
directory
Minify
--minify
TasksEach one presets the form for one job
Minified bundle
entrypointsoutdirminify
ParametersOnly these flags are editable in the form
Entry points
Several entry points require an output directory.
path · positional 0 · repeatable
Output directory
path
--outdir
Output file
path
--outfile
Minify
boolean
--minify
Target environment
string
--targetbrowserbunnode
Code splitting
boolean
--splitting
Sourcemap
string
--sourcemapinlineexternalnone
Watch
boolean
--watch

bun init

New project

Initialize a new Bun project in the current directory.

New projectExample values, fixed in this page — nothing here reaches a terminal
Basic
Accept defaults
--yes
TasksEach one presets the form for one job
Init with defaults
yes
ParametersOnly these flags are editable in the form
Accept defaults
Answer yes to all prompts.
boolean
--yes-y
SourcesEvery flag above is checked against these
fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

Before it fills your prompt, Otty checks the installed bun against its version. A form that does not match your version is not offered.