Skip to main content

Plugin

Plugin options are used to globally configure the plugin's behavior at runtime.

buf.gen.yaml
plugins:
- plugin: go_temporal
out: gen
opt: <flag>=<value>,<flag>=<value>
strategy: all

Options

cli-categories

bool

Enables cli categories for grouping workflow, query, signal, and update commands.

info

Requires the cli-categories plugin option to be enabled.

buf.gen.yaml
plugins:
- plugin: go_temporal
out: gen
opt: cli-enabled=true,cli-categories=true
strategy: all

cli-enabled

bool

Enables cli generation.

buf.gen.yaml
plugins:
- plugin: go_temporal
out: gen
opt: cli-enabled=true
strategy: all

cli-v3

bool

Use urfave/cli/v3 for CLI generation. Default is false, which uses urfave/cli/v2.

buf.gen.yaml
plugins:
- plugin: go_temporal
out: gen
opt:
- cli-enabled=true
- cli-v3=true
strategy: all

disable-workflow-input-rename

bool

Prior to v1.3.0, the generated workflow input struct used the <Workflow>Input naming convention. This caused conflicts with workflow definitions that used input messages with the same naming convetion. In v1.3.0, the naming convention for the generated workflow input struct was changed to <Workflow>WorkflowInput. In order to continue to support schemas using the old convention, this option was added to enable the old naming convention.

buf.gen.yaml
plugins:
- plugin: go_temporal
out: gen
opt: disable-workflow-input-rename=true
strategy: all

docs-out

string

Enables doc generation by specifying the output path.

When the value resolves to a file path (e.g. ./proto/README.md), all packages are rendered into a single file. When the value resolves to a directory (a path with a trailing separator, or pointing at an existing directory), one documentation file is generated per proto package, mirroring the proto source tree, with a README.md index at the directory root.

buf.gen.yaml
plugins:
- plugin: go_temporal
out: gen
opt: docs-out=./proto/README.md
strategy: all

docs-filename

string (default: README.md)

Per-package output filename in directory mode. Must be a flat filename (no path separators). Ignored when docs-out resolves to a file.

buf.gen.yaml
plugins:
- plugin: go_temporal
out: gen
opt: docs-out=./docs/,docs-filename=README.mdx
strategy: all

docs-index

string (default: README.md)

Filename of the index file written at the root of the output directory in directory mode. Must be a flat filename (no path separators). Ignored when docs-out resolves to a file.

buf.gen.yaml
plugins:
- plugin: go_temporal
out: gen
opt: docs-out=./docs/,docs-index=index.md
strategy: all

docs-template

string

Specifies the path to a custom template to use for generated documentation. See the guide for more details.

info

Requires the docs-out plugin option to be defined. In directory mode, the template must define both package and index sub-templates.

buf.gen.yaml
plugins:
- plugin: go_temporal
out: gen
opt: docs-out=./proto/README.md,docs-template=./docs/custom.tpl
strategy: all

enable-codec

bool

Enables codec server generation

buf.gen.yaml
plugins:
- plugin: go_temporal
out: gen
opt: enable-codec=true
strategy: all

enable-patch-support

bool

Enables support for protoc-gen-go-patch

buf.gen.yaml
plugins:
- plugin: go_temporal
out: gen
opt: enable-patch-support=true
strategy: all

enable-xns

bool

Enables xns generation

buf.gen.yaml
plugins:
- plugin: go_temporal
out: gen
opt: enable-xns=true
strategy: all

ignore-acronyms

string

Semicolon-delimited list of acronyms to ignore during CamelCase renaming.

buf.gen.yaml
plugins:
- plugin: go_temporal
out: gen
opt:
- ignore-acronyms=AWS;SQL
strategy: all

module-map [EXPERIMENTAL]

[]string

Repeated set of <proto_file>=<go_import_path> (e.g. -Mgoogle/protobuf/timestamp.proto=google.golang.org/protobuf/types/known/timestamppb)

buf.gen.yaml
plugins:
- plugin: go_temporal
out: gen
opt:
- Mgoogle/protobuf/timestamp.proto=google.golang.org/protobuf/types/known/timestamppb
strategy: all

nexus

bool

Enables experimental Nexus generation.

buf.gen.yaml
plugins:
- plugin: go_temporal
out: gen
opt:
- nexus=true
strategy: all

nexus-exclude-operation-tags

string

Semicolon-delimited list of Nexus operation tags to exclude from generation.

buf.gen.yaml
plugins:
- plugin: go_temporal
out: gen
opt:
- nexus=true
- nexus-exclude-operation-tags=disabled;internal
strategy: all

nexus-exclude-service-tags

string

Semicolon-delimited list of Nexus service tags to exclude from generation.

buf.gen.yaml
plugins:
- plugin: go_temporal
out: gen
opt:
- nexus=true
- nexus-exclude-service-tags=disabled;internal
strategy: all

nexus-include-operation-tags

string

Semicolon-delimited list of Nexus operation tags to include in generation.

buf.gen.yaml
plugins:
- plugin: go_temporal
out: gen
opt:
- nexus=true
- nexus-include-operation-tags=enabled;internal
strategy: all

nexus-include-service-tags

string

Semicolon-delimited list of Nexus service tags to include in generation.

buf.gen.yaml
plugins:
- plugin: go_temporal
out: gen
opt:
- nexus=true
- nexus-include-service-tags=enabled;internal
strategy: all

patches

string

Configures how particular Patches are introduced in generated code globally.

buf.gen.yaml
plugins:
- plugin: go_temporal
out: gen
opt: patches=64_REMOVED;65_MARKER;66_ENABLED;67_DISABLED
strategy: all