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.
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.
- pkgpulse.com/guides/bun-shell-vs-zx-2026: Recommends Bun Shell for Bun projects and zx for Node
- infoq.com/news/2026/09/bun-ai-rewrite-zig-rust-4-months: Runtime rewritten in Rust for v1.4
- npm downloadsLast4Weeks: Bun's strong growth widens the base of possible users
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.
- bun.com/docs/runtime/shell: Built-in pipelines, JavaScript redirects, and portable commands
- bun.com/blog/bun-v1.4.4#bun-shell: Recent shell stability and file command fixes
- github.com/sindresorhus/execa: Node subprocess controls include graceful termination and streaming
- project note: Package and repository metrics cover all of Bun
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.
- pkgpulse.com/guides/bun-shell-vs-zx-2026: Bun-only; zx runs on Node, Bun and Deno
- scrapbox.io/uki00a/dax,_Bun_Shell,_zx%E3%81%AE%E6%AF%94%E8%BC%83: Comparison notes Bun Shell is tied to one runtime
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.
- bun.com/docs/runtime/shell: Bun-specific API with cross-platform built-ins
- 2025.stateofjs.com/en-US/other-tools: 2,321 respondents reported using Bun and 10,062 reported using Node.js
- survey.stackoverflow.co/2026/technology/data: 51.3% of language-question respondents reported using a shell
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.
- bun.com/docs/runtime/shell: Official docs: escaping, builtins, Windows support
- pkgpulse.com/guides/bun-shell-vs-zx-2026: Lists missing bash features and the speed of in-process builtins
- dev.to/raxxostudios/bun-shell-replaced-every-bash-script-in-my-studio-2g75: A user replaced studio bash scripts with it
- scrapbox.io/uki00a/dax,_Bun_Shell,_zx%E3%81%AE%E6%AF%94%E8%BC%83: dax judged more mature on 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.
- bun.com/docs/runtime/shell: Shell examples, redirection, built-ins, and structured errors
- bun.com/docs/runtime/typescript: Type definitions for built-in APIs ship through @types/bun
- github.com/oven-sh/bun/issues/9716: Open tracker for additional shell built-ins
- github.com/oven-sh/bun/issues/29669: User report on CRLF parsing in Windows shell scripts
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.
- github commitsLastYear: 4,719 commits, 18 releases in the last year
- github openIssues: 3,611 open issues, 3,469 open pull requests
- anthropic.com/news/anthropic-acquires-bun-as-claude-code-reaches-usd1b-milestone: Anthropic acquired Bun and funds the team
- infoq.com/news/2026/09/bun-ai-rewrite-zig-rust-4-months: Rust rewrite shipped in v1.4.0; 19 regressions found; critics question the review
- bluesky top: Top posts voice concern about the quality of the Rust port
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.
- github releasesLastYear, commitsLastYear: 18 releases and 4,719 commits across Bun
- anthropic.com/news/anthropic-acquires-bun-as-claude-code-reaches-usd1b-milestone?target=_blank: Anthropic acquired Bun and committed to continued investment
- bun.com/blog/bun-v1.4.3#bun-shell: Fixed shell pipeline hangs and promise rejection behavior
- bun.com/blog/bun-v1.4.4#bun-shell: Fixed no-clobber behavior in mv and cp
- bun.com/blog/bun-v1.4: Bun shipped its Rust rewrite in 1.4
- tracker.git.tools/oven-sh/bun: Fast median first response in a sample of 26 repo issues
- github.com/oven-sh/bun/issues/29669: Windows CRLF report remains open
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.
- anthropic.com/news/anthropic-acquires-bun-as-claude-code-reaches-usd1b-milestone: Bun used in production for Claude Code
- infoq.com/news/2024/02/bun-announces-bun-shell: Launch coverage called the shell experimental
- dev.to/jangwook_kim_e31e7291ad98/building-automation-scripts-with-bun-shell-from-setup-to-real-world-patterns-52i9: Independent practical write-up
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.
- github.com/anomalyco/opencode/blob/dev/packages/script/src/index.ts: OpenCode calls Git through Bun Shell in its release tooling
- reddit.com/r/node/comments/1phxcnu/is_anyone_here_actually_running_bun_in_production: First-hand report of Bun Shell working in a production service
- zenn.dev/ispec_inc/articles/bun-shell-dax-compare: Independent hands-on comparison of early Bun Shell and dax
- anthropic.com/news/anthropic-acquires-bun-as-claude-code-reaches-usd1b-milestone?target=_blank: Claude Code uses the Bun runtime
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.
- github.com/advisories/GHSA-4j66-8f4r-3pjx: Shell command-injection advisory withdrawn; each interpolation is one argument
- advisories total: Two advisories in 24 months, one later withdrawn
- scorecard: No Scorecard data
- npm dependencies: 0 dependencies, MIT licence
- daily.dev/posts/i-wish-this-was-clickbait-1kedmdasm.md: Critics point to many unsafe calls in the Rust port
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.
- npm license, npm dependencies, scorecard: MIT, zero listed npm dependencies, and no Scorecard result
- github.com/advisories/GHSA-4j66-8f4r-3pjx: Shell advisory withdrawn after review
- github.com/advisories/GHSA-v9mx-4pqq-h232: Runtime prototype pollution fixed in 1.1.30
- github.com/oven-sh/bun/security/advisories/GHSA-p268-p2w7-qr8x: Bundled HTTP/3 issue fixed in 1.4.5
- github.com/oven-sh/bun/releases/expanded_assets/bun-v1.4.5: Release assets include a signed SHA-256 checksum manifest
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.