Skip to content

Generate CLI docs from Go code#2736

Merged
bfirsh merged 3 commits intomainfrom
generate-cli-docs
Feb 19, 2026
Merged

Generate CLI docs from Go code#2736
bfirsh merged 3 commits intomainfrom
generate-cli-docs

Conversation

@bfirsh
Copy link
Copy Markdown
Contributor

@bfirsh bfirsh commented Feb 17, 2026

This implements CLI documentation generation using cobra/doc, building on the work started in #1696.

Changes

  • Add tools/gendocs/ Go tool to generate CLI reference docs from cobra commands
  • Generate docs/cli.md programmatically from Go source code
  • Add mise tasks:
    • mise run docs:cli - generate CLI docs
    • mise run docs:cli:check - verify docs are up to date
  • Run CLI docs check in CI alongside llms.txt check
  • Update AGENTS.md with CLI docs maintenance instructions
  • Update docs workflow to generate CLI docs before deploying

Usage

# Generate CLI docs
mise run docs:cli

# Check CLI docs are up to date (runs in CI)
mise run docs:cli:check

Notes

  • CLI docs are auto-generated and should not be edited manually
  • The check runs in CI when cmd/ or pkg/cli/ files change
  • Docs include all commands, options, and examples from cobra definitions

Closes #1696

This implements CLI documentation generation using cobra/doc, building on
the work started in #1696.

Changes:
- Add tools/gendocs/ Go tool to generate CLI reference docs
- Generate docs/cli.md from cobra command definitions
- Add mise tasks: docs:cli and docs:cli:check
- Run CLI docs check in CI alongside llms.txt check
- Update AGENTS.md with CLI docs maintenance instructions

Fixes #1696
@bfirsh bfirsh requested a review from a team as a code owner February 17, 2026 23:59
Copy link
Copy Markdown
Contributor

@tempusfrangit tempusfrangit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine but we should wire up mise to do some lifting for us!

Comment thread mise.toml
@tempusfrangit
Copy link
Copy Markdown
Contributor

@michaeldwan we'll want to track this for kong rewire.

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 18, 2026

@bfirsh I've opened a new pull request, #2745, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits February 18, 2026 16:10
This ensures CLI docs are always generated before being included in llms.txt

Co-authored-by: bfirsh <[email protected]>
Copy link
Copy Markdown
Contributor

@tempusfrangit tempusfrangit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems reasonable. I'm certain once we move to Kong this will need to be reworked but that is just part of that migration.

@bfirsh bfirsh merged commit b9dbcdc into main Feb 19, 2026
37 checks passed
@bfirsh bfirsh deleted the generate-cli-docs branch February 19, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants