More info: Bun Docs
Tip
just bun
can be used as a shorthand for almost all of its commands.
bun i
bun i <package>
-g
to install globally-D
to install as a dev dependency
bun dev
bun run build
bun run <script>
Example: bun lint
bunx <binary>
bun run
also works
Example: bun eslint
Note
To use the Bun runtime (instead of Node.js), pass --bun
to the command: bunx --bun vite dev
bun run <file>
Example: bun src/index.ts
To forget about package managers: antfu/ni