Repolode
oven-sh

oven-sh/bun

A fast all-in-one JavaScript and TypeScript toolkit: runtime, bundler, test runner, and package manager in a single executable.

Open-source alternative to:Node.jsnpm

Stars
96,300
Forks
5,147
Open issues
9,291
Last commit
17 hours ago

What is it?

Bun is an all-in-one toolkit for JavaScript and TypeScript projects, distributed as a single executable named bun. Its core is a JavaScript runtime written in Rust and powered by JavaScriptCore, designed as a drop-in replacement for Node.js. TypeScript and JSX run directly without extra configuration.

Beyond the runtime, the same binary provides a test runner, a script runner, a Node.js-compatible package manager, and a bundler. It also includes built-in APIs for HTTP servers, SQLite, PostgreSQL, Redis, S3, WebSockets, and FFI. Bun runs on Linux, macOS, and Windows, and can be installed with a shell script, npm, Homebrew, or Docker.

It suits developers who want to replace a stack of separate tools such as Node, npm, a bundler, and a test framework with one command, or who are looking to speed up existing Node.js projects with minimal changes.

Key features

  • 01Runs TypeScript and JSX without extra configuration
  • 02Node.js-compatible package manager with workspaces and lockfiles
  • 03Built-in bundler with HMR, plugins, and single-file executables
  • 04Jest-style test runner with mocks, snapshots, and coverage
  • 05Built-in clients for SQLite, PostgreSQL, Redis, and S3
  • 06Built-in HTTP server and WebSocket support

Use cases

  • Replacing Node.js and npm in an existing project to speed up startup and installs
  • Running a full-stack app with a built-in server, bundler, and HMR during development
  • Running unit tests for TypeScript code without a separate test framework
  • Building a single-file executable for distributing a JavaScript CLI

Quick start

  1. 1

    Install Bun with the install script

    Install with the official instructions in the README
  2. 2

    Run a TypeScript file directly

    bun run index.tsx
  3. 3

    Run the tests

    bun test

Things to know

  • Linux kernel 5.1 minimum (5.6+ recommended), and x64 CPUs may need to meet specific CPU requirements.
  • The license is listed as NOASSERTION in the metadata, so check the repository's license terms before relying on it.

Topics

FAQ

What is bun?
A fast all-in-one JavaScript and TypeScript toolkit: runtime, bundler, test runner, and package manager in a single executable. Bun is an all-in-one toolkit for JavaScript and TypeScript projects, distributed as a single executable named bun. Its core is a JavaScript runtime written in Rust and powered by JavaScriptCore, designed as a drop-in replacement for Node.js. TypeScript and JSX run directly without extra configuration.
Is bun free to use? What license does it have?
bun is open source under the Other license. Check the license terms before using it in commercial products.
Is bun still maintained?
Actively maintained. The last commit to bun was on Oct 19, 2026.
What can I use bun for?
Replacing Node.js and npm in an existing project to speed up startup and installs Running a full-stack app with a built-in server, bundler, and HMR during development Running unit tests for TypeScript code without a separate test framework Building a single-file executable for distributing a JavaScript CLI
How do I install bun?
Install Bun with the install script Run a TypeScript file directly: bun run index.tsx Run the tests: bun test
Where can I get bun?
The source code and installation instructions are on GitHub: https://github.com/oven-sh/bun

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects