Closed webgtx closed 6 months ago
I've decided to use fire as the main cli library
You don't have to build any boilerplates for arguments, or help infromation. Everything is auto-generated from classes and functions. So far, this library has made the migration to python a good decision.
The CLI has been refactored, with necessary core features
Subject: CLI Refactoring Approach and Library Selection for Octoffers Python Migration
As we embark on the critical task of refactoring the Command-Line Interface (CLI) and core functionality of Octoffers for the Python migration, it is imperative to choose a library that aligns with our project goals of simplicity, maintainability, and user-friendliness. After careful consideration, I propose the following libraries for your review:
Click:
Overview: Click is a widely-adopted Python package renowned for creating elegant and user-friendly command-line interfaces. Its declarative syntax and automatic help page generation make it a strong contender for our refactoring efforts.
Advantages:
Example:
Fire:
Overview: Fire, developed by Google, offers automatic CLI generation from existing Python code. It's particularly useful for projects where simplicity and quick implementation are crucial.
Advantages:
Example:
Typer:
Overview: Typer is a fast and user-friendly library for building command-line applications, built on top of Click. It supports type hints, providing automatic type checking and interactive help message generation.
Advantages:
Example:
Please review these options, considering the project's requirements and our collective development preferences. Your feedback and insights are invaluable as we strive to enhance the Octoffers CLI in our Python migration.