oz0 workspace export

Usage and flags for oz0 workspace export.

For: Operators and developers looking up a command.

Push a revision (default: the head) as a new branch (default oz0/<folder>-<revision>) on top of --base (default: the repository's default branch), into --path (default: the root), with the token in the tenant secret --secret. A branch that exists is refused: the export never force-pushes. --pull-request opens a pull request on GitHub, Gitea or Forgejo, or a merge request on GitLab; --forge and --forge-api name a self-hosted forge's kind and API address.

Usage

oz0 workspace export <folder> --repo <git-url> [flags]

Flags

FlagTypeDefaultDescription
--basestringthe default branchthe branch to start from and open the pull request against
--bodystringthe pull request's description
--branchstringoz0/<folder>-<revision>the new branch
--forgestringguessed from the hostgithub, gitlab, gitea or forgejo
--forge-apistringthe forge's API base URL, for a self-hosted forge
--jsonboolprint JSON instead of a table
--pathstringthe rootthe repository's folder for the plugin
--pull-requestboolopen a pull request (a merge request on GitLab)
--repostringthe repository's https:// Git URL
--revisionstringthe headthe revision to export
--secretstringtenant secret with a token that may push (the token, or user:token), bound to the repository's host and, for a pull request on another API host, that one too (oz0 secret set NAME --host HOST)
--tenantstringdefaultthe tenant
--titlestringthe revision's messagethe pull request's title

Inherited flags

FlagTypeDefaultDescription
--contextstring$OZ0_CONTEXT or <config dir>/orchestrator-zero/context.jsonCLI context file written by server init
--log-levelstringinfolog level: debug, info, warn or error

See all oz0 commands and the global flags.

On this page
Copyright © 2026