Skip to content

feat: add man page generation using clap_mangen#63

Merged
avihut merged 3 commits intodevelopfrom
claude/add-man-pages-gSpcN
Jan 23, 2026
Merged

feat: add man page generation using clap_mangen#63
avihut merged 3 commits intodevelopfrom
claude/add-man-pages-gSpcN

Conversation

@avihut
Copy link
Owner

@avihut avihut commented Jan 23, 2026

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 man command with options:

    • daft man - output all man pages to stdout
    • daft man --command <cmd> - output specific command's man page
    • daft man --output-dir <dir> - write man pages to directory
    • daft man --install - install to ~/.local/share/man/man1
  • Justfile recipes:

    • just gen-man - generate man pages to man/ directory
    • just install-man - install man pages to system location
  • Homebrew integration: Updated HOMEBREW.md with formula instructions for automatic man page installation during brew install

  • Documentation 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 --release succeeds
  • just gen-man generates man pages to man/ directory
  • daft man --command git-worktree-clone outputs valid man page
  • Man pages render correctly: MANPATH=/tmp/test-man man git-worktree-clone
  • cargo clippy -- -D warnings passes
  • just test-unit passes

🤖 Generated with Claude Code

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
@avihut avihut changed the base branch from master to develop January 23, 2026 14:24
@avihut avihut self-assigned this Jan 23, 2026
@avihut avihut added the enhancement New feature or request label Jan 23, 2026
@avihut avihut added this to the v1.0.0 milestone Jan 23, 2026
@avihut avihut linked an issue Jan 23, 2026 that may be closed by this pull request
@avihut avihut added the documentation Improvements or additions to documentation label Jan 23, 2026
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 avihut changed the title ci: trigger canary workflow feat: add man page generation using clap_mangen Jan 23, 2026
@avihut avihut merged commit 9df098c into develop Jan 23, 2026
3 checks passed
@avihut avihut deleted the claude/add-man-pages-gSpcN branch January 23, 2026 17:16
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create man Pages

2 participants