CircleCI-Public / circleci-cli

Use CircleCI from the command line
https://circleci-public.github.io/circleci-cli/
MIT License
405 stars 232 forks source link

Support Project Secrets / Environment Variables #652

Open derekpovah opened 2 years ago

derekpovah commented 2 years ago

What problem does this feature solve?:

One of the biggest gaps in our CircleCI CLI workflow is not having the ability to manage Project specific environment variables via the CLI. Ideally the project commands would try to infer the CircleCI Project from the current directory, much like the follow command, but should obviously favor the vcs-type, org-name, and repo-name the user specifies.

Provide an example:

$ circleci help project
...

Usage:
  circleci project [command]

Available Commands:
  remove-secret Remove an environment variable from the named project
  secrets       List all secrets for the named project
  store-secret  Store a new environment variable in the named project. The value is read from stdin.
$ circleci project secrets <vcs-type> <org-name> <repo-name>
Project: <vcs-type>/<org-name>/<repo-name>
+----------------------+-------+
| ENVIRONMENT VARIABLE | VALUE |
+----------------------+-------+
| XXXXXX_XXXXX         | ••••  |
| XXXXXX_XXX           | ••••  |
| XXXXXX_XXXXXXXX      | ••••  |
+----------------------+-------+
$ circleci project remove-secret <vcs-type> <org-name> <repo-name> <secret name>
$ circleci project store-secret <vcs-type> <org-name> <repo-name> <secret name>
Enter secret value and press enter:
abdelDriowya commented 1 year ago

Hi @derekpovah , thanks for your suggestion. I will check internally with the team, and get back to you asap