bruceadams / wdscli

Command line interface to the IBM Watson Discovery Service API
MIT License
8 stars 0 forks source link

Rearrange how _credentials_ is specified: support a default of `credentials.json` #8

Closed bruceadams closed 7 years ago

bruceadams commented 7 years ago

Right now, wdscli always requires a path to a JSON file containing service credentials (url, username and password). For many typical uses of wdscli a user is only going to be interacting with a single service instance. Coming up with a clean way to allow credentials to just be there would enhance the user experience.

Now credentials is always required after the subcommand: wdscli overview my-service-credentials.json Proposed, credentials are optional and in front of the subcommand: wdscli -c my-service-credentials.json overview And, there is a well defined default filename for credentials, probably just credentials.json.

ln -s my-service-credentials.json credentials.json
wdscli overview
bruceadams commented 7 years ago

This is a concrete change that partly addresses the wide-eyed dreams described in #7.

bruceadams commented 7 years ago

This is in the released wdscli. I still want to support accepting credentials directly from an environment variable and possibly even three separate environment variables, but those are distinct from this issue.