When the amount of CircleCI projects grows it's can be complicate to create, update or delete environment variables for each project. And sometime you would add environment variable without frontend tracking. This CLI wrap the CircleCI API to manage the environment variable.
Run the following command:
$> go get -u github.com/jobteaser-oss/circleci-env
The CLI expose 4 commands: list, get, set and del.
List the environment variables in a project:
$> circleci-env \
--token $CIRCLECI_TOKEN \
--vcs-type github \
--username jobteaser-oss \
--project someproject \
list
Get a environment variable in a project:
$> circleci-env \
--token $CIRCLECI_TOKEN \
--vcs-type github \
--username jobteaser-oss \
--project someproject \
get FOO
Set (create or update) a environment variable in a project:
$> circleci-env \
--token $CIRCLECI_TOKEN \
--vcs-type github \
--username jobteaser-oss \
--project someproject \
set FOO BAR
Delete a environment variable in a project:
$> circleci-env \
--token $CIRCLECI_TOKEN \
--vcs-type github \
--username jobteaser-oss \
--project someproject \
del FOO
The flag --help
or -h
can give you more information about each command.
Building the project requires go >= 1.13.x
.
You can build the service with:
make build
The final binary is available in the bin directory.