rebase deploy

Deploy Rebase functions, workflows, and models from a Python file.

Synopsis

rebase deploy <file>
rebase deploy <file> --name <target>
rebase deploy <file> --env prod
rebase deploy <file> --env prod --plan

Arguments

ArgumentTypeDescription
<file>pathPython file containing Rebase targets.
--namestrOptional top-level project or target name to deploy.
--sourcerebase or githubOverride deploy source metadata. Protected environments require GitHub-backed source.
--envdev, staging, or prodDeployment environment. Defaults to dev.
--planboolShow the deployment path without applying it or creating a GitOps request.
--syncboolReserved for reconciler-based GitOps sync.

Environment Behavior

rebase deploy checks the active workspace environment policy before importing the file.

PolicyResult
DirectImports the local file and deploys discovered targets immediately.
GitOps protectedRequires clean committed GitHub source and creates a GitOps deployment request instead of direct mutation.

New workspaces default to direct deploys for dev and GitOps-protected deploys for staging and prod.

For protected environments, the command requires the deploy file to be inside the connected GitHub repository:

rebase connect github
rebase deploy deploy.py --env prod

Use --plan to inspect what Rebase would submit:

rebase deploy deploy.py --env prod --plan

Output

For direct deploys, the command prints deployed functions, workflows, ASGI apps, and models. When a deployed target has endpoint=rb.endpoint(...), the output includes the endpoint URL.

For protected deploys, the command prints the GitOps deployment request, including the target environment, commit SHA, source path, status, and PR or compare URL.

On this page