Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Bun

$ bun Official Med Risk
Oven · Code & DevOps · MIT · macos / linux / windows

Single 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.

FCRS-1.0 Score
87 /100
Good
Medium Confidence
Zero-Friction Install
brew install oven-sh/bun/bun
CLI vs MCP Decision CLI Only

Runs local TypeScript scripts, installs packages, and executes unit tests directly on the filesystem.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
✓ Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 20 / 25

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-run and --frozen-lockfile supported
  • Lacks universal --json flag across pm and test
Trust & Safety 21 / 25

Blocks untrusted package lifecycle scripts by default (trustedDependencies allowlist) and supports --dry-run on install.

  • Lifecycle postinstall scripts blocked by default unless trusted
Setup & Portability 14 / 15

Single native executable across macOS, Linux, and Windows with ultra-fast cold startup.

  • Standalone binary installable via Homebrew, npm, or curl
Utility & Efficiency 14 / 15

Combines TypeScript execution, package management, bundling, and testing in one ultra-fast tool.

  • Sub-second test execution and direct .ts execution
Maintenance & Lineage 9 / 10

Official Oven project under MIT license with rapid release cadence.

  • Active oven-sh/bun repository
Docs & Verifiability 9 / 10

Clean official documentation at bun.sh/docs covering CLI subcommands and runtime APIs.

  • Documented CLI reference at bun.sh/docs

Security, Auth & Guardrails

Auth Modes
No Auth Config File Env API Key
Credential Storage

Reads npm registry credentials from ~/.npmrc, bunfig.toml, or env vars when fetching private packages.

Side Effects
Read-Only Local Write Remote Write
Cost & Quotas

MIT open-source native binary; completely free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

Preview package installation with dry-run
bun install --dry-run

Resolves dependencies and reports planned changes without modifying node_modules or bun.lock.

List installed dependencies
bun pm ls

Prints installed direct dependencies and versions in the workspace.

Controlled Writes & Previews

Run project unit tests without color
NO_COLOR=1 bun test

Executes the built-in test runner cleanly without ANSI escape sequences.

Strengths for Agents

  • + Blocks third-party postinstall scripts by default via trustedDependencies.
  • + Near-instant startup and native TypeScript execution speed up agent script loops.
  • + bun install --dry-run and --frozen-lockfile keep dependency updates predictable.

Caveats & Pitfalls

  • ! Limited native --json output on bun test (supports --reporter=junit for structured XML) and bun pm ls.
  • ! bun test transpiles TypeScript without running tsc type checking.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI