victorskl / yawsso

Yet Another AWS SSO - sync up AWS CLI v2 SSO login session to legacy CLI v1 credentials
MIT License
302 stars 26 forks source link

Improve subcommand and args handling #30

Closed victorskl closed 3 years ago

victorskl commented 3 years ago

Python built-in argparse does work well for simple CLI args parsing. But it does not cover well for sub-commands, global/sub-level args help options and growing CLI App use cases.

Potential solution is refactored to adapt Click or docopt. ... will be trying with Click, first.

brainstorm commented 3 years ago

My personal go-to reference when refactoring CLIs in python w/ Click: https://github.com/ewels/MultiQC/blob/master/multiqc/multiqc.py ;)

victorskl commented 3 years ago

On the second thought, still like the fact that yawsso has no major dependencies but just with Python standard lib... I will shelf this refactor for now and revisit later. Thanks for pointer and given it thought!