Skip to content

Split CLI into cli, dispatcher, and main modules#89

Merged
gvonness-apolitical merged 1 commit intomainfrom
refactor/cli-structure
Feb 16, 2026
Merged

Split CLI into cli, dispatcher, and main modules#89
gvonness-apolitical merged 1 commit intomainfrom
refactor/cli-structure

Conversation

@gvonness-apolitical
Copy link
Collaborator

Summary

  • Extract Cli struct, Commands enum, and ColorChoice into cli.rs (argument definitions)
  • Extract run_command() into dispatcher.rs (command dispatch)
  • Reduce main.rs from 638 lines to 47 lines (minimal entry point)

Adding or modifying CLI commands now touches focused files instead of one monolithic file.

Test plan

  • cargo build --workspace --all-features passes
  • cargo test --workspace --all-features passes (1,014 tests)
  • cargo clippy --workspace --all-features -- -D warnings passes (0 warnings)
  • cargo fmt --all -- --check passes
  • CI passes all 10 jobs

Separate argument definitions (cli.rs), command dispatch
(dispatcher.rs), and entry point (main.rs) so adding new
commands touches focused files instead of one 638-line monolith.
@gvonness-apolitical gvonness-apolitical merged commit b24ce7f into main Feb 16, 2026
10 checks passed
@gvonness-apolitical gvonness-apolitical deleted the refactor/cli-structure branch February 16, 2026 16:01
@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

❌ Patch coverage is 0% with 55 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cdx-cli/src/dispatcher.rs 0.00% 51 Missing ⚠️
cdx-cli/src/main.rs 0.00% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

@gvonness-apolitical gvonness-apolitical mentioned this pull request Feb 16, 2026
3 tasks
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.

1 participant