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

Add login subcommand #13

Closed victorskl closed 4 years ago

victorskl commented 4 years ago

Now, one has to do:

aws sso login --profile=dev
yawsso -p dev

Add login subcommand option, so that:

yawsso login --profile dev

... would invoke SSO login then sync the profile (and/or all named profiles) automatically.

victorskl commented 4 years ago

Login subcommand comes with PR https://github.com/victorskl/yawsso/pull/15

Up for user test with RC2 now:

pip install -U yawsso==0.4.0rc2

https://pypi.org/project/yawsso/0.4.0rc2/

brainstorm commented 4 years ago

Works like a charm, small detail though:

(base) romanlaptop:~ romanvg$ yawsso version
yawsso 0.4.0rc2
(base) romanlaptop:~ romanvg$ yawsso login -e
usage: yawsso [-h] [--default] [--default-only] [-p [[...]]] [-b] [-d] [-t]
              [-e] [-v]
              ...
yawsso: error: unrecognized arguments: -e
(base) romanlaptop:~ romanvg$ yawsso -e login
Attempting to automatically open the SSO authorization page in your default browser.
(... all good ...)

Either the usage help message should indicate positional commands (yawsso <COMMAND> <flags> or allow flags pre-command, I prefer the former option but it's up to you ;)

victorskl commented 4 years ago

Yap; improved it with PR https://github.com/victorskl/yawsso/pull/16. The -e works either side now in pip install -U yawsso==0.4.0rc3 😃

victorskl commented 4 years ago

Closed with https://github.com/victorskl/yawsso/pull/17 pip install -U yawsso==0.4.0