oz0 client generate

Usage and flags for oz0 client generate.

For: Operators and developers looking up a command.

Write typed wrappers of a tenant's agents and flows for the Python, TypeScript or Go client SDK: a type per object of their input and output schemas, and per agent and flow a method that starts it with its input typed and one that runs it and returns its answer typed.

They come from the tenant's OpenAPI document, GET /v1/openapi.json, which the command reads from the edge: with an API key from $OZ0_API_KEY (--api-key-env) when --url or $OZ0_URL names the edge, and with the CLI context's operator certificate otherwise. --from reads a saved document instead.

Without --out the code goes to stdout. With --out DIR it goes to DIR/agents.py, agents.ts or agents.go; a file there that was generated from the same catalog (its ETag), by the same version of the generator, for the same tenant and Go package, is left as it is unless --force, so an app's CI can run this on every build and commit what changed.

--plugin limits it to one plugin's agents and flows (GET /v1/openapi.json?plugin=), for a tenant whose whole document is large: with thousands of agents it is megabytes.

Usage

oz0 client generate [flags]

Flags

FlagTypeDefaultDescription
--api-key-envstringOZ0_API_KEYthe environment variable that holds the API key, with --url
--ca-filestring$OZ0_CA_FILEthe cluster's CA certificate, with --url
--forceboolwrite the file even when the catalog has not changed since it was generated
--fromstringread the OpenAPI document from this file ("-" for stdin) instead of the edge
--langstringthe SDK's language: python, ts or go
--outstringa directory to write agents.py, agents.ts or agents.go to, instead of stdout
--packagestringthe --out directory's name, or agentsthe Go package's name
--pluginstringonly this plugin's agents and flows
--tenantstring$OZ0_TENANT, else the API key's, or the document'sthe tenant
--urlstring$OZ0_URL, or the CLI context'sthe edge's runtime API, such as https://edge.example.com:7443

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