Skip to content

Migrate CLI package from yargs to citty #258

Open
@bhouston

Description

@bhouston

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

  1. Add citty as a dependency
  2. Create a new command structure using citty's defineCommand
  3. Convert shared options to citty's argument format
  4. Implement each command using citty's API
  5. Update custom command loading logic
  6. Ensure backward compatibility for all command options
  7. Test thoroughly with both implementations
  8. Switch to citty implementation by default
  9. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions