DocsCLI

Open documentation actions

Add and Remove Capabilities

Add typed tooling, deployment targets, and stack capabilities to an existing project, or remove one under review.

add updates an existing Better Fullstack project. It reads bts.jsonc, plans the requested change, writes safe generated-file updates, and records the new selection.

npm create better-fullstack@latest add -- --email resend --dry-run

Operational contract

ConcernContract
PreconditionsRun inside a generated project with bts.jsonc, or pass --project-dir. Commit or stash local work first.
Previewadd [flags] --dry-run plans without writing.
WritesUpdates scaffold-owned files, dependencies, env examples, bts.jsonc, and the manifest.
RefusesNever overwrites a generated file that diverged from its recorded baseline.
RecoveryReview the dry run, apply on a clean Git worktree, revert the commit if needed.

What add does

  • Prompts in tooling and capability sections when no explicit stack flags are passed.
  • Accepts additive flags such as --email resend, --observability sentry, --search, --vector-db, --file-storage, --web-deploy, and --server-deploy.
  • Accepts --part role:ecosystem:tool specs for anything part-addressable.
  • Uses the same planning engine as the MCP stack-update tools.
  • Skips capabilities already selected and refuses capabilities whose setup is imperative rather than generated.
  • Prints install guidance when dependency installation is skipped.

Most create-time stack fields are accepted for existing projects when the planner can apply them safely. Risky architecture swaps require manual review or a fresh scaffold.

Flags

FlagBehavior
--partOne or more canonical role:ecosystem:tool specs; owner-scoped parts use owner.role:ecosystem:tool.
--dry-runPlan the update and print the summary without writing files.
--project-dirPath to the generated project. Defaults to the current directory.
--installInstall dependencies after adding files. Defaults to false; the lockfile stays outside the transaction, so re-run install after recovery.
--package-managernpm pnpm bun yarn
--email --observabilityAdd providers such as resend or sentry when compatible with the stack.
--search --vector-db --file-storageAdd supported service integrations.
--web-deploy --server-deployAdd or update deployment targets.

Commonly added parts include turborepo, docker-compose, eslint, prettier, pwa, electron, capacitor, msw, storybook, and the TanStack data utilities. Vite+ is a toolchain profile selected as toolchain:universal:vite-plus; the package-manager flag still chooses npm, pnpm, Yarn, or Bun underneath it.

  1. Commit or stash current work.
  2. Run add --dry-run with explicit flags.
  3. Review the file, dependency, env, and manual-review summary.
  4. Re-run without --dry-run.
  5. Install dependencies if the command skipped it.
  6. Run check --skip-checks, then the project's own tests.

If every requested capability is already present, add reports that there are no stack changes to apply.

Remove a capability

remove takes one selected non-primary capability back out. It plans by default, names the affected config fields and generated files, and returns a review token. Nothing is written during planning:

bash
npx create-better-fullstack@latest remove backend.auth:typescript:better-auth

After reviewing, repeat the same target with --apply --review-token <token>. The token binds to the proposed config and file operations; missing or stale tokens fail closed. Apply uses the same transaction and recovery contract as update.

Primary frontend, backend, mobile, and database roles cannot be removed; replace those choices through add so compatibility and migration risks get reviewed. Architecture-sensitive removals additionally require --acknowledge-architecture-change. Application data and schemas are never migrated automatically.

GitHub Sponsors