bun-runtime

Bun as runtime, package manager, bundler, and test runner. When to choose Bun vs Node, migration notes, and Vercel support.

INSTALLATION
npx skills add https://github.com/affaan-m/everything-claude-code --skill bun-runtime
Run in your project or agent environment. Adjust flags if your CLI version differs.

SKILL.md

$27

Vercel: Set runtime to Bun in project settings. Build: bun run build or bun build ./src/index.ts --outdir=dist. Install: bun install --frozen-lockfile for reproducible deploys.

Examples

Run and install

# Install dependencies (creates/updates bun.lock or bun.lockb)

bun install

# Run a script or file

bun run dev

bun run src/index.ts

bun src/index.ts

Scripts and env

bun run --env-file=.env dev

FOO=bar bun run script.ts

Testing

bun test

bun test --watch
// test/example.test.ts

import { expect, test } from "bun:test";

test("add", () => {

  expect(1 + 2).toBe(3);

});

Runtime API

const file = Bun.file("package.json");

const json = await file.json();

Bun.serve({

  port: 3000,

  fetch(req) {

    return new Response("Hello");

  },

});

Best Practices

  • Commit the lockfile (bun.lock or bun.lockb) for reproducible installs.
  • Prefer bun run for scripts. For TypeScript, Bun runs .ts natively.
  • Keep dependencies up to date; Bun and the ecosystem evolve quickly.
BrowserAct

Let your agent run on any real-world website

Bypass CAPTCHA & anti-bot for free. Start local, scale to cloud.

Explore BrowserAct Skills →

Stop writing automation&scrapers

Install the CLI. Run your first Skill in 30 seconds. Scale when you're ready.

Start free
free · no credit card