generate-reference

command
v1.8.0-beta.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

generate-reference generates REFERENCE.md from Cobra command metadata.

It reads REFERENCE.md (or --template), finds GENERATE marker pairs, and replaces content between START and END with generated output. Structure is controlled by the template; see REFERENCE.template.md.

Marker format:

  • GENERATE_TOC:START / GENERATE_TOC:END - table of contents
  • GENERATE_GLOBAL_FLAGS:START / GENERATE_GLOBAL_FLAGS:END - global options
  • GENERATE:path1|path2|path3:START / GENERATE:path1|path2|path3:END - command docs (| separator)

Usage:

cp REFERENCE.template.md REFERENCE.md && go run ./tools/generate-reference
go run ./tools/generate-reference --check
go run ./tools/generate-reference --output docs/REFERENCE.md

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL