glab-issue
Manage GitLab issues from the command line
TLDR
Display a specific issue
Display a specific issue in the default web browser
Create a new issue in the default web browser
List the last 10 issues with the bug label
List closed issues made by a specific user
Reopen a specific issue
SYNOPSIS
glab issue command [flags]
Common commands include:
create [flags] Create a new issue
list [flags] List issues
view [
close [
reopen [
update [
PARAMETERS
-R, --repo path
Specify the GitLab repository to operate on (e.g., owner/repo or a local path).
-p, --project path
Alias for --repo.
--web
Open the issue (or list of issues) in the default web browser after an action.
-t, --title string
(Used with create, update) Sets the title of the issue.
-d, --description string
(Used with create, update) Sets the description or body of the issue.
-l, --label string
(Used with create, update, list) Add, remove, or filter issues by comma-separated labels.
-a, --assignee username
(Used with create, update, list) Assign the issue to a user or filter by assignee's username.
-s, --state state
(Used with list) Filter issues by state: 'opened' or 'closed'.
--help
Display help information for glab issue or its specific subcommands.
DESCRIPTION
The glab issue command is a powerful subcommand of glab, the official GitLab command-line interface. It allows users to interact with GitLab's issue tracking system directly from their terminal, eliminating the need to switch to a web browser for common tasks.
With glab issue, developers and project managers can seamlessly perform actions such as creating new issues, listing existing ones, viewing detailed information for specific issues, closing, reopening, updating, and adding notes. This integration streamlines workflows, enabling users to manage their development tasks and collaborate on projects efficiently within their command-line environment. It leverages the GitLab API to provide a native and intuitive experience.
CAVEATS
glab issue requires glab to be installed and properly configured with a GitLab personal access token or OAuth token. This token must have sufficient scopes (e.g., api or specific read_api/write_repository scopes) to perform the desired operations. Operations are subject to GitLab API rate limits, which can affect very heavy automated usage. Ensure you are authenticated to the correct GitLab instance and have permissions for the target project.
AUTHENTICATION
Before using glab issue, you must authenticate glab with your GitLab instance. This is typically done via the glab auth login command, which guides you through setting up a personal access token or OAuth authentication.
COMMON USE CASES
glab issue is ideal for developers who prefer to stay within the command line:
- Quickly creating issues for bugs or new features identified during coding.
- Listing assigned issues to prioritize daily work.
- Updating issue statuses, adding comments, or reassigning without context switching to a web browser.
- Scripting issue creation or updates for automation in CI/CD pipelines or local development workflows.
HISTORY
glab, the official GitLab CLI, emerged from a community-driven effort to provide a native command-line experience for GitLab users, similar to GitHub's 'gh' CLI. The issue subcommand has been a fundamental component since its early development, addressing the critical need for efficient issue management without leaving the terminal. Its evolution reflects the growing demand for robust, integrated command-line tools in modern developer workflows, aiming to replicate and enhance common web UI functionalities through the GitLab API.