Open
Description
Migrate CLI package from yargs to citty
Description
The CLI package currently uses yargs for command-line argument parsing and command execution. We should migrate to citty, which is a more modern, lightweight CLI builder with better TypeScript support and a more elegant API.
Benefits
- Better TypeScript integration with improved type safety
- More modular and composable command structure
- Lighter dependencies for improved performance
- Enhanced developer experience with modern API design
- Better maintainability
Migration Steps
- Add citty as a dependency
- Create a new command structure using citty's
defineCommand
- Convert shared options to citty's argument format
- Implement each command using citty's API
- Update custom command loading logic
- Ensure backward compatibility for all command options
- Test thoroughly with both implementations
- Switch to citty implementation by default
- Remove yargs implementation when stable
Implementation Details
A detailed migration plan has been prepared that outlines the specific steps and code changes required. The migration will be performed incrementally to ensure stability and backward compatibility.
Related
- citty documentation
- yargs to citty migration examples