bun-package-manager
Streamline your project's dependency management with Bun through this Claude Code skill. Designed for seamless integration with Claude Code CLI, it provides a straightforward way to handle package installation and updates across your development workflow.
Bun package manager simplifies dependency installation with a single command: run `bun install` in your project directory to install all dependencies listed in your package.json file. Bun reads your package.json, resolves dependencies, and creates a bun.lock lockfile for reproducible installs. For faster CI/CD pipelines, you can use `bun install --frozen-lockfile` to ensure exact versions are installed without modifications, or `bun install --production` to install only production dependencies and skip dev dependencies.
AI-generated summary based on this skill's SKILL.md
Install
secondsky/claude-skills/bun-package-manager · repository language: TypeScript
git clone https://github.com/secondsky/claude-skills
cp -r claude-skills/plugins/bun/skills/bun-package-manager ~/.claude/skills/bun-package-managerFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I install dependencies with Bun?
Bun package manager simplifies dependency installation with a single command: run `bun install` in your project directory to install all dependencies listed in your package.json file. Bun reads your package.json, resolves dependencies, and creates a bun.lock lockfile for reproducible installs. For faster CI/CD pipelines, you can use `bun install --frozen-lockfile` to ensure exact versions are installed without modifications, or `bun install --production` to install only production dependencies and skip dev dependencies.
What's the difference between Bun package manager and npm in terms of speed?
Bun package manager is significantly faster than npm due to its optimized architecture written in Zig. Bun install vs npm install shows dramatic performance improvements—Bun can complete dependency resolution and installation in a fraction of the time npm requires. This speed advantage becomes especially noticeable in large projects and CI/CD environments where installation happens frequently, making Bun an excellent choice for teams prioritizing build performance.
How do I migrate from npm to Bun?
Migrating from npm to Bun package manager is straightforward. First, install Bun on your system, then run `bun install` in your project directory—Bun automatically reads your existing package.json and npm lockfile, then generates its own bun.lock file. You can then replace npm commands: use `bun add package-name` instead of `npm install`, `bun remove package-name` instead of `npm uninstall`, and `bun update` to upgrade packages. Your package.json remains compatible, making the transition seamless.
How do I set up a monorepo workspace with Bun?
Bun package manager supports monorepo workspaces through workspace configuration in your root package.json. Define your workspace packages using the `workspaces` array field, then Bun automatically manages dependencies across all workspace packages. Use `bun install` at the root to install dependencies for all packages, and apply filters with `bun workspaces` commands to target specific packages. This setup allows you to manage multiple interdependent projects efficiently while maintaining a single lockfile.
What flags does Bun package manager support for development dependencies?
Bun package manager provides the `-D` flag to install packages as development dependencies, equivalent to npm's `--save-dev`. Run `bun add package-name -D` to add a package that's only needed during development. You can also use `bun install --production` to skip installing dev dependencies entirely, which is useful for production deployments. Additionally, `bun install --dry-run` lets you preview what would be installed without making actual changes.
How does Bun package manager handle security with trusted dependencies?
Bun package manager includes security features for CI/CD environments and production deployments. Use `bun install --frozen-lockfile` in continuous integration to ensure reproducible, verified installs that match your bun.lock exactly. Bun package manager also supports trusted dependencies configuration to control which packages can execute scripts during installation. These security measures help prevent supply-chain attacks and ensure your dependencies remain consistent across development, testing, and production environments.
SKILL.md
rendered from the published skill — quoted content, verbatim
Bun Package Manager
Bun's package manager is a dramatically faster replacement for npm, yarn, and pnpm. Up to 25x faster than npm install.
Quick Start
# Install all dependencies
bun install
# Add packages
bun add react react-dom
bun add -D typescript @types/react
# Remove packages
bun remove lodash
# Update packages
bun update
# Run package binaries
bunx create-next-app
Core Commands
| Command | Description |
|---|---|
bun install |
Install all dependencies |
bun add <pkg> |
Add dependency |
bun add -D <pkg> |
Add dev dependency |
bun add -O <pkg> |
Add optional dependency |
bun add --peer <pkg> |
Add peer dependency |
bun remove <pkg> |
Remove dependency |
bun update [pkg] |
Update dependencies |
bunx <pkg> |
Run package binary |
bun pm cache rm |
Clear cache |
Installation Flags
```bash
Production mode (no devDependencies)
bun install --production
Frozen lockfile (CI/CD)
bun
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 2 files
plugins/bun/skills/bun-package-manager/SKILL.md
plugins/bun/skills/bun-package-manager/references/cli-commands.md