Elestia Open Source Ratings
7.0

Bun Shell

A strong pick. 4th of 8 shell and process tools.

Bun Shell (Bun.$) is a bash-like shell interpreter built into the Bun runtime. It escapes interpolated values by default and runs common builtins natively on every OS, including Windows. It is a strong, zero-dependency pick for projects that already run on Bun. It does not work in Node.js or Deno, and it lacks some bash features.

Best for: Teams whose project already runs on Bun and who want cross-platform shell scripts in TypeScript with no extra dependency.

WebsiteGitHubnpm

Scores

Overall7.0

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 6.5, likely 5.5 to 7.5

For a project already on Bun, it is the natural choice. It is built in, safe by default, cross-platform and fast. For most JS developers it is not an option, because it does not run on Node, where execa, zx and tinyexec do the job. Gaps in bash coverage and the fresh Rust rewrite keep it below the top of the category.

GPT-6.2 Sol: 7.5, likely 6.4 to 8.5

Pick Bun Shell for a new Bun-based project that needs Bash-like pipelines and common commands across operating systems. The API is concise, the shell ships with the runtime, and recent releases fix concrete scripting problems. For Node-based projects that need detailed subprocess control, Execa is the stronger default. Differences from Bash and limited evidence about shell-specific adoption keep the range wide.

Needed by many4.1

How many developers need a tool for this job?

Claude Opus 5.5: 4.0, likely 3.0 to 5.5

Running shell commands from JS is a common need, mostly for build and automation scripts. Bun Shell serves only developers who run Bun, which is a growing but still minority runtime. That makes it narrower than zx or execa, which work on Node.

GPT-6.2 Sol: 4.1, likely 3.0 to 5.3

Running commands from JavaScript is useful for builds, CI, and local automation. Bun Shell’s built-ins make those scripts easier to share across operating systems, but every script needs Bun installed. Developer surveys show a substantial Bun audience and leave the size of the shell scripting audience uncertain.

Helps a lot7.4

How well does it do the job for those who need it?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

It has a clean zx-style template API, safe escaping by default, native cross-platform builtins, pipes and redirects, and output helpers. Builtins run in-process, so scripts heavy on builtins are fast. Bash coverage is incomplete, and some reports describe beta-level rough edges. dax has more mature command implementations.

GPT-6.2 Sol: 7.8, likely 6.6 to 8.8

Bun 1.4.5 gives scripts pipes, globs, JavaScript redirection, and errors that carry the exit code and captured output. The examples and `@types/bun` give coding agents a clear starting point, though shell syntax inside a template still needs runtime testing. Incomplete Bash coverage and reported Windows parsing problems lower the score. Recent independent performance and agent-correctness data are sparse.

Holds up over time7.8

Will it still be a good choice in two years?

Claude Opus 5.5: 7.5, likely 6.0 to 8.5

Bun is very active: 4,719 commits and 18 releases in the last year, with v1.4.5 out two days ago. Since the December 2025 acquisition, Anthropic employs the team and pays for the work. The main risk is the large AI-assisted rewrite from Zig to Rust that shipped in v1.4. Critics say the million-plus lines were not reviewed well enough. There are also 3,611 open issues and 3,469 open pull requests.

GPT-6.2 Sol: 8.0, likely 6.9 to 9.0

Anthropic funds Bun, and the repository shipped 18 releases over the past year. Releases 1.4.3 and 1.4.4 fixed shell hangs and file command behavior. A small repo-wide sample showed quick responses, but the open Windows parsing report and the recent Rust rewrite leave some uncertainty about compatibility and shell-specific turnaround.

Used widely5.1

How many use it, and is that growing?

Claude Opus 5.5: 5.5, likely 4.0 to 7.0

Bun's npm downloads grew about 10.8x year over year, well above the 4.1 median, and it has 21,486 dependent repos. These numbers count all of Bun, and only a fraction of Bun users write shell scripts with Bun.$. Many also install Bun outside npm. A fair estimate is tens of thousands of projects, and the number is growing with Bun.

  • npm downloadsLast4Weeks: 24.1M now vs 2.2M a year ago (~10.8x)
  • dependents repos: 21,486 repos depend on bun (for all of Bun)
  • hackerNews stories: Only one small Show HN story about the shell itself
  • peers zx downloadsLast4Weeks: zx has 11.7M downloads but only 2,228 dependent repos

GPT-6.2 Sol: 4.6, likely 2.8 to 6.2

Bun’s four-week npm downloads rose 10.8× year over year, above the 4.1× catalog baseline. Its 21,486 tracked dependent repositories exceed zx’s 2,228 and trail Execa’s 932,013. Downloads, dependents, stars, and Bluesky activity all cover the whole toolkit, and the top Bluesky posts mostly concern the Rust rewrite. Direct shell use is visible in public code, but its scale and growth are hard to estimate.

  • npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, medianDownloadsRatio: 24.1 million versus 2.23 million installs for the full toolkit
  • dependents repos, peers dependentRepos: Bun sits between zx and Execa on tracked repositories
  • project note, github stars, bluesky posts, bluesky top, hackerNews top: 96,818 stars and 97 Bluesky posts cover Bun broadly; one small HN story concerns the shell
  • github.com/anomalyco/opencode/blob/dev/packages/script/src/index.ts: Direct Bun Shell use in OpenCode release tooling
Vouched for5.4

Who stands behind it being good?

Claude Opus 5.5: 5.0, likely 3.5 to 6.5

Anthropic stands behind Bun, uses it for Claude Code, and pays for it. That backs the runtime more than the shell. Independent write-ups of the shell are mostly blog posts and comparison guides, not production case studies or survey data about the shell itself.

GPT-6.2 Sol: 5.7, likely 4.2 to 7.0

OpenCode uses Bun Shell in release tooling, and a developer reports using it in a production service that launches a legacy binary. An independent hands-on comparison with dax demonstrated basic pipelines, but it used an early Bun build. Anthropic’s use of Bun for Claude Code supports confidence in the runtime, while current independent benchmarks and satisfaction data for the shell are sparse.

Safe7.2

How safe is it to depend on?

Claude Opus 5.5: 7.0, likely 5.5 to 8.0

Bun Shell escapes interpolations and does not call /bin/sh. The one HIGH command-injection advisory against the shell was withdrawn after the CVE numbering authority rejected it. The npm package has no dependencies and an MIT licence. A moderate prototype-pollution advisory from 2024 was fixed. There is no OpenSSF Scorecard data. The new, largely AI-written Rust codebase is reported to contain many unsafe blocks, which adds some uncertainty.

GPT-6.2 Sol: 7.3, likely 6.1 to 8.4

Bun Shell is MIT-licensed, adds no npm dependencies to an existing Bun install, and ships with signed release checksums. The reported shell injection advisory was withdrawn, and the older runtime prototype pollution advisory was fixed in 1.1.30. Bun 1.4.5 patched a high-severity issue in a bundled HTTP/3 library on the day Bun published its advisory. The full runtime adds security exposure, and the available evidence leaves OpenSSF checks and npm publishing access unverified.

Good

  • It is built into Bun, so there is nothing to install and no node_modules folder in each script directory.
  • Interpolated values are escaped and passed as single arguments, which guards against shell injection by default.
  • Builtins such as ls, rm, cp, mv and cat run in-process and work the same on Windows without WSL or Git Bash.
  • It has handy output helpers (.text(), .json(), .lines()), plus .nothrow() and .quiet() for control over exit codes and output.

Bad

  • It only works in the Bun runtime, so scripts cannot move to Node.js or Deno the way zx, execa or dax scripts can.
  • Its bash support is incomplete (for example, case statements), and complex scripts may hit gaps that a real shell handles.
  • Bun moved to an AI-assisted Rust rewrite in v1.4, which adds uncertainty about subtle regressions in a very young codebase.
  • There is less third-party documentation and fewer production write-ups than for zx or execa.

The numbers

npm downloads, 4 weeks
24M ×11 in a year
GitHub stars
97k
Commits, 12 months
4.7k
npm version
1.4.5 Nov 2026
Versions, 12 months
18
Advisories, 24 months
2 of 2 ever
OpenSSF Scorecard
None
Licence
MIT

The shell built into Bun, Bun.$. The repository, its stars and activity, and the downloads are of all of Bun, not of the shell.

Read on 21 November 2026 from GitHub (oven-sh/bun), npm (bun), OSV and the OpenSSF Scorecard.

Shell and process tools

  1. 8.0execa
  2. 7.3tinyexec
  3. 7.2zx
  4. 7.0Bun Shell
  5. 6.7dax
  6. 6.2nano-spawn
  7. 5.1ShellJS
  8. 5.1cross-spawn
Compare all 8 on six scores