llms.txt
Compare with other sites' llms.txt files →# Bun
## Docs
- [Welcome to Bun](https://bun.com/docs/index.md): Bun is an all-in-one toolkit for developing modern JavaScript/TypeScript applications.
- [Installation](https://bun.com/docs/installation.md): Install Bun with npm, Homebrew, Docker, or the official script.
- [Quickstart](https://bun.com/docs/quickstart.md): Build your first app with Bun
- [TypeScript](https://bun.com/docs/typescript.md): Using TypeScript with Bun, including type definitions and compiler options
- [TypeScript 6 and 7](https://bun.com/docs/typescript-6.md): How to configure Bun's type definitions for TypeScript 6.0 and 7.0, which no longer auto-discover @types packages. Fix 'Cannot find name Bun' and other missing type errors after upgrading TypeScript.
- [bun init](https://bun.com/docs/runtime/templating/init.md): Scaffold an empty Bun project with the interactive `bun init` command
- [bun create](https://bun.com/docs/runtime/templating/create.md): Create a new Bun project from a React component, a `create-<template>` npm package, a GitHub repo, or a local template
- [Bun Runtime](https://bun.com/docs/runtime/index.md): Execute JavaScript/TypeScript files, package.json scripts, and executable packages with Bun's fast runtime.
- [Watch Mode](https://bun.com/docs/runtime/watch-mode.md): Automatic reloading in Bun with --watch and --hot modes
- [Debugging](https://bun.com/docs/runtime/debugger.md): Debug your Bun code with an interactive debugger using WebKit Inspector Protocol
- [REPL](https://bun.com/docs/runtime/repl.md): An interactive JavaScript and TypeScript REPL with syntax highlighting, history, and tab completion
- [bunfig.toml](https://bun.com/docs/runtime/bunfig.md): Configure Bun's behavior using its configuration file bunfig.toml
- [File Types](https://bun.com/docs/runtime/file-types.md): File types and loaders supported by Bun's bundler and runtime
- [Module Resolution](https://bun.com/docs/runtime/module-resolution.md): How Bun resolves modules and handles imports in JavaScript and TypeScript
- [JSX](https://bun.com/docs/runtime/jsx.md): Built-in JSX and TSX support in Bun with configurable transpilation options
- [Auto-install](https://bun.com/docs/runtime/auto-install.md): Bun's automatic package installation feature for standalone script execution
- [Plugins](https://bun.com/docs/runtime/plugins.md): Universal plugin API for extending Bun's runtime and bundler
- [File System Router](https://bun.com/docs/runtime/file-system-router.md): Bun provides a fast API for resolving routes against file-system paths
- [Server](https://bun.com/docs/runtime/http/server.md): Use `Bun.serve` to start a high-performance HTTP server in Bun
- [Routing](https://bun.com/docs/runtime/http/routing.md): Define routes in `Bun.serve` using static paths, parameters, and wildcards
- [Cookies](https://bun.com/docs/runtime/http/cookies.md): Work with cookies in HTTP requests and responses using Bun's built-in Cookie API.
- [TLS](https://bun.com/docs/runtime/http/tls.md): Enable TLS in Bun.serve
- [Error Handling](https://bun.com/docs/runtime/http/error-handling.md): Learn how to handle errors in Bun's development server
- [Metrics](https://bun.com/docs/runtime/http/metrics.md): Monitor server activity with built-in metrics
- [Fetch](https://bun.com/docs/runtime/networking/fetch.md): Send HTTP requests with Bun's fetch API
- [WebSockets](https://bun.com/docs/runtime/http/websockets.md): Server-side WebSockets in Bun
- [TCP](https://bun.com/docs/runtime/networking/tcp.md): Use Bun's native TCP API to implement performance-sensitive systems like database clients, game servers, or anything that needs to communicate over TCP (instead of HTTP)
- [UDP](https://bun.com/docs/runtime/networking/udp.md): Use Bun's UDP API to implement services with advanced real-time requirements, such as voice chat.
- [DNS](https://bun.com/docs/runtime/networking/dns.md): Use Bun's DNS module to resolve DNS records
- [Cookies](https://bun.com/docs/runtime/cookies.md): Use Bun's native APIs for working with HTTP cookies
- [File I/O](https://bun.com/docs/runtime/file-io.md): Bun provides a set of optimized APIs for reading and writing files.
- [Streams](https://bun.com/docs/runtime/streams.md): Use Bun's streams API to work with binary data without loading it all into memory at once
- [Binary Data](https://bun.com/docs/runtime/binary-data.md): Working with binary data in JavaScript
- [Archive](https://bun.com/docs/runtime/archive.md): Create and extract tar archives with Bun's fast native implementation
- [SQL](https://bun.com/docs/runtime/sql.md): Bun provides native bindings for working with SQL databases through a unified Promise-based API that supports PostgreSQL, MySQL, and SQLite.
- [SQLite](https://bun.com/docs/runtime/sqlite.md): Bun natively implements a high-performance SQLite3 driver.
- [S3](https://bun.com/docs/runtime/s3.md): Bun provides fast, native bindings for interacting with S3-compatible object storage services.
- [Redis](https://bun.com/docs/runtime/redis.md): Use Bun's native Redis client with a Promise-based API
- [Workers](https://bun.com/docs/runtime/workers.md): Use Bun's Workers API to create and communicate with a new JavaScript instance running on a separate thread while sharing I/O resources with the main thread
- [Environment Variables](https://bun.com/docs/runtime/environment-variables.md): Read and configure environment variables in Bun, including automatic .env file support
- [Shell](https://bun.com/docs/runtime/shell.md): Use Bun's shell scripting API to run shell commands from JavaScript
- [Spawn](https://bun.com/docs/runtime/child-process.md): Spawn child processes with `Bun.spawn` or `Bun.spawnSync`
- [WebView](https://bun.com/docs/runtime/webview.md): Control a headless browser from Bun for automation, testing, and scraping — zero dependencies on macOS, Chrome DevTools Protocol everywhere else
- [Cron](https://bun.com/docs/runtime/cron.md): Schedule and parse cron jobs with Bun
- [Node-API](https://bun.com/docs/runtime/node-api.md): Use Bun's Node-API module to build native add-ons to Node.js
- [FFI](https://bun.com/docs/runtime/ffi.md): Use Bun's FFI module to efficiently call native libraries from JavaScript
- [C Compiler](https://bun.com/docs/runtime/c-compiler.md): Compile and run C from JavaScript with low overhead
- [Transpiler](https://bun.com/docs/runtime/transpiler.md): Use Bun's transpiler to transpile JavaScript and TypeScript code
- [CSRF Protection](https://bun.com/docs/runtime/csrf.md): Generate and verify CSRF tokens with Bun's built-in API
- [Secrets](https://bun.com/docs/runtime/secrets.md): Use Bun's Secrets API to store and retrieve sensitive credentials securely
- [Console](https://bun.com/docs/runtime/console.md): The console object in Bun
- [TOML](https://bun.com/docs/runtime/toml.md): Use Bun's built-in support for TOML files through both runtime APIs and bundler integration
- [YAML](https://bun.com/docs/runtime/yaml.md): Use Bun's built-in support for YAML files through both runtime APIs and bundler integration
- [Markdown](https://bun.com/docs/runtime/markdown.md): Parse and render Markdown with Bun's built-in Markdown API, supporting GFM extensions and custom rendering callbacks
- [JSON5](https://bun.com/docs/runtime/json5.md): Use Bun's built-in support for JSON5 files through both runtime APIs and bundler integration
- [XML](https://bun.com/docs/runtime/xml.md): Use Bun's built-in support for XML through both runtime APIs and bundler integration
- [JSONL](https://bun.com/docs/runtime/jsonl.md): Parse newline-delimited JSON (JSONL) with Bun's built-in streaming parser
- [HTMLRewriter](https://bun.com/docs/runtime/html-rewriter.md): Use Bun's HTMLRewriter to transform HTML documents with CSS selectors
- [Image](https://bun.com/docs/runtime/image.md): Decode, transform, and encode images with a fast native pipeline
- [Hashing](https://bun.com/docs/runtime/hashing.md): Utility functions for hashing and verifying passwords with various cryptographically secure algorithms
- [Glob](https://bun.com/docs/runtime/glob.md): Use Bun's fast native implementation of file globbing
- [Semver](https://bun.com/docs/runtime/semver.md): Use Bun's semantic versioning API
- [Color](https://bun.com/docs/runtime/color.md): Format colors as CSS, ANSI, numbers, hex strings, and more
- [Utils](https://bun.com/docs/runtime/utils.md): Use Bun's utility functions to work with the runtime
- [Globals](https://bun.com/docs/runtime/globals.md): Use Bun's global objects
- [Bun APIs](https://bun.com/docs/runtime/bun-apis.md): Overview of Bun's native APIs available on the Bun global object and built-in modules
- [Web APIs](https://bun.com/docs/runtime/web-apis.md): Web-standard APIs supported by Bun for server-side JavaScript
- [Node.js Compatibility](https://bun.com/docs/runtime/nodejs-compat.md): Bun's compatibility status with Node.js APIs, modules, and globals
- [Roadmap](https://bun.com/docs/project/roadmap.md): Bun's roadmap and long-term plans
- [Benchmarking](https://bun.com/docs/project/benchmarking.md): How to benchmark Bun
- [Contributing](https://bun.com/docs/project/contributing.md): Contributing to Bun
- [Building Windows](https://bun.com/docs/project/building-windows.md): Building Bun on Windows
- [Bindgen](https://bun.com/docs/project/bindgen.md): Bindgen for Bun
- [License](https://bun.com/docs/project/license.md): License for Bun
- [bun install](https://bun.com/docs/pm/cli/install.md): Install packages with Bun's fast package manager
- [bun add](https://bun.com/docs/pm/cli/add.md): Add packages to your project with Bun's fast package manager
- [bun remove](https://bun.com/docs/pm/cli/remove.md): Remove dependencies from your project
- [bun update](https://bun.com/docs/pm/cli/update.md): Update dependencies to the newest versions their ranges allow
- [bun dedupe](https://bun.com/docs/pm/cli/dedupe.md): Remove duplicate versions of packages from bun.lock
- [bun prune](https://bun.com/docs/pm/cli/prune.md): Remove packages that are not in bun.lock from node_modules
- [bunx](https://bun.com/docs/pm/bunx.md): Run packages from npm
- [bun publish](https://bun.com/docs/pm/cli/publish.md): Use `bun publish` to publish a package to the npm registry
- [bun outdated](https://bun.com/docs/pm/cli/outdated.md): Check for outdated dependencies
- [bun why](https://bun.com/docs/pm/cli/why.md): Explain why a package is installed
- [bun audit](https://bun.com/docs/pm/cli/audit.md): Check your installed packages for known security vulnerabilities
- [bun info](https://bun.com/docs/pm/cli/info.md): Display package metadata from the npm registry
- [Workspaces](https://bun.com/docs/pm/workspaces.md): Develop complex monorepos with multiple independent packages
- [Catalogs](https://bun.com/docs/pm/catalogs.md): Share common dependency versions across multiple packages in a monorepo
- [bun link](https://bun.com/docs/pm/cli/link.md): Link local packages for development
- [bun pm](https://bun.com/docs/pm/cli/pm.md): Package manager utilities
- [bun patch](https://bun.com/docs/pm/cli/patch.md): Persistently patch node_modules packages in a git-friendly way
- [bun --filter](https://bun.com/docs/pm/filter.md): Select packages by pattern in a monorepo using the --filter flag
- [Global cache](https://bun.com/docs/pm/global-cache.md): How Bun stores and manages packages in its global cache
- [Global virtual store](https://bun.com/docs/pm/global-store.md): Install packages once. Every project links to the same copy.
- [Isolated installs](https://bun.com/docs/pm/isolated-installs.md): Strict dependency isolation similar to pnpm's approach
- [Lockfile](https://bun.com/docs/pm/lockfile.md): Bun's lockfile format and configuration
- [Lifecycle scripts](https://bun.com/docs/pm/lifecycle.md): How Bun handles package lifecycle scripts securely
- [Scopes and registries](https://bun.com/docs/pm/scopes-registries.md): Configure private registries and scoped packages
- [Overrides and resolutions](https://bun.com/docs/pm/overrides.md): Control metadependency versions with npm overrides and Yarn resolutions
- [Security Scanner API](https://bun.com/docs/pm/security-scanner-api.md)
- [.npmrc support](https://bun.com/docs/pm/npmrc.md)
- [Bundler](https://bun.com/docs/bundler/index.md): Bun's fast native bundler for JavaScript, TypeScript, JSX, and more
- [Fullstack dev server](https://bun.com/docs/bundler/fullstack.md): Build fullstack applications with Bun's integrated dev server that bundles frontend assets and handles API routes
- [Hot reloading](https://bun.com/docs/bundler/hot-reloading.md): Hot Module Replacement (HMR) for Bun's development server
- [HTML & static sites](https://bun.com/docs/bundler/html-static.md): Build static sites, landing pages, and web applications with Bun's bundler
- [Standalone HTML](https://bun.com/docs/bundler/standalone-html.md): Bundle a single-page app into a single self-contained .html file with no external dependencies
- [CSS](https://bun.com/docs/bundler/css.md): Bun's bundler has built-in support for CSS with modern features
- [Loaders](https://bun.com/docs/bundler/loaders.md): Built-in loaders for the Bun bundler and runtime
- [Single-file executable](https://bun.com/docs/bundler/executables.md): Generate standalone executables from TypeScript or JavaScript files with Bun
- [Plugins](https://bun.com/docs/bundler/plugins.md): Universal plugin API for extending Bun's runtime and bundler
- [Macros](https://bun.com/docs/bundler/macros.md): Run JavaScript functions at bundle-time with Bun macros
- [Bytecode Caching](https://bun.com/docs/bundler/bytecode.md): Speed up JavaScript execution with bytecode caching in Bun's bundler
- [Minifier](https://bun.com/docs/bundler/minifier.md): Reduce bundle sizes with Bun's JavaScript and TypeScript minifier
- [esbuild](https://bun.com/docs/bundler/esbuild.md): Migration guide from esbuild to Bun's bundler
- [Test runner](https://bun.com/docs/test/index.md): Bun's fast, built-in, Jest-compatible test runner with TypeScript support, lifecycle hooks, mocking, and watch mode
- [Writing tests](https://bun.com/docs/test/writing-tests.md): Write tests with Bun's Jest-compatible API, including async tests, timeouts, and test modifiers
- [Test configuration](https://bun.com/docs/test/configuration.md): Configure bun test behavior with bunfig.toml and command-line options
- [Runtime behavior](https://bun.com/docs/test/runtime-behavior.md): Learn about Bun test's runtime integration, environment variables, timeouts, and error handling
- [Finding tests](https://bun.com/docs/test/discovery.md): Learn how Bun's test runner discovers and filters test files in your project
- [Parallel & isolated test runs](https://bun.com/docs/test/parallel.md): Run test files across CPU cores with --parallel, isolate files from each other with --isolate, run tests within a file concurrently, and split suites across CI machines with --shard and --timings
- [Lifecycle hooks](https://bun.com/docs/test/lifecycle.md): Learn how to use beforeAll, beforeEach, afterEach, and afterAll lifecycle hooks in Bun tests
- [Mocks](https://bun.com/docs/test/mocks.md): Learn how to create and use mock functions, spies, and module mocks in Bun tests
- [Snapshots](https://bun.com/docs/test/snapshots.md): Learn how to use snapshot testing in Bun to save and compare output between test runs
- [Dates and times](https://bun.com/docs/test/dates-times.md): Learn how to manipulate time and dates in your Bun tests using setSystemTime and Jest compatibility functions
- [DOM testing](https://bun.com/docs/test/dom.md): Learn how to test DOM elements and components using Bun with happy-dom and React Testing Library
- [Code coverage](https://bun.com/docs/test/code-coverage.md): Use Bun's built-in code coverage reporting to track test coverage and find untested code
- [Test Reporters](https://bun.com/docs/test/reporters.md)
- [Guides](https://bun.com/docs/guides/index.md): Code samples and walkthroughs for common tasks with Bun
- [Deploy a Bun application on Vercel](https://bun.com/docs/guides/deployment/vercel.md)
- [Deploy a Bun application on Railway](https://bun.com/docs/guides/deployment/railway.md): Deploy a Bun application to Railway from the CLI or dashboard, with optional PostgreSQL setup and automatic SSL
- [Deploy a Bun application on Render](https://bun.com/docs/guides/deployment/render.md)
- [Deploy a Bun application on AWS Lambda](https://bun.com/docs/guides/deployment/aws-lambda.md)
- [Deploy a Bun application on DigitalOcean](https://bun.com/docs/guides/deployment/digital-ocean.md)
- [Deploy a Bun application on Google Cloud Run](https://bun.com/docs/guides/deployment/google-cloud-run.md)
- [Install TypeScript declarations for Bun](https://bun.com/docs/guides/runtime/typescript.md)
- [Re-map import paths](https://bun.com/docs/guides/runtime/tsconfig-paths.md)
- [Debugging Bun with the VS Code extension](https://bun.com/docs/guides/runtime/vscode-debugger.md)
- [Debugging Bun with the web debugger](https://bun.com/docs/guides/runtime/web-debugger.md)
- [Inspect memory usage using V8 heap snapshots](https://bun.com/docs/guides/runtime/heap-snapshot.md)
- [Build-time constants with --define](https://bun.com/docs/guides/runtime/build-time-constants.md)
- [Define and replace static globals & constants](https://bun.com/docs/guides/runtime/define-constant.md)
- [Install and run Bun in GitHub Actions](https://bun.com/docs/guides/runtime/cicd.md)
- [Codesign a single-file JavaScript executable on macOS](https://bun.com/docs/guides/runtime/codesign-macos-executable.md): Fix the "can't be opened because it is from an unidentified developer" Gatekeeper warning when running your JavaScript executable.
- [Upgrade Bun to the latest version](https://bun.com/docs/guides/util/upgrade.md)
- [Detect when code is executed with Bun](https://bun.com/docs/guides/util/detect-bun.md)
- [Get the current Bun version](https://bun.com/docs/guides/util/version.md)
- [Hash a password](https://bun.com/docs/guides/util/hash-a-password.md)
- [Generate a UUID](https://bun.com/docs/guides/util/javascript-uuid.md)
- [Encode and decode base64 data](https://bun.com/docs/guides/util/base64.md)
- [Compress and decompress data with gzip](https://bun.com/docs/guides/util/gzip.md)
- [Compress and decompress data with DEFLATE](https://bun.com/docs/guides/util/deflate.md)
- [Escape an HTML string](https://bun.com/docs/guides/util/escape-html.md)
- [Check if two objects are deeply equal](https://bun.com/docs/guides/util/deep-equals.md)
- [Sleep for a fixed number of milliseconds](https://bun.com/docs/guides/util/sleep.md)
- [Convert a file URL to an absolute path](https://bun.com/docs/guides/util/file-url-to-path.md)
- [Convert an absolute path to a file URL](https://bun.com/docs/guides/util/path-to-file-url.md)
- [Get the path to an executable bin file](https://bun.com/docs/guides/util/which-path-to-executable-bin.md)
- [Get the directory of the current file](https://bun.com/docs/guides/util/import-meta-dir.md)
- [Get the file name of the current file](https://bun.com/docs/guides/util/import-meta-file.md)
- [Get the absolute path of the current file](https://bun.com/docs/guides/util/import-meta-path.md)
- [Check if the current file is the entrypoint](https://bun.com/docs/guides/util/entrypoint.md)
- [Get the absolute path to the current entrypoint](https://bun.com/docs/guides/util/main.md)
- [Build an app with Astro and Bun](https://bun.com/docs/guides/ecosystem/astro.md)
- [Create a Discord bot](https://bun.com/docs/guides/ecosystem/discordjs.md)
- [Containerize a Bun application with Docker](https://bun.com/docs/guides/ecosystem/docker.md)
- [Use Drizzle ORM with Bun](https://bun.com/docs/guides/ecosystem/drizzle.md)
- [Use Gel with Bun](https://bun.com/docs/guides/ecosystem/gel.md)
- [Build an HTTP server using Elysia and Bun](https://bun.com/docs/guides/ecosystem/elysia.md)
- [Build an HTTP server using Express and Bun](https://bun.com/docs/guides/ecosystem/express.md)
- [Build an HTTP server