glab-pipeline
Manage GitLab CI/CD pipelines
TLDR
View a running pipeline on the current branch
View a running pipeline on a specific branch
Get the list of pipelines
Run a manual pipeline on the current branch
Run a manual pipeline on a specific branch
SYNOPSIS
glab pipeline <subcommand> [flags]
PARAMETERS
-R, --repo OWNER/REPO
Operate on repository using OWNER/REPO or full URL
--help
Show help for command
--verbose
Enable verbose logging
--quiet
Make all output quiet
-a, --all (list)
Show all pipelines instead of latest 10
--branch BRANCH (list)
Filter pipelines by branch
-f, --failed (list)
List only failed pipelines
-l, --limit N (list)
Maximum number of pipelines to list (default 10)
--page N (list)
Page number for pagination
--ref REF (list)
Filter by branch or tag ref
--sha SHA (list)
Filter by commit SHA
--status STATUS (list)
Filter by status: created|pending|running|success|failed|canceled|skipped|manual
--user USER (list)
Filter by username
-y, --yaml (list)
Output in YAML format
ID (view|rerun|cancel)
Pipeline ID for view, rerun, or cancel
DESCRIPTION
The glab pipeline command, part of the official glab GitLab CLI tool, enables seamless management of CI/CD pipelines from the Linux terminal. Users can list recent pipelines with filters for status, branch, or user; view detailed pipeline info including jobs and stages; rerun or cancel specific pipelines; retry individual jobs; and trigger manual pipelines.
It leverages the GitLab API for real-time interactions, supporting both GitLab.com and self-hosted instances. Ideal for automation scripts, CI integrations, or quick status checks without browser access. Prerequisites include installing glab via package managers like apt/snap/brew and authenticating with glab auth login using tokens or OAuth.
Key benefits: reduces context-switching, supports output formats like YAML/JSON for parsing, and handles pagination for large projects. Enhances Git workflows alongside tools like git push triggers.
CAVEATS
Requires glab installation and GitLab authentication with CI permissions (Developer+ role). Limited to API-available features; some enterprise-only options unavailable on GitLab.com. Paginated results may need --page for full lists.
SUBCOMMANDS
list: List pipelines
view ID: Show pipeline details
rerun ID: Rerun pipeline
cancel ID: Cancel running pipeline
play ID: Trigger manual pipeline
retry-job JOBID: Retry specific job
EXAMPLES
glab pipeline list --failed --branch main
glab pipeline view 42
glab pipeline rerun 123 --repo group/project
HISTORY
Part of glab CLI, first released in 2020 by GitLab Inc. as official tool inspired by GitHub's gh. Pipeline subcommands added in v1.0 (2021), with expansions like job retry in v1.18+. Actively maintained with GitLab releases.


