Files
trufflehog/docs
Bryan Beverly 4d2a8ef686 Add man page generation for trufflehog (#4894)
* Add man page generation for trufflehog

Add a hidden --generate-man-page flag that uses an enhanced Kingpin
template to produce a standards-compliant roff man page. The man page
includes auto-generated OPTIONS and COMMANDS sections (synced with the
CLI definitions), plus hand-maintained EXAMPLES, EXIT STATUS,
ENVIRONMENT, FILES, BUGS, and SEE ALSO sections.

The DESCRIPTION and EXAMPLES sections call out the interactive TUI
that launches when trufflehog is run without a command in a terminal.

To keep the generated output deterministic, the --concurrency flag is
defined with a static "N" placeholder; the runtime.NumCPU() default is
applied at runtime instead of at flag-definition time. The usage line
also uses the lowercase binary name.

Distribution:
- Makefile `man` target to regenerate locally
- GoReleaser before hook to regenerate at release time with the
  correct version injected via ldflags
- Release archives explicitly include LICENSE, README.md, and
  docs/man/trufflehog.1
- Homebrew formula installs the man page to man1

The Makefile `test-release` target is also updated to GoReleaser v2
flag syntax (--skip=publish,sign), which is needed for the snapshot
release to succeed locally without cosign installed.

Made-with: Cursor

* Add man page maintenance guardrails

Add a CI job that regenerates the man page on every PR and fails if
the checked-in copy at docs/man/trufflehog.1 is out of date with the
current CLI definitions. Document the regeneration workflow in
CONTRIBUTING.md so contributors know to run `make man` and commit
the result when changing flags or subcommands.

Made-with: Cursor
2026-04-18 15:19:20 -07:00
..
2025-05-20 13:28:38 -07:00