LinuxCommandLibrary

glab

Interact with GitLab from the command line

TLDR

Clone a GitLab repository locally

$ glab repo clone [owner]/[repository]
copy

Create a new issue
$ glab issue create
copy

View and filter the open issues of the current repository
$ glab issue list
copy

View an issue in the default browser
$ glab issue view --web [issue_number]
copy

Create a merge request
$ glab mr create
copy

View a pull request in the default web browser
$ glab mr view --web [pr_number]
copy

Check out a specific pull request locally
$ glab mr checkout [pr_number]
copy

SYNOPSIS

glab <command> <subcommand> [flags]

PARAMETERS

--help
    Show help for command

--version
    Show glab version

-R, --repo <repository>
    Specify a GitLab repository using the 'OWNER/REPO' format or the project ID

--debug
    Enable verbose logging

--config <path>
    Specify the config file to use (default: ~/.config/glab-cli/config.yml)

DESCRIPTION

glab is a command-line interface (CLI) tool that brings GitLab to your terminal. It allows you to interact with GitLab projects, issues, merge requests, pipelines, and other features without needing to open a web browser.

It provides a convenient way to perform common GitLab tasks directly from the command line, such as creating merge requests, viewing pipeline statuses, commenting on issues, and triggering builds. glab is designed to improve developer productivity by streamlining workflows and reducing context switching. It integrates seamlessly with Git and supports various authentication methods for secure access to your GitLab instance. glab is open-source and actively maintained, offering a powerful and efficient way to manage your GitLab projects.

CAVEATS

Requires a configured GitLab instance and proper authentication. Some advanced GitLab features might not be fully supported by glab.

AUTHENTICATION

glab supports different methods of authenticating with your GitLab instance, including personal access tokens, OAuth, and SSH keys. To authenticate, use the command `glab auth login`.

CONFIGURATION

glab stores its configuration in a YAML file, usually located at `~/.config/glab-cli/config.yml`. You can customize various settings, such as the default GitLab instance and preferred output format.

HISTORY

glab was created to provide a more efficient and user-friendly way to interact with GitLab from the command line than using `git` and `curl` commands directly. Its development focused on simplifying common GitLab workflows and improving developer productivity. Over time, glab has gained significant popularity within the GitLab community due to its ease of use and comprehensive feature set.

SEE ALSO

git(1), curl(1)

Copied to clipboard