cli icon indicating copy to clipboard operation
cli copied to clipboard

Add flag to env to request json only or a single variable

Open Fjaoos opened this issue 2 years ago • 2 comments

Please provide details on the following items. Failure to do so may result in deletion of your feature request. The idea for this comes from the closed issue https://github.com/cloudfoundry/cli/issues/1003.

It would be benefical for some developers to have the option to request just a single variable or just the json with the env command. Like: cf env --json or cf env --var VCAP_SERVICES

What's the user value of this feature request? The environment values change every time an application is deployed to the CF. To speed up local developed we have a local connection to the CF space but this needs the current VCAP_SERVICES value. As of right now we store the output from cf env in a text, read this file, use some dirty substring calls to remove the unwanted text, parse the JSON, change a few values and stringify it to save it in the .env.

Who is the functionality for? Possibly lots of local developers.

How often will this functionality be used by the user? Everytime after the deployment of a new version of an app.

Who else is affected by the change? No.

Is your feature request related to a problem? Please describe. Not a problem but an inconvenience.

Describe the solution you'd like Something like "cf env --json" or "cf env --var VCAP_SERVICES"

Describe alternatives you've considered Described that earlier.

Additional context

Fjaoos avatar Sep 22 '22 15:09 Fjaoos

This would be really helpful to our workflow as well

AdrianMuntean avatar Sep 26 '22 11:09 AdrianMuntean

Any updates here? This would be a cool feature!

zenobios avatar Dec 15 '23 11:12 zenobios