# Bun Shell: 7.0 out of 10

A strong pick. 4th of 8 in [Shell and process tools](https://elestia.ai/opensource/shell/index.md).

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.

## Scores

- **Overall: 7.0** (likely 6.0 to 8.0)
  - Claude Opus 5.5 (6.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): 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 many: 4.1** (likely 3.0 to 5.4)
  - Claude Opus 5.5 (4.0): 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): 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 lot: 7.4** (likely 6.3 to 8.4)
  - Claude Opus 5.5 (7.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): 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 time: 7.8** (likely 6.5 to 8.8)
  - Claude Opus 5.5 (7.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): 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 widely: 5.1** (likely 3.4 to 6.6)
  - Claude Opus 5.5 (5.5): 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.
  - GPT-6.2 Sol (4.6): 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.
- **Vouched for: 5.4** (likely 3.9 to 6.8)
  - Claude Opus 5.5 (5.0): 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): 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.
- **Safe: 7.2** (likely 5.8 to 8.2)
  - Claude Opus 5.5 (7.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): 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

- Downloads, 4 weeks: 24M
- In a year: ×11
- GitHub stars: 97k
- Commits, 12 months: 4.7k
- Last npm release: Nov 2026
- Advisories, 24 months: 2
- Licence: MIT
- GitHub: https://github.com/oven-sh/bun
- npm: https://www.npmjs.com/package/bun

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

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
