Skip to content

gitlab cli tool

Table of Content

gitlab cli tool,between%20windows%20and%20browser%20tabs

GLab is an open source GitLab CLI tool bringing 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, merge requests, watch running pipelines directly from your CLI among other features.


Find the latest release from the release page.

cd ~/dnld
curl -LO
mv bin/glab ~/.local/bin/.
glab --version


Use GitLab OAuth 2.0.

  • redirect URL: http://localhost:7171/auth/redirect
  • confidential: not set
  • scopes:
    • openid
    • profile
    • read_user
    • write_repository
    • api

Get application ID and secret. Run below and select web when prompted for the authentication method, open web link provided and authorize.

glab config set client_id {application_id} --host
glab auth login --hostname


Global configuration is available at ~/.config/glab-cli/config.yml.

# editor
glab config set --global editor nvim

# default gitlab host
glab config set -g host


# list available issues
glab issue list

# add note to the existing issue #1
glab issue note 1  # ENTER to proceed to text editor to modify note/comment including /spent and other slash commands

# list pipeline history
glab ci list

# show pipeline log
glab ci status

# view pipeline trace
glab ci trace