Introduction

GLab is an open source GitLab CLI Tool written in Go(Golang) to seamlessly work with GitLab from the command line. Work with issues, merge requests, watch running pipelines directly from your CLI among other features. Inspired by gh, the official GitHub CLI tool.

glab is available for repositories hosted on GitLab.com and self-hosted GitLab Instances. glab supports multiple authenticated GitLab instances and automatically detects the authenticated hostname from the remotes available in the working git directory.

Usage

glab <command> <subcommand> [flags]

Core Commands

  • glab mr [list, create, reopen, delete, ..]
  • glab issue [list, create, close, reopen, delete, ...]
  • glab pipeline [list, delete, ci status, ci view, ...]
  • glab release
  • glab repo
  • glab label
  • glab alias

Examples

$ glab auth login --stdin < token.txt
$ glab issue list
$ glab mr for 123   # Create merge request for issue 123
$ glab mr checkout 243
$ glab pipeline ci view
$ glab mr view
$ glab mr approve
$ glab mr merge

Installation

You can find installation instructions on our README.

Authentication

Run glab auth login to authenticate with your GitLab account. glab will respect tokens set using GITLAB_TOKEN.

Feedback

Thank you for checking out GLab! Please open an issue. to send us feedback. We’re looking forward to hearing it.