GitLab CLI -
GLab is an open source GitLab CLI tool. It brings GitLab to your terminal: next to where you are already working with Git and your code, without switching between windows and browser tabs.
- Work with issues.
- Work with merge requests.
- Watch running pipelines directly from your CLI.
The GitLab CLI uses commands structured like
glab <command> <subcommand> [flags]
to perform many of the actions you usually do from the GitLab user interface:
# Sign in glab auth login --stdin < token.txt # View a list of issues glab issue list # Create merge request for issue 123 glab mr for 123 # Check out the branch for merge request 243 glab mr checkout 243 # Watch the pipeline in progress glab pipeline ci view # View, approve, and merge the merge request glab mr view glab mr approve glab mr merge
Install the CLI
Installation instructions are available in the GLab
Authenticate with GitLab
To authenticate with your GitLab account, run
glab auth login.
glab respects tokens set using
Open an issue in the
to send us feedback.
glab completion commands fail when using the 1Password shell plugin
The 1Password shell plugin
adds the alias
glab='op plugin run -- glab', which can interfere with the
command. If your
glab completion commands fail, configure your shell to prevent expanding aliases
before performing completions:
For Zsh, edit your
~/.zshrcfile and add this line:
For Bash, edit your
~/.bashrcfile and add this line:
complete -F _functionname glab
For more information, see issue 122 for the 1Password shell plugin.