Skip to content

Use cog to auto-generate --help output in README#9

Merged
simonw merged 4 commits intomainfrom
claude/add-showboat-help-docs-tltid
Feb 9, 2026
Merged

Use cog to auto-generate --help output in README#9
simonw merged 4 commits intomainfrom
claude/add-showboat-help-docs-tltid

Conversation

@simonw
Copy link
Owner

@simonw simonw commented Feb 9, 2026

Fetch https://raw.githubusercontent.com/simonw/skills/refs/heads/main/cogapp-markdown/SKILL.md to /tmp with curl and read it

Use cog to include the –help text for showboat directly in the README in a fenced code block

Replace the manually maintained Usage/Global options/Exec output/Popping entries sections with a single cog block that runs go run . --help and embeds the full help text in a fenced code block. This keeps the README in sync with the actual CLI help output.

https://claude.ai/code/session_011LqtVUFCcVLs2LBuvZZpFW

Replace the manually maintained Usage/Global options/Exec output/Popping
entries sections with a single cog block that runs `go run . --help` and
embeds the full help text in a fenced code block. This keeps the README
in sync with the actual CLI help output.

https://claude.ai/code/session_011LqtVUFCcVLs2LBuvZZpFW
Extract the --help text from an inline Go string literal to help.txt,
embedded at compile time via //go:embed. This makes the help text easier
to maintain and eliminates backtick escaping workarounds.

Add sections for Image, Verify, and Extract commands with details agents
need (exit codes, --output flag, --filename flag). Add a concrete exit
code example to the Exec section.

The README now uses a cog block that runs `go run . --help` to generate
the help text, keeping docs in sync with the actual binary output.

https://claude.ai/code/session_011LqtVUFCcVLs2LBuvZZpFW
Update the resulting markdown format in help.txt to match the example:
show python3 (not python) since the example pops the python exec and
redoes it with python3, and include the image output.

Add a CI step that runs `cog --check README.md` to catch cases where
help.txt is updated but cog hasn't been re-run on the README.

https://claude.ai/code/session_011LqtVUFCcVLs2LBuvZZpFW
The help text contains triple-backtick code blocks in its "Resulting
markdown format" section, so the outer fence needs four backticks to
render correctly.

https://claude.ai/code/session_011LqtVUFCcVLs2LBuvZZpFW
@simonw simonw merged commit 176abe6 into main Feb 9, 2026
2 checks passed
@simonw simonw deleted the claude/add-showboat-help-docs-tltid branch February 9, 2026 05:35
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