feat: add man page generation using clap_mangen#63
Merged
Conversation
Add the ability to generate man pages for all daft commands using the clap_mangen crate. Man pages are auto-generated from the existing clap command definitions, ensuring they stay in sync with the CLI. New features: - `daft man` - outputs all man pages to stdout - `daft man --command <cmd>` - outputs specific command's man page - `daft man --output-dir <dir>` - writes man pages to directory - `daft man --install` - installs to ~/.local/share/man/man1 Justfile recipes: - `just gen-man` - generates man pages to man/ - `just install-man` - installs man pages to system location https://claude.ai/code/session_01H3JTRdUdbeniuWMLiSkYbD
Update HOMEBREW.md to include: - Man page generation and installation in formula install block - New section explaining man page installation - Test assertion for man page existence - Add git-worktree-carry symlink to formula examples With this formula update, `man git-worktree-clone` will work immediately after Homebrew installation since man pages are installed to /usr/local/share/man/man1/ (always in MANPATH). https://claude.ai/code/session_01H3JTRdUdbeniuWMLiSkYbD
Closed
Rewrite all command documentation to match the tone and style of
official git man pages:
- Use infinitive form in NAME section ("Clone" not "Clones")
- Write DESCRIPTION in third-person declarative prose
- Remove casual language and marketing-style phrasing
- Add cross-references using git-command(1) format
- Standardize option descriptions ("Be verbose" not "Enable verbose")
- Remove examples from long_about (belong in EXAMPLES section)
Commands updated: clone, init, checkout, checkout-branch,
checkout-branch-from-default, prune, carry, hooks
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
avihut
added a commit
that referenced
this pull request
Jan 24, 2026
* feat: add man page generation using clap_mangen Add the ability to generate man pages for all daft commands using the clap_mangen crate. Man pages are auto-generated from the existing clap command definitions, ensuring they stay in sync with the CLI. New features: - `daft man` - outputs all man pages to stdout - `daft man --command <cmd>` - outputs specific command's man page - `daft man --output-dir <dir>` - writes man pages to directory - `daft man --install` - installs to ~/.local/share/man/man1 Justfile recipes: - `just gen-man` - generates man pages to man/ - `just install-man` - installs man pages to system location https://claude.ai/code/session_01H3JTRdUdbeniuWMLiSkYbD * docs: add man page installation to Homebrew formula guide Update HOMEBREW.md to include: - Man page generation and installation in formula install block - New section explaining man page installation - Test assertion for man page existence - Add git-worktree-carry symlink to formula examples With this formula update, `man git-worktree-clone` will work immediately after Homebrew installation since man pages are installed to /usr/local/share/man/man1/ (always in MANPATH). https://claude.ai/code/session_01H3JTRdUdbeniuWMLiSkYbD * docs: align command help text with git man page conventions Rewrite all command documentation to match the tone and style of official git man pages: - Use infinitive form in NAME section ("Clone" not "Clones") - Write DESCRIPTION in third-person declarative prose - Remove casual language and marketing-style phrasing - Add cross-references using git-command(1) format - Standardize option descriptions ("Be verbose" not "Enable verbose") - Remove examples from long_about (belong in EXAMPLES section) Commands updated: clone, init, checkout, checkout-branch, checkout-branch-from-default, prune, carry, hooks Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds man page generation for all daft commands using
clap_mangen. Man pages are automatically generated from clap command definitions, ensuring documentation stays in sync with the CLI.Closes #12
Changes
New
daft mancommand with options:daft man- output all man pages to stdoutdaft man --command <cmd>- output specific command's man pagedaft man --output-dir <dir>- write man pages to directorydaft man --install- install to~/.local/share/man/man1Justfile recipes:
just gen-man- generate man pages toman/directoryjust install-man- install man pages to system locationHomebrew integration: Updated
HOMEBREW.mdwith formula instructions for automatic man page installation duringbrew installDocumentation tone: Rewrote all command help text to match git man page conventions (third-person declarative prose, cross-references, consistent option descriptions)
Test plan
cargo build --releasesucceedsjust gen-mangenerates man pages toman/directorydaft man --command git-worktree-cloneoutputs valid man pageMANPATH=/tmp/test-man man git-worktree-clonecargo clippy -- -D warningspassesjust test-unitpasses🤖 Generated with Claude Code