The `bun` CLI can be used to execute JavaScript/TypeScript files, `package.json` scripts, and [executable packages](https://docs.npmjs.com/cli/v9/configuring-npm/package-json#bin). ## Run a file {% callout %} Compare to `node ` {% /callout %} Use `bun run` to execute a source file. ```bash $ bun run index.js ``` Bun supports TypeScript and JSX out of the box. Every file is transpiled on the fly by Bun's fast native transpiler before being executed. ```bash $ bun run index.js $ bun run index.jsx $ bun run index.ts $ bun run index.tsx ``` The "naked" `bun` command is equivalent to `bun run`. ```bash $ bun index.tsx ``` ### `--watch` To run a file in watch mode, use the `--watch` flag. ```bash $ bun --watch run index.tsx ``` ### `--smol` {% callout %} Added in Bun v0.7.0. {% /callout %} In memory-constrained environments, use the `--smol` flag to reduce memory usage at a cost to performance. ```bash $ bun --smol run index.tsx ``` ## Run a `package.json` script {% note %} Compare to `npm run