A protoc plugin for generating typed Temporal clients and workers in Go from protobuf schemas. This plugin allows Workflow authors to configure sensible defaults and guardrails, simplifies the implementation and testing of Temporal workers, and streamlines integration by providing typed client SDKs and a generated CLI application.
Inspired by Chad Retz's awesome github.com/cretz/temporal-sdk-go-advanced and Jacob LeGrone's excellent Replay talk on Temporal @ Datadog
- Annotate your protobuf services and methods with Temporal options provided by this plugin
- Generate Go code that includes types, methods, and functions for implementing Temporal clients, workers, and cli applications
- Define implementations for the required Workflow and Activity interfaces
- Run your Temporal worker using the generated helpers and interact with it using the generated client and/or cli
Generated Client with:
- methods for executing workflows, queries, signals, and updates
- methods for cancelling or terminating workflows
- default
client.StartWorkflowOptions,client.UpdateWorkflowWithOptionsRequest, and more - dynamic workflow ids, update ids, and search attributes via Bloblang expressions
- default timeouts, id reuse policies, retry policies, wait policies, and more
Generated Worker resources with:
- functions for calling activities and local activities from workflows
- functions for executing child workflows and signaling external workflows
- default
workflow.ActivityOptions,workflow.ChildWorkflowOptions - default timeouts, parent close policies, retry policies, and more
Optional CLI with:
- commands for executing workflows, synchronously or asynchronously
- commands for starting workflows with signals or updates, synchronously or asynchronously
- commands for querying existing workflows
- commands for signaling or updating existing workflows
- typed flags for conveniently specifying workflow, query, and signal inputs
Generated Nexus helpers: [Experimental]
- with support for invoking a service's workflows via Nexus operations
Generated Cross-Namespace (XNS) helpers:
- with support for invoking a service's workflows, queries, signals, and updates from workflows in a different temporal namespace (or cluster)
Generated Remote Codec Server helpers
Generated Markdown Documentation
See the documentation for guides on how to configure and use this plugin.
- Install mise
- Update generated code
mise r build && mise r genlocal- Run tests
mise r testLicensed under the MIT License
Copyright for portions of project cludden/protoc-gen-go-temporal are held by Chad Retz, 2021 as part of project cretz/temporal-sdk-go-advanced. All other copyright for project cludden/protoc-gen-go-temporal are held by Chris Ludden, 2025.