Bun
SKILL.md
Bun Skill Reference
Product Summary
Bun is an all-in-one JavaScript/TypeScript toolkit written in Zig and powered by JavaScriptCore. It ships as a single executable (bun) that replaces Node.js, npm, Jest, and esbuild with dramatically faster alternatives. Key components: Runtime (bun run) for executing JS/TS files, Package Manager (bun install) for dependency management, Test Runner (bun test) for Jest-compatible testing, and Bundler (bun build) for production builds. Configuration lives in bunfig.toml (optional) and package.json. Primary docs: https://bun.com/docs
When to Use
- Running scripts: Execute TypeScript/JSX directly without compilation overhead (
bun run script.ts) - Package management: Install dependencies 25x faster than npm with
bun install - Testing: Run Jest-compatible tests with TypeScript support and watch mode (
bun test) - Building: Bundle applications for browsers, servers, or standalone executables (
bun build) - HTTP servers: Create high-performance servers with
Bun.serve()and built-in routing - File operations: Read/write files with optimized APIs (
Bun.file(),Bun.write()) - Replacing Node.js workflows: Drop-in replacement for existing Node.js projects with minimal changes