Skip to content

This document is a WORK IN PROGRESS.
This is just a quick personal cheat sheet: treat its contents with caution!


gLab is an open source GitLab CLI tool. Work with issues, merge requests, watch running pipelines directly from your CLI among other features. Inspired by gh, the official GitHub CLI tool.



Table of contents


In order to install glab, run the following (you might want to check the content of before executing it):

$ curl -s | sudo sh


$ glab auth login
  > ? What GitLab instance do you want to log into?
  >   GitLab Self-hosted Instance
  > ? GitLab hostname:
  > ? Paste your authentication token:
  >   Generate a Personal Access Token here:
  >   (named "glab", without expiration date, and selecting *at least* "api" and "write_repository"
  >   scopes)
  >   After clicking "Create personal access token", copy your new personal access token (at the top of
  >   the page), then paste it into the terminal asking your authentication token.
  > ? Choose default git protocol
  >   SSH

If needed, see how to install, configure and use SSH, and see how to configure SSH with Git.

Then, set the default editor used by glab (e.g. vi):

$ glab config set --global editor vi


Now, in the console, when in a folder tracked by Git, the following commands can be run:

  • List issues of a Git project:

    $ glab issue list

  • Check the CI of a Git project:

    $ glab pipeline ci view

See for more commands.

If this cheat sheet has been useful to you, then please consider leaving a star here.