Mindket

Bun

Newversion 2 · updated
Star96.7k

Overview

The all-in-one toolkit for JavaScript and TypeScript apps. One executable holds a Node.js-compatible runtime, a package manager, a test runner and a bundler. The notes cover every platform, Docker, GitHub Actions, Claude Code and Cursor.

Bun is an open-source project on GitHub in the Developer category, listed by Mindket. It is free. This is version 2, last updated on . Install it from GitHub as its README says. Get Mindket’s setup notes on your Mindket account, as a zip.

At a glance

Runs in
  • Your own machine: Linux and Windows on x64 or arm64, and macOS on Intel or Apple Silicon, through the install script, npm, Homebrew or Scoop
  • Docker: the oven/bun image, with debian, slim, distroless and alpine variants
  • GitHub Actions: the oven-sh/setup-bun action
  • Hosting: guides for Vercel, Railway, Render, AWS Lambda, DigitalOcean and Google Cloud Run
Start with
curl -fsSL https://bun.com/install | bash

Platform

LinuxOperating system
macOSOperating system
WindowsOperating system
DockerContainer
ClaudeAI chat
CursorCode editor

And 1 more in Where to use it

About

What it is

Bun is an all-in-one toolkit for JavaScript and TypeScript apps, made by the oven-sh team. It ships as a single executable called bun. Its core is a fast runtime that the README calls a drop-in replacement for Node.js, built on JavaScriptCore. The same command also runs tests and package.json scripts, installs packages and bundles code. It runs TypeScript and JSX with no setup.

  1. bun install reads package.json and writes bun.lock
  2. bun run index.ts runs TypeScript or JSX as it is
  3. bun test runs your tests in the Bun runtime
  4. bun build bundles code for the browser, Bun or Node
  5. bunx installs an npm package to Bun’s cache and runs it

Who it suits

JavaScript and TypeScript developers who want one tool where they now use a runtime, a package manager, a test runner and a bundler. The README says Bun’s built-in tools work in existing Node.js projects with little to no changes, so you can try one piece at a time. The install command, for example, works without Bun’s runtime.

Who uses it, and how
IndustryWho uses itHow they use itExample
Web and SaaS teamsFull-stack and front-end developersRun a TypeScript server with Bun.serve, add packages and serve an HTML file from the same projectA developer starts with bun init, adds a route to Bun.serve and imports an index.html to serve at the root.
Open sourceLibrary maintainersSwap npm install for bun install and run the suite with bun testA maintainer runs bun install in an existing repository, and Bun converts package-lock.json to bun.lock.
DevOps and CIBuild and platform engineersInstall Bun in a workflow and run installs and tests thereAn engineer adds oven-sh/setup-bun@v2 to a GitHub Actions job, then runs bun install and bun test.
Scripts and toolingDevelopers who write small toolsRun a TypeScript file straight away, or run an npm tool with bunx, which auto-installs it into Bun’s global cacheA developer formats a file with bunx prettier foo.js.
Teams with coding agentsDevelopers who use Claude Code or CursorLet bun init write the agent rules and keep test output shortA developer runs CLAUDECODE=1 bun test and sees only the failures and the summary.

Check the compatibility page first if your project leans on a Node.js module that it rates as partly implemented. node:https is one, and the page lists what is missing.

Where to use it

Bun runs on Linux, macOS and Windows, and the docs cover several places to put it.

  • Your own machine: Linux and Windows on x64 or arm64, and macOS on Intel or Apple Silicon, through the install script, npm, Homebrew or Scoop
  • Docker: the oven/bun image, with debian, slim, distroless and alpine variants
  • GitHub Actions: the oven-sh/setup-bun action
  • Hosting: guides for Vercel, Railway, Render, AWS Lambda, DigitalOcean and Google Cloud Run
  • Coding agents: bun init writes a CLAUDE.md when it detects the Claude CLI and a Cursor rule when it detects Cursor. bun test has a quiet mode for Claude Code, Replit and any agent that sets AGENT=1

The docs also have guides for frameworks such as Next.js, Astro, Remix and SvelteKit, and for libraries such as Express, Hono and Drizzle.

How to set it up

Get it saves a zip of Mindket’s setup notes in your downloads folder, with the steps for each platform from Bun’s docs. The main route is one install line.

What you need first
NeedDetail
Operating systemLinux, macOS 13.0 or later, or Windows 10 version 1809 or later
Linux extrasThe unzip package and glibc 2.17 or newer (Alpine and Void Linux use the musl build). The docs recommend kernel 5.6 or higher
ProcessorOn x64, Intel Nehalem or newer, or AMD Bulldozer or newer
Node.jsNot needed for the install script. The npm route needs npm
A terminalBash on macOS and Linux, PowerShell on Windows
  1. Run the install line for your system.
  2. Open a new terminal window and run bun --version to check it.
  3. If it says command not found, add the ~/.bun/bin folder to your PATH. The docs give the lines for macOS, Linux and Windows.
  4. Start a project with bun init, or run bun install in one you already have.
curl -fsSL https://bun.com/install | bash

On Windows, run this in PowerShell instead.

powershell -c "irm bun.sh/install.ps1|iex"

npm, Homebrew and Scoop work too. The first line pipes a script into bash.

npm install -g bun
brew install oven-sh/bun/bun
scoop install bun

How to use it

Type bun, then what you want to run. Put Bun’s own flags, such as --watch, right after bun.

bun run index.tsx
bun --watch run index.tsx
bun test
bun build ./index.tsx --outdir ./build
bunx cowsay "Hello world!"

The migration guide lists the swaps from npm.

From npm to Bun
What you donpmBun
Install dependenciesnpm installbun install
Run a package.json scriptnpm run my-scriptbun my-script
Run a filenode index.jsbun index.js
Run a package’s commandnpx cowsaybunx cowsay

Example

You start a new project from the Quickstart. You type:

bun init my-app
cd my-app
bun run index.ts

Bun asks you to pick a template, and you choose Blank. The last command prints Hello via Bun!. Then you replace index.ts with a small server.

const server = Bun.serve({
  port: 3000,
  routes: {
    "/": () => new Response('Bun!'),
  }
});

console.log(`Listening on ${server.url}`);

You run bun run index.ts again. It prints Listening on http://localhost:3000/, and the page at that address says Bun!. The Quickstart goes on to add a package with bun add figlet, then an HTML file, then a start script.

For newcomers and experts

If you are new. A runtime is the program that runs your JavaScript outside a browser. Node.js is another one. A package manager downloads the libraries your project uses. A bundler joins many files into a few that a browser can load. Bun does all three, and it runs your tests too, from one command. Start with bun init in an empty folder and follow the Quickstart. Bun runs TypeScript and JSX with no configuration. bun init still writes a tsconfig.json for bun check and editor autocomplete.

For experts. bun install does not run the lifecycle scripts of installed dependencies unless you list the package in trustedDependencies. It also optimizes the postinstall scripts of popular packages such as esbuild and sharp by working out which scripts need to run. The --frozen-lockfile flag installs exactly what bun.lock says and exits with an error if package.json disagrees. The --production flag implies it, and bun install --frozen-lockfile --dry-run checks the lockfile without installing.

Bun’s own flags go right after bun. bun --watch run dev works, while bun run dev --watch hands the flag to your script. Watch mode restarts the process, and --hot reloads the code without restarting it. A package whose script starts with a node shebang runs on node by default. Pass --bun to run it on Bun’s runtime. bun build checks types only when you pass --check.

Good to know

Bun runs on your machine. The docs mention network use for installs, updates and canary crash reports.

  • License: MIT. Bun statically links JavaScriptCore and WebKit, which are LGPL-2, and the license page lists the other libraries it links with their licenses. Read it before you ship a binary built with Bun
  • Install script: the Linux and macOS line pipes a downloaded script into bash, so read it first if you prefer
  • Updates: bun upgrade updates Bun. With Homebrew or Scoop, use brew upgrade bun or scoop update bun. Canary builds come from every commit to main, the docs call them untested, and they upload crash reports automatically
  • Network: bun install and bunx read from the npm registry, and bunx asks it for newer versions once a day. The runtime also auto-installs packages when a project has no node_modules folder (--install defaults to auto), and --no-install turns that off. The pages Mindket read describe no other telemetry
  • Dependency scripts: they stay off until you trust a package in package.json, the docs say other npm clients run them by default
  • Compatibility: the docs call a package that works in Node.js but not in Bun a bug in Bun. They rate each Node.js module and global as fully implemented, partly implemented or not implemented (node:sea is not implemented)
  • Removal: delete the .bun folder in your home folder, run powershell -c ~\.bun\uninstall.ps1 on Windows, or use your package manager’s uninstall

README and files

README

Bun: setup notes

This kit holds setup notes only. Mindket wrote them. Bun installs from its maker's repository and site: https://github.com/oven-sh/bun and https://bun.com

These notes are not made or endorsed by the Bun team. The README says Bun is "an all-in-one toolkit for JavaScript and TypeScript apps" that "ships as a single executable called bun". The documentation is at https://bun.com/docs

License: MIT. The docs license page (https://bun.com/docs/project/license) opens with "Bun itself is MIT-licensed." The LICENSE file in the repository (https://github.com/oven-sh/bun/blob/main/LICENSE.md) says the same, then covers what Bun links in. Bun statically links JavaScriptCore and WebKit, which are LGPL-2 licensed, and the page lists the other libraries it links, each with its own license. Read that page before you ship a Bun-built binary.

What installs

  • One executable, bun. The installation page calls it a single, dependency-free executable. The script and the package managers below all install the same program. Source: https://bun.com/docs/installation
  • With the install script, it goes in ~/.bun/bin (%USERPROFILE%\.bun\bin on Windows), the folder the page tells you to add to your PATH if bun is not found.
  • bunx comes with it. The bunx page says it is installed with bun. Source: https://bun.com/docs/pm/bunx
  • Nothing else is added to a project until you run bun init, bun install or bun add in it. Then Bun writes package.json, bun.lock and node_modules, as the pages for those commands describe.

What you need first

  • Linux, macOS (13.0 or later) or Windows (10 version 1809 or later). The README says Bun supports Linux (x64 and arm64), macOS (x64 and Apple Silicon) and Windows (x64 and arm64). Source: README and https://bun.com/docs/installation
  • On Linux, the unzip package. The page gives sudo apt install unzip.
  • On Linux, glibc 2.17 or newer for the glibc build. Alpine and Void Linux, which have no glibc, use the musl build. Source: https://bun.com/docs/installation
  • An x64 processor with SSE4.2: Intel Nehalem (1st gen Core) or newer, AMD Bulldozer or newer.
  • Node.js is not needed for the install script: the installation page calls bun a single, dependency-free executable. The npm route (npm install -g bun) needs npm.

Main install command

curl -fsSL https://bun.com/install | bash

On Windows, PowerShell:

powershell -c "irm bun.sh/install.ps1|iex"

Both lines are from the installation page (https://bun.com/docs/installation). The first one pipes a downloaded script into bash. Then check the install:

bun --version

Per-platform notes

  • setup/macos-and-linux.md
  • setup/windows.md
  • setup/package-managers.md: npm, Homebrew and Scoop
  • setup/docker.md: the oven/bun image
  • setup/github-actions.md: the setup-bun action and bun test in CI
  • setup/first-project.md: bun init, bun run, Bun.serve, bun add
  • setup/existing-node-project.md: bun install, bun run, bunx, bun test and bun build in a project you already have
  • setup/claude-code.md: the CLAUDE.md that bun init writes, and quiet test output
  • setup/cursor.md: the Cursor rule that bun init writes
  • setup/other-agents.md: the environment variables the docs name, and the docs index

Network, updates and removal

  • Bun upgrades itself: bun upgrade. A canary build is made from every commit to main and the docs call it untested. The installation page says canary builds upload crash reports automatically.
  • bunx and bun install read from the npm registry. bunx asks the registry for newer versions once a day. Source: https://bun.com/docs/pm/bunx
  • The runtime also auto-installs packages when a project has no node_modules folder (--install defaults to auto). --no-install turns it off. Source: https://bun.com/docs/runtime
  • The pages Mindket read describe no telemetry beyond those crash reports. They do not say that nothing else is sent.
  • Removal: delete the .bun folder in your home folder, or use your package manager's uninstall. The platform notes give the lines.

Security

Bun does not run the lifecycle scripts, such as postinstall, of installed dependencies unless you list the package in trustedDependencies in package.json. The page says this is for security. Your own project's scripts do run. Source: https://bun.com/docs/pm/cli/install

Sources

Files
README.md  5 KB
setup/claude-code.md  2 KB
setup/cursor.md  1 KB
setup/docker.md  2 KB
setup/existing-node-project.md  4 KB
setup/first-project.md  3 KB
setup/github-actions.md  2 KB
setup/macos-and-linux.md  3 KB
setup/other-agents.md  1 KB
setup/package-managers.md  1 KB
setup/windows.md  2 KB

11 files, 26 KB, downloaded as a zip.

What’s new

  • Version 2 · 2026-11-09

    Updated by Mindket to the current version of this kit.

  • Version 1 · 2026-11-03

Compare with similar

Listed GitHub projects in the same category that share the most topics with this one.

ProductStarsActivityLanguageLicenseLast change
Bun This page96,694ActiveRust—
reactShares javascript · react252,263ActiveJavaScriptMIT
angularShares javascript · typescript101,373ActiveTypeScriptMIT
Numbers as Mindket last read them, from 2026-11-07 to 2026-11-08. Activity is read from each project’s last change on GitHub: Active within 30 days, Quiet within 180, Stale after that.

Reviews

No ratings yet

Write a review

No reviews yet.

What people say

Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search and on Trendshift. Mindket doesn’t write or check them. Open one to read it where it was posted.

baggiiiieShow HN: yadiff, yet another diff viewer, based on pierre's diffshubas a big TUI user, i absolutely enjoy hunk https://github.com/modem-dev/hunk. tho when it comes to reading diffs i still prefer GUI somehow made a local version of @pierrecomputer's diffshub.com for reviewing codes, with jj support and review copying to directly send to agents :D huge shoutout to…2 points · 1 replyphilpaxone wonders if this could be a precursor to a fully-native embeddable strongly-typed TypeScript JITted runtime, perhaps by using the same kinds of assumptions as github.com/oven-sh/bun/...11 likes · 2 replies@jakeboone02@bunjavascript Really wish there was more focus on test coverage ( https://t.co/0Oj8uFV1Ym) and reporting layout (https://t.co/7F00sCMSTj)r/cherrypickedhqbun: a faster Node-compatible runtime that does it allcolinmarcBun 1.4.4 removes compromised eMudhra certsI debated putting this editorializing in the title, but: At $work we've been refreshing the Bun release page for days, wondering when they would push the fix. The PR with the change merged over 72 hours ago: https://github.com/oven-sh/bun/commit/ea6a2c7b7c98862627760d... I'm not a security expert,…Chad LoderAs of a couple hours ago: nodejs/node#66871 merged on 2026-10-20; the latest release, v26.12.0, is from 2026-10-14 oven-sh/bun#46159 merged on 2026-10-20; the latest release, v1.4.3, is from 2026-10-10 mise: jdx/mise#14781 is merged, but 2026.10.17 isn't published yet fnm: no upstream activity!?12 likes@YuzhiyanLucianBun 是一套 JavaScript 和 TypeScript 开发工具,集成了运行时、包管理器、测试工具和打包工具。 它可以直接运行 TypeScript 文件,也支持安装 npm 包。常用命令包括 bun install、bun run 和 bun test,写脚本、开发 Web 应用都能用到。 https://t.co/LpRHqb4dGXlocknitpickerCloudflare acquires Deno> Development stalled? Here are the stats on commits to Bun in the past six months You know you're putting up bullshit metrics, not much different than counting lines of code touched by commits. If you were forthcoming and showed relevant metrics such as release cadence (i.e., what projects…~/Downloads/jack.cabBun might be vulnerable too? github.com/oven-sh/bun/...2 likes · 1 reply@T1doo_AIJavaScript 项目要装依赖、跑测试,工具切来切去?🥟 Bun 把 JS 运行时、包管理、测试和打包放进一个工具。新项目可以试试。⚡ https://t.co/TGXHk8CMY8 #JavaScript #浇朋友 #蓝朋友 #互关 #fovendiddyShopify is moving from React Native back to Swift and KotlinBut this is way faster than GitHub isn't it: https://diffshub.com/oven-sh/bun/pull/30412 Compare that to this: https://github.com/oven-sh/bun/pull/30412/changes I agree there are limitations bc of physics, but I don't think it explains this particular difference.@ur-echosphere.bsky.socialBun公式では1.0.21以上、1.4.4未満が対象。1.4.4で修正済みです。 通常のfetchは、取得先が返したBrotli圧縮の応答を自動で展開します。接続先が攻撃者なら、その返事が欠陥のある展開器へ届く。💎 ただし公式は、Bunでの攻撃は未検証と明記。任意コード実行のリスクと、実証済みの乗っ取りは別です。 https://github.com/oven-sh/bun/security/advisories/GHSA-663w-cv8g-jj2p1 reply

Searched

More from Mindket

See all from Mindket

Huashu Design

alchaincyf · Skill

Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…

New29.4k

Guizang PPT Skill

op7418 · Skill

Skill that makes single-file HTML slide decks, slide illustrations and platform covers in two visual styles, with a presenter mode for rehearsal. For speakers…

New29.8k

Claude Code Skills & Plugins

alirezarezvani · Skill

Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…

New29.8k

Similar projects

See all in Developer

freeCodeCamp

freeCodeCamp · Kit

The open source codebase and curriculum of freeCodeCamp.org, a community where you can learn to code for free, run by a donor-supported 501(c)(3) charity. The…

New459k

react

react · Kit

A JavaScript library for building web and native user interfaces from components that manage their own state. For developers who want to adopt it in a whole ap…

New252k

Immich

immich-app · Kit

Immich’s AGPL-licensed server for your photos and videos, with a web app and phone apps. The phone backs up to it and it groups faces. These notes cover Docker…

New118k