create-electrobun-stack add expands an existing generated project by reading ces.json and applying new stack options.
From the generated project root:
bunx create-electrobun-stack add --orm drizzleFrom another directory:
bunx create-electrobun-stack add --cwd my-app --settings databaseSkip dependency installation:
bunx create-electrobun-stack add --cwd my-app --ui shadcn --no-install- Reads
ces.jsonfrom the project root. - Reconstructs the current stack from manifest fields and feature booleans.
- Applies only the stack flags you passed.
- Infers prerequisites when possible.
- Rejects non-additive or unsupported changes.
- Renders the base template and option overlays into the existing project.
- Writes an updated
ces.json. - Installs dependencies unless
--no-installis used.
The command preserves the original createdAt value in ces.json.
Supported additive changes include:
--api noneto--api electrobun-rpc--app-menu noneto--app-menu edit--auth noneto--auth app-lock--database noneto--database sqlite--db-setup noneto--db-setup seed--examples noneto--examples rpc--navigation noneto--navigation local-only--native-utils noneto--native-utils file-dialogs--orm noneto--orm drizzle--settings noneto--settings jsonor--settings database--styling cssto--styling tailwindcss--testing noneto--testing bun--ui noneto--ui shadcn--window-style nativeto--window-style hidden-inset--query noneto--query tanstack-query--router noneto--router tanstack-routeror--router react-router--addons noneto--addons turborepo--packaging noneto--packaging installers
The command does not remove features. It also does not change frontend, runtime, packageManager, buildEnv, or buildTargets.
The add command can infer prerequisites for common growth paths:
| Requested option | Inferred option |
|---|---|
--orm drizzle |
--database sqlite |
--db-setup seed |
--database sqlite |
--settings database |
--database sqlite and --api electrobun-rpc |
--settings json |
--api electrobun-rpc |
--examples rpc |
--api electrobun-rpc |
--native-utils file-dialogs |
--api electrobun-rpc |
--ui shadcn |
--styling tailwindcss |
If you explicitly pass an invalid combination, validation still fails. For example, --database none --orm drizzle is rejected.
Add SQLite:
bunx create-electrobun-stack add --database sqliteAdd Drizzle, inferring SQLite if needed:
bunx create-electrobun-stack add --orm drizzleAdd database-backed settings, inferring SQLite and Electrobun RPC if needed:
bunx create-electrobun-stack add --settings databaseAdd shadcn config, inferring Tailwind CSS if needed:
bunx create-electrobun-stack add --ui shadcnAdd the native file dialog RPC utility:
bunx create-electrobun-stack add --native-utils file-dialogsAdd installer packaging helpers:
bunx create-electrobun-stack add --packaging installersThe add command protects existing generated projects from destructive stack changes. These are rejected:
- Switching
react-routertotanstack-router. - Removing SQLite, Drizzle, settings, tests, examples, or UI config.
- Switching package managers.
- Changing build channels or targets.
- Replacing a generated app without
ces.json.
For those changes, create a new project with the desired stack or migrate manually.