Summary
Add Bun as an optional runtime target. When selected, generated projects use Bun-specific APIs and config rather than Node.js defaults.
Why
Bun is a drop-in Node.js alternative with a built-in test runner, bundler, package manager, and SQLite driver.
It changes several generated files:
package.json scripts use bun instead of node / npm
bunfig.toml replaces some config
- the SQLite module can use Bun's native
bun:sqlite instead of better-sqlite3
Design consideration
This is the first runtime category module.
The question "which runtime?" logically precedes backend and database choices:
- Bun's native SQLite affects
database-sqlite
- Bun's HTTP server affects
backend-express and backend-hono
Consider where in the prompt graph this question should live.
Files to generate
bunfig.toml — Bun config
- Patched
package.json scripts (bun dev, bun run build, etc.)
- When
database-sqlite is also selected:
- swap
better-sqlite3 → bun:sqlite in src/db/client.ts
Implementation hints
Contributor guidance
Refer to CONTRIBUTING.md → "Adding a New Module"
Acceptance criteria
Summary
Add Bun as an optional runtime target. When selected, generated projects use Bun-specific APIs and config rather than Node.js defaults.
Why
Bun is a drop-in Node.js alternative with a built-in test runner, bundler, package manager, and SQLite driver.
It changes several generated files:
package.jsonscripts usebuninstead ofnode/npmbunfig.tomlreplaces some configbun:sqliteinstead ofbetter-sqlite3Design consideration
This is the first
runtimecategory module.The question "which runtime?" logically precedes backend and database choices:
database-sqlitebackend-expressandbackend-honoConsider where in the prompt graph this question should live.
Files to generate
bunfig.toml— Bun configpackage.jsonscripts (bun dev,bun run build, etc.)database-sqliteis also selected:better-sqlite3→bun:sqliteinsrc/db/client.tsImplementation hints
Primary surface:
configPatches(rewriting scripts)onAfterTemplatehooks (swapping SQLite driver)Installer behavior:
bun installinstead ofnpm installpackages/core/src/installer/already has runtime detectioncompatibility.advisory(not hard conflict):backend-djangobackend-fastapi→ Bun does not run Python
Contributor guidance
Refer to CONTRIBUTING.md → "Adding a New Module"
Acceptance criteria
package.jsonscripts usebunthroughoutbunfig.tomlis present and validdatabase-sqlite+ Bun usesbun:sqliteinstead ofbetter-sqlite3bun installinstead ofnpm install