GenerateSaaS

Update

Pull the latest boilerplate version - the CLI stages a re-shaped template and your AI assistant applies the diff while preserving your customizations.

generatesaas update (packages/cli/src/commands/update.ts) keeps a generated project in sync with the boilerplate. Two actors share the work: the CLI stages the new version, and your AI assistant applies it file by file. It never edits your code on its own.

Why this is different

Every boilerplate sells lifetime updates. Almost nobody applies them. The normal path is a manual git merge of your project against thousands of changed upstream lines - then resolving every conflict by hand, hoping you do not break something you cannot see. So projects drift months behind, and the "lifetime updates" go unused.

GenerateSaaS makes updating a guided, AI-driven three-way merge instead:

  • The CLI re-shapes the new version into your exact configuration - same frontend, payment provider, database, and feature flags - so a diff only ever shows changes that actually apply to your project. You never sift through another framework's files or a provider you don't use.
  • Your AI assistant compares three versions of every file - the original baseline you started from, the new version, and your customizations - so it can tell an upstream improvement apart from your own edits.
  • Files you never touched are applied automatically. Files you customized are walked one by one, each with a plain-language explanation, a risk rating, and a recommended merge - and you approve every one.
  • A type check and the test suite verify the result before you finish, and the whole thing runs on a clean git tree so it is always one git restore from undone.

The result: staying current is a short, reversible, low-risk routine - not a dreaded merge you keep putting off.

update only writes to .generatesaas/. It never mutates your source - applying the staged diff is a separate, reviewed step driven by your AI assistant.

What the command does

Run it from the project root, or pass --cwd <path>. The API key saved at ~/.generatesaas lets it run non-interactively.

Verify the API key against the version index; a 401 re-prompts.
Refresh the AI skill files.
If you are already on the latest version, stop here.
Refresh the license token in the manifest for the target version. If your license's update window has ended, the update stops here with the last version it covers.
Stage the new version, re-shaped for this project's exact config, into .generatesaas/staging/, and fetch the changelog for every release between your version and the target - breaking releases are flagged, so a multi-version jump never hides an intermediate breaking change.
Backfill the pristine baseline (.generatesaas/template/ + hashes) if an older CLI never wrote one.
Write .generatesaas/staging.json and prompt you to ask your AI assistant to apply it.

What gets staged

Everything lands under .generatesaas/ - all of it buyer-shaped, so a diff never shows another framework, a provider you don't use, internal tooling, or the owner key.

ArtifactContents
staging/The new version, shaped for your exact config.
template/Pristine baseline - the version you started from, for a 3-way merge.
staging.jsoncurrentVersiontargetVersion plus the combined changelog (one section per release spanned).
template-hashes.jsonBaseline per-file hashes that classify what you customized.
manifest.jsonLicense token refreshed; the version bumps when the apply completes.

How your AI applies it

The bundled update skill drives the apply, and you decide every change:

Pre-flight: requires a clean git tree as a rollback point. It never commits, stashes, or resets without your explicit choice.
Classify each file: unmodified, modified, new, removed, or deleted-by-you.
Auto-apply only the safe files - unmodified replacements and genuinely-new ones.
Review each modified file as a 3-way merge (old template, new template, your version) and pick accept-merge, keep-mine, or take-upstream.
Validate with the type check and the test suite, then finish.

Pick an interaction level when prompted: Recommended (auto-apply safe, walk the modified files), Careful (approve everything), or Quick (auto-merge low-risk, ask on medium/high).

Running it

Tell your AI assistant: "update my GenerateSaaS project." It runs the CLI for you, then walks the diff.
Or run npx generatesaas@latest update yourself first, then ask the assistant to apply the staged update.
Review each change, then run pnpm install if dependencies changed, plus any migrations the changelog lists.

Frequently asked questions

Do I run the CLI or does my assistant? Either. Saying "update my GenerateSaaS project" lets the assistant run generatesaas update itself; the saved API key makes it non-interactive.

Will it overwrite my customizations? No. Only uncustomized files are auto-applied. Every file you changed is reviewed one by one, and the pre-flight refuses to start on a dirty tree.

What if I'm already on the latest version? It refreshes your skill files, reports "already on the latest," and stops - nothing is staged and the license token is left untouched.

What if my update window has ended? Versions released after your window are not served. update stops with the last version your license covers and an upgrade pointer; your project keeps working as-is, and init can still scaffold that last covered version.

I rewrote a file heavily. What happens? You get a 3-way merge and choose the outcome. Skipped files are recorded in held-back.json so the next update's diff still includes the change you deferred. A safety net in the completion step also detects upstream changes that were never applied and records them automatically.

Does it touch my lockfile or .env? Never. The lockfile is excluded from update diffs entirely - new dependencies are added to package.json only, and you run pnpm install after. Real .env files are left alone.

On this page