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 | str | Optional top-level project or target name to deploy. |
--source | rebase or github | Override deploy source metadata. Protected environments require GitHub-backed source. |
--env | dev, staging, or prod | Deployment environment. Defaults to dev. |
--plan | bool | Show the deployment path without applying it or creating a GitOps request. |
--sync | bool | Reserved for reconciler-based GitOps sync. |
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.

