Skip to content

Add hidden docs command for man page and markdown generation#160

Merged
silv-io merged 1 commit intomainfrom
silv-io/flc-499
Mar 24, 2026
Merged

Add hidden docs command for man page and markdown generation#160
silv-io merged 1 commit intomainfrom
silv-io/flc-499

Conversation

@silv-io
Copy link
Copy Markdown
Member

@silv-io silv-io commented Mar 23, 2026

Motivation

lstk had no man pages or generated documentation. Users installing via Homebrew or release archives couldn't run man lstk to get help.

Changes

  • Add hidden lstk docs subcommand with --format (man/markdown) and --dir flags using cobra/doc
  • Integrate man page generation into GoReleaser pipeline (before-hook runs go run . docs, archives include manpages/*)
  • Add completions/ and manpages/ to .gitignore

The docs command is hidden (not shown in --help) following the same pattern as Helm's helm docs command. Cobra automatically excludes it from the generated documentation.

Tests

4 new integration tests:

  • Man page generation produces expected .1 files
  • Markdown generation produces expected .md files
  • Invalid format is rejected with exit code 1
  • Command is hidden from --help output

Related

@silv-io silv-io marked this pull request as ready for review March 23, 2026 14:49
Copy link
Copy Markdown
Contributor

@anisaoshafi anisaoshafi left a comment

Choose a reason for hiding this comment

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

TIL 🚀

@silv-io silv-io merged commit 2cf287a into main Mar 24, 2026
8 checks passed
@silv-io silv-io deleted the silv-io/flc-499 branch March 24, 2026 09:57
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.

2 participants