Merged
Conversation
Begin migration from lexopt to clap for CLI parsing. Add clap with derive feature and clap_complete for shell completion generation. Update dependency_contract.rs to reference clap types instead of lexopt, and remove the dependency contract test (will be replaced by clap's built-in validation). Plan: context/plans/migrate-lexopt-to-clap.md (T01)
Introduce cli_schema module using clap derive macros to define the complete command-line interface. This replaces the manual lexopt-based parsing approach with a declarative schema that provides better maintainability, built-in help generation, and shell completion support.
Replace manual lexopt-based argument parsing with clap derive-based parser in app.rs. This eliminates the manual parse_command dispatch logic and leverages clap's derive macros for cleaner schema definition and better error handling.
Remove all lexopt-based CLI parsing from service modules since clap now handles argument parsing at the app layer via derive macros.
Generate shell completions dynamically using clap_complete instead of hardcoded bash/zsh/fish scripts. This removes ~175 lines of manual completion logic and ensures completions stay in sync with the CLI schema automatically.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Begin migration from lexopt to clap for CLI parsing. Add clap with derive feature and clap_complete for shell completion generation.
Update dependency_contract.rs to reference clap types instead of lexopt, and remove the dependency contract test (will be replaced by clap's built-in validation).
Plan: context/plans/migrate-lexopt-to-clap.md (T01)