GenerateSaaS

CLI

Scaffold and maintain SaaS projects with the generatesaas CLI. License-gated commands handle init, updates, status, and eject from a versioned template.

The generatesaas CLI (source in packages/cli) scaffolds projects from the boilerplate and keeps them in sync afterward. It never ships the template source - commands that touch the template authenticate with your API key, then download a versioned tarball from a Cloudflare Worker backed by R2.

How distribution works

AspectDetail
Template sourceNever bundled in the CLI package - downloaded on demand.
Access gateinit, auth, status, and update send your API key to the version index (/versions); a 401 means the key is invalid. verify and eject need no key.
DeliveryA versioned tarball is streamed from the CF Worker + R2 origin at cli.generatesaas.com.
EndpointCLI_API_URL in packages/cli/src/constants.ts, overridable via the GENERATESAAS_API_URL env var.
Key storageSaved to ~/.generatesaas (mode 0600) so later commands run unattended.

Commands

Run lifecycle commands from a generated project root. status and update also accept --cwd <path> to target another directory; eject must be run from the project root.

CommandWhat it does
initScaffold a new project: verify access, collect options, activate a license, download the template, run generators, install deps, init git.
authSet or replace the saved API key (verified before saving); auth --clear removes it.
statusRead .generatesaas/manifest.json and print version, frontend, deploy target, database, cache, AI tools, then check for a newer release.
updateRefresh AI skill files and the license token; if a newer version exists, stage it into .generatesaas/staging/ with a changelog.
verify [url]Check whether a deployed site is legitimately licensed. Accepts a homepage or API URL, verifies the license signature, and cross-references the records for a verdict (licensed / revoked / leaked / ejected / unlicensed). Works for anyone with no key; an owner key adds the customer's identity to the output.
ejectIrreversibly sever every GenerateSaaS tie - manifest, license route, heartbeat, and AI skills.

update never mutates your code - it only stages the new version, re-shaped for your project's exact configuration (same frontend, payment provider, database, and feature flags), so everything it stages already applies to your project. Applying the diff is delegated to your AI assistant, which reads the changelog and template snapshot.

Explore

Frequently asked questions

Do I need an API key to verify a deployed site? No. verify decodes the JWT claims locally and checks the signature against the public verification service, so it works without a saved key. Use --file to check many URLs at once.

Where is my API key stored? In ~/.generatesaas with file mode 0600. auth --clear removes it; an invalid key (401) re-prompts interactively or aborts under --yes.

Can I pin a specific template version? Yes. Pass --template-version <semver> to init; the CLI validates it against the version index before downloading and otherwise defaults to the latest.

How do I cut all ties to GenerateSaaS? Run eject. It removes the connective tissue (manifest, license route, heartbeat, skills) while your application code and @repo/config flags keep working.

On this page