Repository navigation
feat: implement CLI argument parsing - #13
Conversation
Add command-line interface with clap: - --path: specify Git repository path (defaults to current directory) - --commit: replay specific commit (single-commit mode) - --speed: typing speed in milliseconds per character (default: 30) Includes validation: - Check if path exists - Verify path is a Git repository - Canonicalize repository path Resolves #3 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
|
Caution Review failedThe pull request is closed. WalkthroughThe pull request introduces CLI argument parsing using Clap framework to Changes
Sequence DiagramsequenceDiagram
participant main as main()
participant clap as Clap Parser
participant args as Args
participant fs as File System
participant app as Application Logic
main->>clap: Parse command-line arguments
clap-->>args: Return Args struct
main->>args: Call validate()
args->>fs: Check path exists
alt Path exists
args->>fs: Check .git directory
alt .git found
args->>fs: Canonicalize path
args-->>main: Return canonicalized PathBuf
main->>main: Print runtime info<br/>(path, speed, mode)
main->>app: Continue with main logic
else .git not found
args-->>main: Return error (not a Git repo)
end
else Path not found
args-->>main: Return error (path invalid)
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Implement command-line interface with clap for git-logue.
Changes
Argsstruct with clap derive macro:--path <PATH>: specify Git repository path (defaults to current directory)--commit <HASH>: replay specific commit for single-commit mode--speed <MS>: typing speed in milliseconds per character (default: 30)Test plan
cargo buildsucceeds--helpdisplays usage information--speed,--commit) work correctlyExample usage
Resolves #3
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes