protoc-gen-doc
github.com
What it is
protoc-gen-doc is a documentation generator plugin for the Google Protocol Buffers compiler. It turns comments in .proto files into HTML, JSON, DocBook, or Markdown documentation, covering files, messages, fields, services and methods, enums and values, and extensions. It supports proto2 and proto3, including both in the same context. You can exclude files with path patterns and omit comments marked with the @exclude prefix. The plugin runs through protoc with the --doc_out and --doc_opt options; its source_relative flag places generated output in the same relative directory as the input. For customization, users can supply a Go template or use a stylesheet.css file to change HTML appearance. Installation options include Go, prebuilt releases, a Docker image, and a Maven Central package. It runs on Linux, macOS, and Windows and is self-hosted. The project is free under the MIT License, which allows use, modification, distribution, sublicensing, and sale under its terms. The license provides the software as is, without warranty.
Spec sheet
- Purpose
- protoc-gen-doc is a documentation generator plugin for the Google Protocol Buffers compiler.Read 8 Oct 2026 · github.com
- Deployment
- The README describes a Docker image with /out and /protos volumes for documentation output and proto inputs.Read 8 Oct 2026 · github.com
- Security
- GitHub reports that the project has no SECURITY.md policy and no published security advisories.Read 8 Oct 2026 · github.com
- License
- The software is distributed under the MIT License, which permits use, copying, modification, distribution, sublicensing, and sale subject to its terms.Read 4 Oct 2026 · github.com
- Comment filtering
- Comments prefixed with @exclude can be omitted from generated documentation.Read 8 Oct 2026 · github.com
- Custom templates
- The output format can be a custom Go template, and CSS placed beside the output file can customize HTML appearance.Read 8 Oct 2026 · github.com
- Customization
- Users can supply a custom Go template and can customize HTML output with a stylesheet.css file.Read 4 Oct 2026 · github.com
- Documentable elements
- Comments can document files, messages, fields, services and methods, enums and values, and extensions.Read 8 Oct 2026 · github.com
- Filtering
- The plugin supports excluding files by path patterns and excluding comments with the @exclude prefix.Read 4 Oct 2026 · github.com
- Install options
- The README documents installation with Go, prebuilt releases, a Docker image, and Maven Central.Read 8 Oct 2026 · github.com
- Installation
- The project offers a Docker image, Go installation, prebuilt releases, and a Maven Central package.Read 4 Oct 2026 · github.com
- Integration
- The plugin is invoked through protoc using the --doc_out and --doc_opt options.Read 8 Oct 2026 · github.com
- License and warranty
- The project uses the MIT License, which provides the software “AS IS” without warranty.Read 8 Oct 2026 · github.com
- Maintainer
- The GitHub profile identifies the maintainer as David Muto and lists Ottawa, Ontario, Canada.Read 8 Oct 2026 · github.com
- Output formats
- It can generate HTML, JSON, DocBook, and Markdown documentation from comments in .proto files.Read 8 Oct 2026 · github.com
- Output path option
- The source_relative flag writes generated output in the same relative directory as the input file.Read 4 Oct 2026 · github.com
- Proto support
- It supports proto2 and proto3, including both in the same context.Read 8 Oct 2026 · github.com
- Release
- The releases page lists v1.5.1 as the latest release and shows its tag as signed with a verified committer signature.Read 8 Oct 2026 · github.com
- Release platforms
- The v1.0.0 release notes say the program was ported to Go and precompiled for Linux, OSX, and Windows.Read 8 Oct 2026 · github.com
- Release signature
- The v1.5.1 release page says its tag was signed with the committer’s verified signature.Read 4 Oct 2026 · github.com
Plans and prices
Strong points and limits
Strong points
- Generates HTML, JSON, DocBook, and Markdown
- Supports proto2 and proto3 together
- Offers Go, Docker, prebuilt, and Maven Central installation
- Custom Go templates and CSS can shape output
- Free under the MIT License
Limits
- Self-hosted deployment requires managing the software
- MIT License provides the software without warranty
- Repository has no SECURITY.md policy
Who it suits
It suits teams that maintain Protocol Buffers definitions and want documentation generated from their comments. Go templates, CSS customization, and file or comment filtering offer control over output.
protoc-gen-doc in depth
Read the full write-up
protoc-gen-doc turns comments in Protocol Buffers definitions into generated documentation. It is best suited to teams already using protoc who want reference material close to their.proto files. Its format and filtering choices are useful, but it is a focused generator rather than a general gRPC workbench.
Overview
The plugin produces HTML, JSON, DocBook, or Markdown from comments in.proto files. It supports proto2 and proto3, including projects using both, and can document files, messages, fields, services, methods, enums, values, and extensions. That coverage makes it practical for keeping reference documentation alongside the definitions it describes.
Generation runs through protoc with the --doc_out and --doc_opt options. The source_relative flag keeps output in the input file’s relative directory, which suits repositories that want generated material to follow their source layout. Teams need to be comfortable with Protocol Buffers and compiler-plugin workflows; readers looking for a graphical client to call services should choose a different kind of tool.
Key features
The four built-in formats serve distinct publishing needs: HTML for browser-readable references, JSON for structured output, DocBook for document workflows, and Markdown for text-based publishing. A custom Go template can define another output shape, while a stylesheet.css file beside generated HTML can adjust its appearance. These options offer meaningful control, but custom templates and stylesheets also become artifacts the team must maintain.
Filtering can exclude files by path pattern or omit comments marked with the @exclude prefix. That helps teams keep generated references focused without removing useful comments from source. Installation choices include Go, prebuilt releases, a Docker image, and a Maven Central package. The Docker workflow uses /out and /protos volumes for output and input files, accommodating a container-based build without changing the tool’s self-hosted nature.
Pricing
MIT-licensed software — free. The license permits use, copying, modification, distribution, sublicensing, and sale under its terms. It provides the software “AS IS” without warranty. There are no paid tiers or seat and usage caps to weigh, making cost straightforward for both individual maintainers and teams; the trade-off is that they operate the generator themselves.
Platforms
protoc-gen-doc supports Linux, macOS, and Windows, and its deployment model is self-hosted. The project also offers Docker packaging. The v1.0.0 release notes describe precompiled builds for Linux, OSX, and Windows; the releases page identifies v1.5.1 as the latest release and says its tag carries the committer’s verified signature.
Who it's for
This is a strong fit for engineering teams that already keep API definitions in Protocol Buffers and want comments to produce reusable reference output as part of their own workflow. The ability to mix proto2 and proto3 and choose among multiple formats makes it adaptable across established projects. It is less suitable for people who need a managed documentation service, a graphical interface, or a broader environment for interacting with gRPC services.
Pros and cons
Pros: Four output formats and custom Go templates accommodate different publishing pipelines.
Pros: Documentation spans the major schema elements, while path and comment filters help control what appears.
Pros: Free MIT licensing and several installation routes make adoption flexible.
Cons: It is a self-hosted compiler plugin, so teams need to integrate and maintain it in their own build process.
Cons: Custom templates and CSS add control but require ongoing ownership.
Cons: The repository has no SECURITY.md policy file and no published security advisories; organizations with formal security-review requirements may need to account for that gap.
Alternatives
For a broader set of tools, browse gRPC Tools. Choose sabledocs instead for a free open-source static generator, provided Python 3.11+ and a Protobuf descriptor file fit the workflow. Kreya is a freemium option for service interaction on Linux, macOS, and Windows, with a free plan for individuals that limits request history to the latest request; it is not open source.
FintX is another freemium choice, with a free open-source plan offering unlimited gRPC clients, request autosave, import/export, method tabs, a JSON editor, and projects. For a free tool supporting service calls, server startup, reflection, method listing and description, and JavaScript scripting, consider grpcmd. grpcui, GripMock, gRPC CLI, and ProtoCall are also alternatives in the gRPC tools category.
Verdict
Choose protoc-gen-doc if your team maintains.proto definitions and wants low-cost, self-hosted reference generation with control over format and filtering. Its main advantage is making source comments usable across several documentation outputs; look elsewhere if your priority is a graphical service client or managed workflow rather than a protoc plugin.
Verdict
protoc-gen-doc gives Protocol Buffers teams several output formats and ways to customize or filter generated documentation. Its free MIT license permits broad use, while the repository states it has no security policy file.
Where Specifiction places it
- gRPC Tools#13 of 247.9