LinuxCommandLibrary

glab-issue

Manage GitLab issues from the command line

TLDR

Display a specific issue

$ glab issue view [issue_number]
copy

Display a specific issue in the default web browser
$ glab issue view [issue_number] [[-w|--web]]
copy

Create a new issue in the default web browser
$ glab issue create --web
copy

List the last 10 issues with the bug label
$ glab issue list [[-P|--per-page]] [10] [[-l|--label]] "[bug]"
copy

List closed issues made by a specific user
$ glab issue list [[-c|--closed]] --author [username]
copy

Reopen a specific issue
$ glab issue reopen [issue_number]
copy

SYNOPSIS

glab issue [<command>] [flags]

PARAMETERS

-R, --repo <REPOSITORY>
    Select another repository (defaults to $GLAB_REPO or current Git repo)

--help
    Show help for issue

-v, --verbose
    Enable verbose logging

--debug
    Enable debug logging

--logfile <FILE>
    Log to file

--paginate
    Automatically paginate output (subcommands)

--output <FORMAT>
    Output format: table, yaml, json (many subcommands)

DESCRIPTION

The glab issue command is part of the official glab GitLab CLI tool, a user-friendly command-line interface for interacting with GitLab repositories. It enables developers to create, list, view, update, close, and manage issues directly from the terminal without needing a web browser.

Key features include searching issues by labels, milestones, or assignees; adding comments (notes); moving issues between projects; and exporting issue data. It supports pagination for large lists, custom output formats like JSON or YAML, and integrates seamlessly with Git workflows. Authentication is handled via personal access tokens or SSH keys, stored securely.

Ideal for CI/CD pipelines, scripts, and power users, glab issue mirrors GitHub's gh CLI functionality, promoting efficiency in issue triage and collaboration. Usage requires prior glab installation via package managers like Homebrew, APT, or direct binary download.

CAVEATS

Requires glab authentication via glab auth login; not installed by default on Linux distros; subcommands may require project permissions.

COMMON SUBCOMMANDS

list: List issues
create: Create new issue
view: View issue details
close: Close issue
update: Edit issue title/state

EXAMPLES

glab issue list --label bug
glab issue create --title 'Fix crash' --description 'Details here'

HISTORY

Developed by GitLab Inc., glab entered alpha in 2020, reached v1.0 in 2021 with full issue support. Actively maintained, latest releases add AI features and improved UX.

SEE ALSO

git(1), hub(1)

Copied to clipboard