⚠️ Deprecated Package

bun-workspaces has been deprecated and is now developed as pacwich, which supports Bun, npm, and pnpm workspaces, with a mostly backwards compatible CLI and API. Users can expect little to no disruption beyond the package name change and config file name changes.

A full migration guide covering all differences between the packages is available at https://pacwich.dev/intro/bun-workspaces-migration

Installation docs are available at https://pacwich.dev/intro/getting-started

You can also instruct an LLM agent to read https://pacwich.dev/intro/bun-workspaces-migration/index.md to assist with migration.

Read the launch blog post about the motivations and development strategy.

bun-workspaces will not receive further releases save for critical security patches, if necessary. This website will stay up at least through 2026. Once decommissioned, documentation will be consolidated to the package README.

bun-workspaces

A monorepo tool that enhances native Bun workspaces

  • 🍽️ Works right away, with no boilerplate required 🍽️
  • πŸ€– Get rich metadata about your monorepo πŸ€–
  • 🎻 Orchestrate your workspaces' package.json scripts 🎻
  • 🐚 Run one-off Bun Shell commands in your workspaces 🐚
  • 🎁 Use with Bun as your package manager for Node projects 🎁
  • πŸ•ΈοΈ Determine affected workspaces based on changed files πŸ•ΈοΈ
  • πŸ› οΈ AI: Provides an AGENTS.md file and an MCP server! πŸ› οΈ

To get started, all you need is a repo using Bun's workspaces feature for nested JavaScript/TypeScript packages. This adds enhanced features on top of plain workspaces.

Start running some CLI commands right away in your repo, or take full advantage of the TypeScript API and its features.

This package is unopinionated and works with any project structure you want. Think of this as a power suit you can snap onto native workspaces, rather than whole new monorepo framework.



What's New

Notable recent updates πŸ“¦

Quick Start

See the CLI Quick Start and API Quick Start for starting examples. See the Glossary for more fundamental concepts.

Installation

Required Bun version: ^1.2.0

You can install the package in your project or simply use bunx bun-workspaces to immediately use the latest version of the CLI. Installation is required to use the API.

# Install to use the API and/or lock your CLI version for your project
bun add --dev bun-workspaces

# Start using the CLI with or without the installation step
bunx bun-workspaces --help

If you use the CLI frequently, you might consider using a shell alias:

# Add this to .bashrc, .zshrc, or similar 
# to make it available by default in your shell
alias bw="bunx bun-workspaces"

Examples in these docs will use the alias bw for bunx bun-workspaces for brevity.

Stale Workspace Data

Note that you need to run bun install in your project for bun-workspaces to find your project's workspaces, and you likely must run this again after you've updated your workspaces, such as changing a name or adding/removing one. This is because bun.lock lists workspaces and is used as the source of truth.

Why not a global install?

It's possible to add bw to your shell's PATH to make it available globally via bun add -g bun-workspaces. However, bunx is recommended instead in order to ensure version consistency within projects. With the alias using bunx above, bw will use the locked version of bun-workspaces for a project that installed it.


bun-workspaces is independent from the Bun project and is not affiliated with or endorsed by Anthropic. This project aims to enhance the experience of Bun for its users.

Developed By: