bunlisted
Install: claude install-skill hsb3/dotfiles-agents
# Bun
Bun is the default runtime, package manager, test runner, and bundler for JS/TS on this
machine. Installed via brew (`oven-sh/bun/bun`), not mise — mise owns `node`. Use bun over
npm/npx/pnpm/yarn/node/ts-node habits unless an exception below applies.
## Command mapping
| Instead of | Use |
|---|---|
| `npm install` / `npm ci` | `bun install` / `bun install --frozen-lockfile` |
| `npm run <script>` / `npx <pkg>` | `bun run <script>` / `bunx <pkg>` |
| `node x.js` / `ts-node x.ts` | `bun x.js` / `bun x.ts` (TS runs directly) |
| `nodemon` | `bun --watch` (restart) or `bun --hot` (in-place reload) |
| `jest` / `vitest` (new projects) | `bun test` |
| `esbuild` / `webpack` / `pkg` | `bun build` / `bun build --compile` |
Commit `bun.lock` (text, reviewable). `bun install` auto-migrates `package-lock.json`.
## Prefer the built-in over a dependency
`.env` loads automatically (no `dotenv`); `Bun.$` shell (no `execa`/`zx`); `bun:sqlite`
(no `better-sqlite3`); `Bun.serve()` with routes + WebSockets; `Bun.file()`/`Bun.write()`;
`Bun.secrets` (OS keychain — the right home for tokens); `Bun.password`, `Bun.Glob`,
`Bun.hash`, `Bun.cron`, `Bun.markdown`. Signatures and examples:
[references/cheatsheet.md](references/cheatsheet.md).
## Traps — measured, not folklore
Full evidence per trap in [references/traps.md](references/traps.md). Headlines:
- **`minimumReleaseAgeExcludes` takes EXACT names; globs silently match nothing** (inverse
of npm). Enumerate every name including