rebase environment Inspect and manage workspace deployment environment policies.
rebase environment list [--json]
rebase environment show < environmen t > [--json]
rebase environment use < environmen t >
rebase environment create < environmen t > [--protected | --direct] [--json]
rebase environment delete < environmen t >
rebase environment protect prod --allowed-branch main
rebase environment unprotect dev
rebase environment grants < environmen t > [--json]
rebase environment grant < environmen t > (--profile-id < uui d > | --api-key-id < uui d > ) [--access read | write | admin] [--json]
rebase environment revoke-grant < environmen t > < grant-i d >
rebase environment track-project < environmen t > < projec t > --connection < i d > --ref < re f > --entrypoint < fil e > [--repo-path < pat h > ] [--json]
Subcommand Description createCreate an environment in the active workspace. Direct by default; --protected makes it GitOps-protected. deleteDelete an empty, unprotected environment. grantGrant one profile or API key access to an environment. grantsList explicit profile and API-key access grants for an environment. listList environment policies for the active workspace. protectRequire GitOps deployment requests for an environment. revoke-grantRemove one explicit environment access grant by its UUID. showShow one environment. track-projectBind a project in an environment to a GitHub ref and Python entrypoint. unprotectAllow direct deploys for an environment. useSelect the environment for this workspace on this machine. It becomes the default for rebase deploy --env .
New workspaces use these policies:
Environment Deploy mode Protected devdirectNo staginggitopsYes prodgitopsYes
Protected environments reject direct deploy mutations in the Rebase API. Use rebase deploy <file> --env <environment> from the connected GitHub repository to create a GitOps deployment request.
Option Type Description --protected, -p / --direct, -dboolCreate a GitOps-protected environment, or a direct one. Defaults to --direct. --json, -jboolPrint the created environment as JSON.
Option Type Description --profile-id, -pstrWorkspace profile UUID to grant. --api-key-idstrWorkspace API key UUID to grant. --access, -aread, write, or adminAccess level. Defaults to read. --json, -jboolPrint the grant as JSON.
Option Type Description --allowed-branch, -astrBranch allowed for GitOps reconciliation. Can be passed more than once. Defaults to main and master. --jsonboolPrint the updated policy as JSON.
Option Type Description --jsonboolPrint the updated policy as JSON.
Option Type Description --connection, -cstrGitHub repository connection ID. Required. --ref, -rstrTracked branch or tag ref. Required. --entrypoint, -estrPython declaration file. Required. --repo-pathstrPath inside the repository. --json, -jboolPrint the tracking binding as JSON.
show and grants also accept --json, -j.
Command Purpose rebase deployDeploy directly or create a GitOps deployment request based on environment policy. rebase connect githubConnect the workspace repository required for protected deploys.