bun-runtime

Guides adoption and use of Bun as JavaScript runtime, package manager, bundler, and test runner.

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/diazMelgarejo/orama-system --skill bun-runtime-diazmelgarejo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bun-runtime
Source: https://github.com/diazMelgarejo/orama-system/tree/main/.cursor/.agents/skills/bun-runtime
Command: npx skills add https://github.com/diazMelgarejo/orama-system --skill bun-runtime-diazmelgarejo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Choosing and configuring a JavaScript runtime and toolchain is confusing when deciding between Bun and Node, migrating existing projects, or deploying to platforms like Vercel. This Skill provides clear guidance on when to use Bun, how to migrate from Node, and how to run, install, test, and build with Bun. ## Core Features & Use Cases - Runtime and Toolchain Guidance: Explains Bun as a drop-in Node-compatible runtime with built-in package manager, bundler, and Jest-like test runner. - Node Migration Notes: Maps npm/node commands to Bun equivalents such as bun install, bun run, and bun x, including lockfile differences (bun.lock vs bun.lockb). - Vercel Deployment: Covers configuring the Bun runtime on Vercel with reproducible installs via bun install --frozen-lockfile. - Use Case: You are starting a new TypeScript API and want a single toolchain. Use this Skill to set up bun install, run the server with bun run src/index.ts, and write tests with bun test. ## Quick Start Ask the agent to help you migrate a Node project to Bun or set up a new Bun project with install, run, and test commands.

Frequently Asked Questions about bun-runtime

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate a Node.js project to Bun?

Replace `node script.js` with `bun run script.js` or `bun script.js`, and run `bun install` instead of `npm install`. Use `bun run` for npm scripts and `bun x` for npx-style one-off runs; most packages and Node built-ins work unchanged.

When should I use Bun vs Node for a JavaScript project?

Prefer Bun for new JS/TS projects, speed-sensitive scripts, Vercel deployments with the Bun runtime, and when you want one toolchain for run, install, test, and build. Prefer Node for maximum ecosystem compatibility or dependencies with known Bun issues.

How do I run tests with Bun?

Run `bun test` or `bun test --watch` to execute tests with Bun's built-in Jest-like runner. Import `expect` and `test` from `bun:test` in your test files, such as `test/example.test.ts`.

Does Bun work with Vercel deployments?

Yes, set the runtime to Bun in your Vercel project settings. Use `bun run build` or `bun build ./src/index.ts --outdir=dist` for builds, and `bun install --frozen-lockfile` for reproducible installs.

What is the difference between bun.lock and bun.lockb?

`bun.lock` is the text-based lockfile used by default in current Bun versions, while `bun.lockb` is the binary format from older versions. Commit whichever lockfile your Bun version generates for reproducible installs.