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 --planArguments
| Argument | Type | Description |
|---|---|---|
<file> | path | Python file containing Rebase targets. |
--name, -n | str | Deploy only this top-level variable or Rebase target name. Repeatable. |
--source, -s | rebase or github | Override deploy source metadata. Protected environments require GitHub-backed source. |
--env, -e | str | Deployment environment. Defaults to REBASE_ENVIRONMENT, then the environment selected with rebase environment use, then dev. |
--plan, -p | bool | Show the deployment path without applying it or creating a GitOps request. |
--sync | bool | Apply a platform-authorized GitOps reconciliation. Only for the platform GitOps reconciler; refused otherwise. |
Environment Behavior
rebase deploy checks the active workspace environment policy before importing the file.
| Policy | Result |
|---|---|
| Direct | Imports the local file and deploys discovered targets immediately. |
| GitOps protected | Requires 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 prodUse --plan to inspect what Rebase would submit:
rebase deploy deploy.py --env prod --planOutput
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.

