bun-runtime

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

Updated Mar 18, 2026
One-click install
npx skills add https://github.com/freedom909/real-estate-saas --skill bun-runtime-freedom909
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: bun-runtime
Source: https://github.com/freedom909/real-estate-saas/tree/main/.trae/skills/bun-runtime
Command: npx skills add https://github.com/freedom909/real-estate-saas --skill bun-runtime-freedom909

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Choosing and configuring a JavaScript toolchain involves fragmented decisions about runtimes, package managers, bundlers, and test runners. This Skill consolidates guidance on using Bun as a single all-in-one toolkit and clarifies when Bun is preferable to Node. ## Core Features & Use Cases - Runtime and Toolchain Guidance: Explains Bun's Node-compatible runtime, fast bun install package manager, built-in bundler, and Jest-like bun test runner. - Node Migration Notes: Maps common Node commands to Bun equivalents, including bun run, bun x, lockfile handling (bun.lock vs bun.lockb), and native TypeScript execution. - Vercel Deployment Support: Covers configuring the Bun runtime on Vercel with reproducible installs via bun install --frozen-lockfile. - Use Case: When starting a new TypeScript API project, use this Skill to decide between Bun and Node, set up scripts and tests with Bun, and configure a Vercel deployment. ## Quick Start Ask the AI to help migrate a Node.js project to Bun, including install commands, test setup, and Vercel configuration.

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 choose Bun vs Node for a project?▼

Prefer Bun for new JS/TS projects, speed-sensitive scripts, Vercel deployments, and when you want one toolchain for running, installing, testing, and building. Prefer Node for maximum ecosystem compatibility or dependencies with known Bun issues.

Does Bun support running TypeScript files directly?▼

Yes, Bun runs `.ts` files natively without a separate transpilation step. You can execute TypeScript with `bun run src/index.ts` or `bun src/index.ts` directly.

How do I run tests with Bun's built-in test runner?▼

Use `bun test` or `bun test --watch` to run tests with a Jest-like API. Import `expect` and `test` from `bun:test` in your test files, such as `test/example.test.ts`.

Can I deploy a Bun project on Vercel?▼

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

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

Current Bun versions use `bun.lock`, a text-based lockfile, by default. Older versions used `bun.lockb`, a binary format. Commit whichever lockfile your version generates for reproducible installs.