Repo of the Day
smorsic/pacwich: Monorepo tooling that works directly with Bun, pnpm, and npm workspaces and orchestrates package.json scripts, with a CLI and TypeScript library API. Zero required config. AI-friendly and human-friendly documentation. (formerly bun-works…
Published: Oct 10, 2026
Open repository ↗Monorepo tooling that works directly with Bun, pnpm, and npm workspaces and orchestrates package.json scripts, with a CLI and TypeScript library API. Zero required config. AI-friendly and human-fri...
Summary
pacwich is a monorepo orchestration layer that runs on top of Bun, pnpm, and npm workspaces, exposing both a CLI and a TypeScript API for inspecting and scripting across nested packages. It requires no configuration to get started, with optional per-workspace and per-project config files for advanced setups. The project is the continuation of the earlier bun-workspaces package and is MIT licensed.
What it is useful for
pacwich is useful when a team already uses native workspaces but wants better tooling for running package.json scripts across many packages and for catching cross-workspace dependency mistakes. The CLI lists workspaces and scripts (pacwich list-workspaces, pacwich workspace-info my-workspace, pacwich script-info my-script) and runs scripts in parallel, in dependency order, or filtered by name, alias, tag, or path glob. For example: pacwich run lint, pacwich run lint --dep-order, pacwich run lint "my-workspace-*", and pacwich run lint "tag:my-tag".
The affected commands identify which workspaces changed between git refs (pacwich affected list, pacwich affected run my-script), useful for partial CI runs. The verify feature analyzes JS/TS imports and exports to flag implicit workspace dependencies, which npm workspaces allow, and ancestor-resolved workspace dependencies, so it can be wired into a prepare script or pre-commit hook (pacwich verify --strict).
For larger monorepos, pattern-based pacwich.project.ts config lets you tag workspaces by path (e.g., path:packages/libs/**/*) and enforce dependency rules such as "apps may only depend on libs."
How engineers can use it
Install globally with the package manager of your choice:
bun add -g pacwich
# OR
pnpm add -g pacwich
# OR
npm install -g pacwich
Or pin it as a dev dependency locally (bun add -d pacwich, pnpm add -D pacwich, npm install -D pacwich) and invoke via npx pacwich, bunx pacwich, or pnpm exec pacwich. The README documents a notable prerequisite: after any change to a workspace's package.json, you must rerun the package manager's install so pacwich sees current workspace data. Optional shell completions are available via pacwich completion install.
For programmatic use, the TypeScript API mirrors the CLI:
import { createFileSystemProject } from "pacwich";
const project = createFileSystemProject();
const ws = project.findWorkspaceByNameOrAlias("my-workspace");
const matches = project.findWorkspacesByPattern("my-workspace-*");
await project.runScriptAcrossWorkspaces({
script: "lint",
parallel: true,
});
Optional configs live at pacwich.workspace.ts inside a workspace or pacwich.project.ts at the root; .js, .json, .jsonc, and a "pacwich" key in package.json are also supported. Full reference documentation is hosted at pacwich.dev.