Bun
$ bun Official Med RiskSingle native binary built with Zig and JavaScriptCore that executes TypeScript directly, manages npm dependencies via bun install, bundles assets, and runs tests via bun test. Fast startup makes it ideal for agent test and script loops.
brew install oven-sh/bun/bun Runs local TypeScript scripts, installs packages, and executes unit tests directly on the filesystem.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Fast non-interactive execution with bun install --dry-run, --frozen-lockfile, and NO_COLOR=1, though native --json reporting across test and pm ls is limited.
bun install --dry-runand--frozen-lockfilesupported- Lacks universal
--jsonflag acrosspmandtest
Blocks untrusted package lifecycle scripts by default (trustedDependencies allowlist) and supports --dry-run on install.
- Lifecycle
postinstallscripts blocked by default unless trusted
Single native executable across macOS, Linux, and Windows with ultra-fast cold startup.
- Standalone binary installable via Homebrew, npm, or curl
Combines TypeScript execution, package management, bundling, and testing in one ultra-fast tool.
- Sub-second test execution and direct
.tsexecution
Official Oven project under MIT license with rapid release cadence.
- Active
oven-sh/bunrepository
Clean official documentation at bun.sh/docs covering CLI subcommands and runtime APIs.
- Documented CLI reference at bun.sh/docs
Security, Auth & Guardrails
Reads npm registry credentials from ~/.npmrc, bunfig.toml, or env vars when fetching private packages.
MIT open-source native binary; completely free.
# Bun (bun) Agent Rules - Set `NO_COLOR=1` when capturing `bun test` or `bun install` output. - Use `bun install --frozen-lockfile` or `bun install --dry-run` before mutating lockfiles. - Remember `bun test` does not type-check; run `tsc --noEmit` separately for TypeScript validation.
Agent-Ready Command Recipes
Safe Read-Only Queries
bun install --dry-run
Resolves dependencies and reports planned changes without modifying node_modules or bun.lock.
bun pm ls
Prints installed direct dependencies and versions in the workspace.
Controlled Writes & Previews
NO_COLOR=1 bun test
Executes the built-in test runner cleanly without ANSI escape sequences.
Strengths for Agents
- + Blocks third-party
postinstallscripts by default viatrustedDependencies. - + Near-instant startup and native TypeScript execution speed up agent script loops.
- +
bun install --dry-runand--frozen-lockfilekeep dependency updates predictable.
Caveats & Pitfalls
- ! Limited native
--jsonoutput onbun test(supports--reporter=junitfor structured XML) andbun pm ls. - !
bun testtranspiles TypeScript without runningtsctype checking.