Smithery Logo
MCPsSkillsDocsPricing
Login
Smithery Logo

Accelerating the Agent Economy

Resources

DocumentationPrivacy PolicySystem Status

Company

PricingAboutBlog

Connect

© 2026 Smithery. All rights reserved.

    bendrucker

    bun

    bendrucker/bun
    Coding
    5

    About

    SKILL.md

    Install

    Install via Skills CLI

    or add to your agent
    • Claude Code
      Claude Code
    • Codex
      Codex
    • OpenClaw
      OpenClaw
    • Cursor
      Cursor
    • Amp
      Amp
    • GitHub Copilot
      GitHub Copilot
    • Gemini CLI
      Gemini CLI
    • Kilo Code
      Kilo Code
    • Junie
      Junie
    • Replit
      Replit
    • Windsurf
      Windsurf
    • Cline
      Cline
    • Continue
      Continue
    • OpenCode
      OpenCode
    • OpenHands
      OpenHands
    • Roo Code
      Roo Code
    • Augment
      Augment
    • Goose
      Goose
    • Trae
      Trae
    • Zencoder
      Zencoder
    • Antigravity
      Antigravity
    ├─
    ├─
    └─

    About

    Bun runtime patterns and best practices. Use when running scripts with bun, using bunx, writing Bun shell scripts, managing bun.lock, or running bun test.

    SKILL.md

    Bun

    bunx

    Use --bun before the executable name to force the Bun runtime over Node shebangs. Use -p/--package when the binary name differs from the package name (e.g., bunx -p @angular/cli ng).

    See references/bunx.md

    Lockfile

    bun.lock is a text-based lockfile. Resolve merge conflicts by deleting it and running bun install to regenerate from scratch — never attempt to merge lockfile contents.

    See references/lockfile.md

    Resolution

    Runtime flags must precede the script path: bun --cwd ./packages/app run dev. Never use .js extensions in TypeScript imports — Bun resolves them natively.

    See references/resolution.md

    Shell

    Bun.$ is a tagged template for shell execution. Use response methods (.text(), .json(), .lines()) to extract output, .nothrow() to handle failures without exceptions, and pipe/redirect syntax for composing commands.

    See references/shell.md

    Subprocess

    Bun.spawn spawns subprocesses with streaming I/O. Use Bun.spawnSync for synchronous execution. Configure stdin/stdout/stderr, environment variables, and working directory. Check exitCode for error handling.

    See references/spawn.md

    File I/O

    Bun.file() creates file handles with .text(), .json(), .arrayBuffer(), and .stream() methods. Bun.write() writes content to files or stdout/stderr. Both support streaming for large files.

    See references/file-io.md

    Testing

    Bun runs tests in a single process. Use describe/it/test for structure, expect matchers for assertions, lifecycle hooks (beforeEach, afterEach) for setup/teardown, mock() for function mocking, and .toMatchSnapshot() for snapshot testing. Set AGENT=1 to suppress passing test output.

    See references/testing.md

    Recommended Servers
    Vercel Grep
    Vercel Grep
    Cloudflare Workers Observability
    Cloudflare Workers Observability
    OpenZeppelin
    OpenZeppelin
    Repository
    bendrucker/claude
    Files