CLI Reference
Overview
Section titled “Overview”The Rebase CLI (rebase) manages your project from scaffolding to deployment.
Installation
Section titled “Installation”pnpm add -g @rebasepro/cliOr use via pnpm dlx:
pnpm dlx @rebasepro/cli <command>Commands
Section titled “Commands”rebase init
Section titled “rebase init”Initialize a new Rebase project:
rebase init [directory]Sets up the project structure with frontend, backend, and shared packages.
rebase dev
Section titled “rebase dev”Start the development server:
rebase devStarts both frontend and backend with hot reloading.
Both ports are derived from the project’s path so several Rebase projects can run
side by side. Use the URLs rebase dev prints. Pin one with rebase dev --port 3001.
rebase build
Section titled “rebase build”Build the project into a deployable bundle in dist-bundle/:
rebase buildThe bundle is the artifact you deploy — the runtime image loads it, so there is no application image to build yourself. Useful flags:
| Flag | Effect |
|---|---|
--out <dir> |
Write the bundle somewhere other than dist-bundle/ |
--vendor |
Always install and ship the bundle’s dependencies |
--no-vendor |
Never vendor; the pod installs on first start |
--skip-type-check |
Skip typechecking (faster, less safe) |
--no-static |
Skip building the frontend |
Dependencies are vendored by default so a pod restart does not pay a 35–55 second install. A tree that grows past 200 MB on disk is dropped instead, because the upload limit is 100 MB compressed — see the changelog for the reasoning.
rebase start
Section titled “rebase start”Run the built bundle as a production server:
rebase startReads PORT and the rest of .env, unlike rebase dev. Point it at a bundle
elsewhere with rebase start --bundle ./dist-bundle.
rebase apps list
Section titled “rebase apps list”Show the apps this repository declares:
rebase apps listA repository can declare more than one deployable app — a backend and a marketing
site, say. This is how you see what rebase build and deployment will act on.
rebase eject
Section titled “rebase eject”Take ownership of the server process and its image:
rebase ejectWrites the backend entrypoint and a Dockerfile into the project and flips its
backend over, so the repository builds its own image instead of running the
published runtime. From then on platform runtime upgrades no longer reach it,
and CORS, auth wiring, storage and shutdown become yours to configure.
Preview it with rebase eject --dry-run, which lists what would change and
changes nothing. --force replaces an existing backend/src/index.ts or
env.ts, keeping the current file as <name>.bak.
rebase schema generate
Section titled “rebase schema generate”Generate Drizzle ORM schema from your TypeScript collections:
rebase schema generateThis reads your collections from config/collections/ and generates backend/src/schema.generated.ts with Drizzle table definitions, enums, and relations.
rebase db push
Section titled “rebase db push”Push schema changes directly to the database (development only):
rebase db pushrebase db generate
Section titled “rebase db generate”Generate SQL migration files from schema changes:
rebase db generateCreates timestamped migration files in drizzle/ that can be reviewed and committed.
rebase db migrate
Section titled “rebase db migrate”Run pending database migrations:
rebase db migrateApplies all unapplied migrations to the database.
rebase generate-sdk
Section titled “rebase generate-sdk”Generate a typed client SDK from your collection definitions:
rebase generate-sdkCreates TypeScript types and a type-safe client for all your collections.
rebase doctor
Section titled “rebase doctor”Run diagnostics to detect drift between your collections, the generated schema, and the current database state:
rebase doctorrebase auth
Section titled “rebase auth”Authentication management commands:
rebase auth reset-password --email admin@example.com --password NewPassword123!rebase api-keys
Section titled “rebase api-keys”Manage scoped service API keys — the credential an agent, script or another service uses, as opposed to an end user’s session:
rebase api-keys listrebase api-keys create --name "Analytics" --permissions '[{"collection":"events","operations":["read"]}]'rebase api-keys create --name "Full Access" --full-access --expires 90drebase api-keys revoke abc123-def456--permissions takes a JSON array of { collection, operations } objects, or use
--full-access for read/write/delete on every collection and function. --expires
accepts 7d, 30d, 90d, 1y or an ISO date, and --rate-limit sets requests
per 15-minute window. A key is shown once, at creation.
Keys are double-gated: the key’s own permissions and the row-level security of the identity it acts as both apply, so a key can never read more than that identity can.
rebase skills install
Section titled “rebase skills install”Install the Rebase reference skills for your AI coding assistant. Supports Cursor, Claude Code, Windsurf, Gemini CLI and Antigravity:
rebase skills installrebase skills install --agent claude,cursorrebase skills install --agent allSee Agent Skills for the full list and where files are written.
rebase telemetry
Section titled “rebase telemetry”Anonymous usage sharing. Opt-in, and off unless you turned it on:
rebase telemetry statusrebase telemetry showrebase telemetry enablerebase telemetry disablestatus prints the current setting, show prints exactly what would be sent, and
the other two change it. rebase init asks once; if you never ran init, nothing
was ever collected.
Migration Workflow
Section titled “Migration Workflow”The typical workflow for schema changes:
# 1. Edit your collection in config/collections/# 2. Generate the Drizzle schemarebase schema generate
# 3. Generate SQL migrationrebase db generate
# 4. Review the generated SQL in drizzle/
# 5. Apply the migrationrebase db migrateNext Steps
Section titled “Next Steps”- Schema as Code — How schema generation works
- Quickstart — Get started
