glab is an open-source CLI tool that allows you to interact with GitLab directly from your terminal.
glab?Using glab, you can:
This is especially useful for developers and DevOps engineers who frequently work with GitLab.
There are several ways to install glab on Debian-based systems. Below are the most reliable methods:
This is one of the easiest ways to install glab using a package manager.
# Add the WakeMeOps repository
curl -sSL "https://raw.githubusercontent.com/upciti/wakemeops/main/assets/install_repository" | sudo bash
# Install glab
sudo apt install glab
After installation, verify the version:
glab --version
If you prefer using a prebuilt .deb package instead of compiling from source, follow these steps:
# Add the Prebuilt-MPR repository
wget -qO - 'https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub' | gpg --dearmor | sudo tee /usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg 1> /dev/null
echo "deb [arch=all,$(dpkg --print-architecture) signed-by=/usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg] https://proget.makedeb.org prebuilt-mpr $(lsb_release -cs)" | sudo tee /etc/apt/sources.list.d/prebuilt-mpr.list
# Update package lists
sudo apt update
# Install glab
sudo apt install glab
After installation, check the version:
glab --version
If you want to compile glab from source, use makedeb:
git clone 'https://mpr.makedeb.org/glab'
cd glab/
makedeb -si
This method ensures you have the latest version but requires additional dependencies.
glabOnce installed, you can authenticate and start using glab.
glab auth login
gitlab.com (or your self-hosted GitLab instance).glab mr list
glab mr view <MR-ID>
Example:
glab mr view 42
glab mr merge <MR-ID>
glab issue list
https://docs.gitlab.com/editor_extensions/gitlab_cli/#install-the-cli
https://gitlab.com/gitlab-org/cli/#installation
https://gitlab.com/gitlab-org/cli/-/blob/main/docs/installation_options.md#linux
https://docs.makedeb.org/prebuilt-mpr/getting-started/#setting-up-the-repository