Skip to content

feat: improve help system with git-like format and dynamic generation#98

Merged
avihut merged 5 commits intomasterfrom
daft-82/help
Jan 27, 2026
Merged

feat: improve help system with git-like format and dynamic generation#98
avihut merged 5 commits intomasterfrom
daft-82/help

Conversation

@avihut
Copy link
Owner

@avihut avihut commented Jan 27, 2026

Summary

  • Add git-like help format when running daft or git daft without arguments
  • Support daft worktree-<command> invocation style alongside git worktree-<command>
  • Generate command descriptions dynamically from clap definitions instead of hardcoded strings
  • Add missing commands to help: worktree-flow-adopt, worktree-flow-eject, daft branch, daft multi-remote, daft setup shortcuts, daft shell-init, daft completions, daft man

Test plan

  • cargo build succeeds
  • cargo clippy -- -D warnings passes
  • cargo fmt -- --check passes
  • just test-unit passes
  • ./target/debug/daft shows git-like help with all commands
  • ./target/debug/git-daft shows help with git worktree-<command> as primary usage

🤖 Generated with Claude Code

avihut and others added 5 commits January 27, 2026 18:46
Enable running worktree commands directly through daft subcommands:
- daft worktree-clone, daft worktree-checkout, daft worktree-prune, etc.

Add get_clap_args() helper in lib.rs to handle argument parsing for both
symlink invocation (git-worktree-clone) and subcommand invocation
(daft worktree-clone). Update all worktree commands to use this helper.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace static help strings in docs.rs with dynamic generation using
clap's CommandFactory trait. This ensures command descriptions stay
in sync with individual command help and adds missing commands:
- worktree-flow-adopt, worktree-flow-eject
- daft branch, daft multi-remote, daft setup shortcuts
- daft shell-init, daft completions, daft man

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When running 'daft' directly, the usage line now shows
'daft worktree-<command>' instead of 'git-worktree-<command>'.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@avihut avihut linked an issue Jan 27, 2026 that may be closed by this pull request
@avihut avihut added the bug Something isn't working label Jan 27, 2026
@avihut avihut self-assigned this Jan 27, 2026
@avihut avihut merged commit 5ff2a8e into master Jan 27, 2026
4 checks passed
@avihut avihut deleted the daft-82/help branch January 27, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

daft --help is not very helpful

1 participant