Skip to content

feat(cli): add Bun as a package manager option#280

Open
gonzoblasco wants to merge 3 commits into
akd-io:developfrom
gonzoblasco:feature/262-add-bun-support
Open

feat(cli): add Bun as a package manager option#280
gonzoblasco wants to merge 3 commits into
akd-io:developfrom
gonzoblasco:feature/262-add-bun-support

Conversation

@gonzoblasco

Copy link
Copy Markdown

Add support for Bun (#262)

Closes #262

Summary

Adds Bun as a fourth package manager option alongside pnpm, yarn, and npm.

Changes

  • New plugin bun.ts with an updateBun step that runs bun upgrade
  • Type system: "bun" added to PackageManager type and oclif flag options
  • Package manager maps: Bun entries added to all 5 maps in package-manager-utils.ts (install, cleanInstall, installSub, uninstallSub, runCommand, saveDev)
  • create-next-app: --use-bun flag passed to CNA when Bun is selected
  • Plugin registration: bunPlugin imported and registered in setup.ts
  • Steps order: updateBun added to stepsOrder in steps.ts
  • Technologies sort order: bun added to technologiesSortOrder
  • E2E test: bun.test.ts verifies generated project has bun.lock and no other lockfiles
  • README: auto-updated by pre-commit hook

Verification

  • pnpm run build — clean (CLI + website)
  • pnpm run lint — no errors
  • pnpm run unit — 9/9 tests pass
  • ./bin/run --help shows pnpm|yarn|npm|bun

Notes

  • Website (create-next-stack.com) is NOT updated in this PR — it can be done in a follow-up PR if desired.
  • Bun's --use-bun flag is supported by create-next-app since v13.5+.
  • bun upgrade is used instead of npm i -g bun to stay consistent with Bun's own update mechanism.

- Add bun plugin with update step (bun upgrade)
- Add bun to PackageManager type and oclif flag options
- Add bun entries to all 5 package-manager-utils maps
- Add --use-bun flag to create-next-app invocation
- Register bunPlugin in setup and stepsOrder
- Add bun to technologies sort order
- Add E2E test for bun
@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

@gonzoblasco is attempting to deploy a commit to the 9ty Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for Bun

1 participant