Nexmo / nexmo-cli

Nexmo CLI (Command Line Interface)
https://nexmo.com
MIT License
78 stars 52 forks source link

Add per project CLI configuration #113

Open cbetta opened 7 years ago

cbetta commented 7 years ago

This config could hold:

Related issues:

Gut feeling says we can put this in the local .nexmorc we are already looking for

cbetta commented 7 years ago

Changes to be made:

cbetta commented 7 years ago

Remaining questions:

leggetter commented 7 years ago

API key and secret are account level credentials where as application ID and public/private keys are Nexmo application level config entities. Page size is a CLI specific thing. This proposed solution is suggesting adding a way of overwriting account/global config at an application level and also allows some CLI config to be set in the same place 🤔

I'm a little concerned about merging account, CLI config, environment/API host config and application config. Should they be very clearly separated?

My feeling is that we keep #109 focused on application config and separate from this issue. I do think this issue can address account, CLI and environment config.

What should be done if there's no global file but there is a local file and someone sets new config?

Consistency suggests that config:set should default to global unless a --local flag is passed. Maybe the CLI could warn if config:set is called and there is local config?