bun-development

Guides JavaScript and TypeScript development with the Bun runtime, covering package management, testing, bundling, and Node.js migration.

1|Updated Aug 17, 2025
One-click install
npx skills add https://github.com/ratnesh-maurya/mdconverter --skill bun-development-ratnesh-maurya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bun-development
Source: https://github.com/ratnesh-maurya/mdconverter/tree/main/.claude/skills/bun-development
Command: npx skills add https://github.com/ratnesh-maurya/mdconverter --skill bun-development-ratnesh-maurya

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers working with the Bun runtime often lack consolidated guidance on its built-in tooling, native APIs, and migration path from Node.js, leading to slower setup and missed performance opportunities. ## Core Features & Use Cases - Project Setup & Package Management: Initialize projects with bun init, manage dependencies with bun add/remove/update, and use bunx as an npx equivalent. - Built-in Tooling: Use Bun's native test runner (bun test), bundler (bun build), and executable compiler without external tools like Jest or Webpack. - Native APIs: Leverage Bun.file, Bun.serve, Bun.sql (SQLite), and Bun.password for fast file I/O, HTTP/WebSocket servers, and password hashing. - Use Case: Migrating an Express API from Node.js to Bun—replace npm install with bun install, swap Jest for bun test, and rewrite the server with Bun.serve for significantly faster request handling. ## Quick Start Ask the assistant to set up a new Bun project with TypeScript, a test suite, and a basic HTTP server using Bun.serve.

Frequently Asked Questions about bun-development

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

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

Install Bun, delete node_modules and package-lock.json, then run bun install. Update package.json scripts to use bun run and bun test, and add @types/bun as a dev dependency for TypeScript support.

How do I run tests with Bun instead of Jest?

Use the built-in bun test command with imports from bun:test, which provides describe, it, expect, mock, and spyOn. It supports watch mode, coverage reports, grep filtering, and most Jest-style matchers without extra configuration.

Does Bun support Node.js APIs and npm packages?

Bun supports most Node.js APIs including fs, path, crypto, Buffer, and process globals, plus npm packages via bun install. Some features like require.resolve and setImmediate differ and have Bun-native equivalents.

How do I build a standalone executable with Bun?

Run bun build with the --compile flag and an --outfile to produce a single executable. You can cross-compile for other platforms using --target, such as bun-linux-x64 or bun-darwin-arm64.

When should I use Bun.serve instead of Express?

Use Bun.serve when you want native HTTP and WebSocket handling with lower overhead than frameworks like Express. For a structured framework on Bun, Elysia is optimized for the runtime.