Skip to content

Conversation

@digizeph
Copy link
Member

@digizeph digizeph commented Dec 9, 2025

Summary

Refactored CLI command handling by moving argument definitions from the main monocle.rs file to individual command submodules.

Changes

  • Each command module now contains its own Args struct using clap::Args
  • Main file reduced from ~1600 lines to ~140 lines
  • All command logic and argument definitions are now co-located in their respective modules

Files Changed

  • src/bin/monocle.rs: Simplified to only import and dispatch to command modules
  • src/bin/commands/*.rs: Added *Args structs with CLI argument definitions
  • CHANGELOG.md: Added note about the refactoring

Testing

  • cargo check passes
  • cargo clippy passes
  • cargo test passes
  • CLI help output verified working correctly

No functional changes to CLI behavior.

- Move CLI argument structs from main monocle.rs to individual command modules
- Each command module now contains its own Args struct using clap::Args
- Reduces main file from ~1600 lines to ~140 lines
- Improves code organization and maintainability
- No functional changes to CLI behavior
@digizeph digizeph merged commit 9dbefe3 into main Dec 9, 2025
1 check passed
@digizeph digizeph deleted the feature/refactor-commands branch December 9, 2025 20:39
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