| name | bun-docs |
| description | Use when working with the Bun JavaScript runtime, package manager, bundler, or test runner: HTTP server, file I/O, SQLite, S3, Redis, shell scripting, FFI, workers, WebSocket, bunfig, bun install, bun test, bun build, bundler plugins, loaders, executables, macros, or any Bun API and configuration. |
Bun Documentation
Official Bun docs (sourced from github.com/oven-sh/bun/docs).
CRITICAL: grep references/ for keywords before answering.
Topic Index
Runtime
runtime/ โ Core runtime: watch mode, debugger, REPL, bunfig
runtime/http/ โ HTTP server, routing, cookies, TLS, WebSocket, metrics
runtime/networking/ โ fetch, TCP, UDP, DNS
runtime/file-io.mdx โ File I/O, streams, binary data
runtime/sql.mdx, runtime/sqlite.mdx โ SQL, SQLite
runtime/s3.mdx, runtime/redis.mdx โ S3, Redis
runtime/shell.mdx โ Shell scripting ($...)
runtime/workers.mdx โ Web Workers
runtime/ffi.mdx, runtime/c-compiler.mdx โ FFI, C compiler
runtime/plugins.mdx โ Runtime plugins
runtime/jsx.mdx, runtime/typescript.mdx โ JSX, TypeScript
Package Manager
pm/cli/ โ install, add, remove, update, publish, audit, link, patch, outdated
pm/workspaces.mdx โ Workspaces
pm/lockfile.mdx โ Lockfile format
pm/overrides.mdx โ Dependency overrides
pm/scopes-registries.mdx โ Scopes and registries
Bundler
bundler/ โ Bun.build(), plugins, loaders, macros, CSS, HTML
bundler/executables.mdx โ Single-file executables
bundler/fullstack.mdx โ Fullstack dev server
bundler/hot-reloading.mdx โ Hot module reloading
Test Runner
test/ โ bun test: writing tests, mocks, snapshots, lifecycle, DOM, coverage, reporters
Guides
guides/ecosystem/ โ Framework integration: Next.js, React, Vite, Express, Hono, Elysia, Prisma, Docker...
guides/deployment/ โ Deploy to Vercel, Railway, AWS Lambda, etc.
guides/http/ โ HTTP recipes: server, fetch, proxy, SSE, file uploads, streaming
guides/websocket/ โ WebSocket: simple, pub/sub, compression
guides/test/ โ Testing recipes: Jest migration, mocks, coverage, happy-dom
guides/install/ โ Package management recipes
guides/binary/ โ Binary data conversions (ArrayBuffer, Buffer, Blob, TypedArray)
guides/streams/ โ Stream conversions
guides/read-file/, guides/write-file/ โ File I/O recipes
guides/process/ โ Process: spawn, IPC, signals, stdin
guides/runtime/ โ Runtime recipes: env vars, TypeScript, debugging, CI/CD
guides/util/ โ Utilities: hashing, UUID, base64, gzip, sleep