--- name: bun-patterns description: Bun package manager and runtime best practices --- # Bun Patterns **Purpose**: Efficient use of Bun as package manager and JavaScript runtime - Keywords: bun, bun.lockb, bunfig.toml, package manager, dependencies, runtime, Bun.file, Bun.write ## Quick Reference | Task | Command | Notes | |------|---------|-------| | Install | `bun install` | Fast, disk-cached | | Add package | `bun add ` | Gets latest | | Add dev | `bun add -d ` | Dev dependency | | Remove | `bun remove ` | Updates lockfile | | Run script | `bun run