Files
tldr/pages/common/bun-run.md
T
Emmanuel Ferdman 36f4763964 bun-run: add short/long options (#20688)
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2026-01-11 17:47:07 +02:00

527 B

bun run

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

  • Run a script defined in package.json:

bun run {{script_name}}

  • Run a JavaScript or TypeScript file directly:

bun run {{path/to/file.ts}}

  • Run a file in "watch" mode (restarts automatically when the file changes):

bun run --watch {{path/to/file.ts}}

  • Run a file using a specific configuration file:

bun run {{[-c|--config]}} {{path/to/bunfig.toml}} {{path/to/file.ts}}