@fye/gitlab-variable-client

Pull variables from GitLab CI/CD variables and aggregate them by environment

Usage no npm install needed!

<script type="module">
  import fyeGitlabVariableClient from 'https://cdn.skypack.dev/@fye/gitlab-variable-client';
</script>

README

gitlab-variable-client

This package is a command line utility for pulling CI/CD variables from GitLab for a particular environment. The variables for the provided environemnt will be printed out to the terminal in key:value formate. Install globally and use in your terminal. You will neeed to provide a private token, the project ID and the environment name.

Install

NPM

npm install -g @fye/gitlab-variable-client

Yarn

yarn global install @fye/gitlab-variable-client

Usage

All Options are required

Usage: gitlab-variables [options]

Options:
  -t, --token <token>                          GitLab Access Token
  -g, --gitlab-project-id <gitlab project id>  GitLab project Id
  -e, --environment <environment>              GitLab Environment to export variables for (stage | staging | development | develop | dev | production | prod | review | review* | default | *)
  -h, --help                                   display help for command

Example:

gitlab-variables --token *my-awesome-token* --gitlab-project-id 1234 --environment production