Help us improve
Share bugs, ideas, or general feedback.
From glab
GitLab CLI for merge requests, issues, CI/CD pipelines, repositories, and more. Use when working with GitLab to list/view MRs, check CI status, browse issues, or any GitLab API operation. Triggered by requests involving GitLab data, merge requests, CI pipelines, or GitLab project management.
npx claudepluginhub fprochazka/claude-code-plugins --plugin glabHow this skill is triggered — by the user, by Claude, or both
Slash command
/glab:glabThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Command-line interface for GitLab. Binary name: `glab`.
Reference GitLab CLI (glab) commands for authentication, issues, merge requests, pipelines, releases, repo management, labels, variables from terminal.
Guides glab CLI usage and GitLab workflows, adapting GitHub gh patterns to GitLab projects, merge requests, and CI/CD pipelines.
Guides using GitLab CLI (glab) to manage issues, merge requests, CI/CD pipelines, repositories, and other operations from the command line. For GitLab terminal workflows.
Share bugs, ideas, or general feedback.
Command-line interface for GitLab. Binary name: glab.
glab auto-detects the GitLab project from the git remote in the current directory. Override with --repo (-R):
glab mr list # auto-detected from git remote
glab mr list -R group/project # explicit project
glab mr list -R group/namespace/project
MR commands accept an MR IID number, a branch name, or nothing (current branch):
glab mr view 123 # by MR IID
glab mr view feature-x # by branch name
glab mr view # current branch's MR
When writing content to temp files (MR descriptions, job logs, etc.), use filenames unique to the MR or job — include the MR number, branch name, or job name as a slug (e.g., /tmp/mr-desc-123.md, /tmp/mr-desc-feature-auth.md, /tmp/glab-job-build-123.log).
Reuse the same file for the same MR/entity across multiple edits — the Write tool shows diffs, so the user can see exactly what changed between revisions.
Never use generic fixed filenames like /tmp/mr-description.md — they collide across different MRs.
glab mr create --fill --fill-commit-body --yes -b main --draft -a user1 --reviewer user2 -l bug
| Flag | Short | Description |
|---|---|---|
--title | -t | MR title |
--description | -d | Description ("-" opens editor) |
--fill | -f | Use commit info, auto-push branch |
--fill-commit-body | Include all commit bodies (with --fill) | |
--draft | Create as draft | |
--assignee | -a | Assign by username (comma-separated or repeated) |
--reviewer | Request review by username | |
--label | -l | Add labels |
--milestone | -m | Assign milestone |
--target-branch | -b | Target branch |
--source-branch | -s | Source branch (default: current) |
--push | Push branch before creating | |
--remove-source-branch | Remove source branch on merge | |
--squash-before-merge | Squash commits on merge | |
--related-issue | -i | Link to issue IID |
--copy-issue-labels | Copy labels from linked issue | |
--yes | -y | Skip confirmation prompt |
--web | -w | Continue in browser |
glab mr view --comments -F json
| Flag | Short | Description |
|---|---|---|
--comments | -c | Include comments and activities |
--system-logs | -s | Include system activities |
--output | -F | Format: text, json |
--web | -w | Open in browser |
--page | -p | Page number for comments |
--per-page | -P | Items per page (default 20) |
glab mr update 123 --title "New title" --description "New description" --ready -l bug --reviewer +user2
Assignee/reviewer prefix modifiers: + to add, ! or - to remove. No prefix replaces all.
| Flag | Short | Description |
|---|---|---|
--title | -t | MR title |
--description | -d | Description ("-" opens editor) |
--draft | Mark as draft | |
--ready | -r | Mark as ready |
--label | -l | Add labels |
--unlabel | -u | Remove labels |
--assignee | -a | Set assignees (+ add, ! remove, bare replaces all) |
--unassign | Remove all assignees | |
--reviewer | Set reviewers (+ add, ! remove, bare replaces all) | |
--milestone | -m | Set milestone ("" or 0 to unset) |
--target-branch | Change target branch | |
--remove-source-branch | Toggle remove source branch on merge | |
--squash-before-merge | Toggle squash on merge | |
--lock-discussion | Lock discussion | |
--unlock-discussion | Unlock discussion | |
--yes | -y | Skip confirmation |
glab mr note can add comments, but listing discussions and replying to threads requires the API.
glab mr note 123 -m "Looks good!"
| Flag | Short | Description |
|---|---|---|
--message | -m | Comment text |
--unique | Skip if identical comment already exists |
Discussions are threaded conversations. Each discussion has an id and contains notes.
glab api projects/:id/merge_requests/123/discussions --paginate
glab api -X POST projects/:id/merge_requests/123/discussions/<discussion_id>/notes \
-f body="Reply text"
glab api -X POST projects/:id/merge_requests/123/discussions \
-f body="Starting a new thread"
glab api -X PUT projects/:id/merge_requests/123/discussions/<discussion_id> \
-F resolved=true
glab ci status --compact
glab ci get --with-job-details -F json
| Command | Description |
|---|---|
glab ci status | Current branch pipeline status |
glab ci status --live | Real-time updates until done |
glab ci status --compact | Compact view |
glab ci get | Pipeline details with job list |
glab ci get --with-job-details | Extended job info |
glab ci get -F json | JSON output |
Always redirect job logs to a temp file — the output can be thousands of lines and will waste context tokens.
glab ci trace <job-name> > /tmp/glab-job-<job-name>-$(date +%s).log 2>&1
DO NOT run glab ci trace without redirecting to a file.
| Flag | Short | Description |
|---|---|---|
--branch | -b | Branch to search for the job |
--pipeline-id | -p | Pipeline ID to search for the job |
glab ci retry <job-name> # retry a failed job
glab ci trigger <job-name> # trigger a manual job
Direct GitLab API access for anything not covered by dedicated commands.
glab api projects/:id/members # GET (default)
glab api projects/:id/labels -f name=bug -f color=#FF0000 # POST (default when params present)
glab api -X PUT projects/:id -f name="new-name" # explicit method
--paginate fetches all pages sequentially. Without it, you only get the first page.
glab api projects/:id/issues --paginate --output ndjson | jq 'select(.state == "opened")'
Output formats:
json (default) — pretty-printed, arrays merged into a single JSON arrayndjson — one JSON object per line, memory-efficient, works with jqAuto-resolved from the git remote: :id, :fullpath, :group, :namespace, :repo, :branch, :user, :username
| Flag | Short | Description |
|---|---|---|
--raw-field | -f | String parameter |
--field | -F | Typed parameter (true/false/integers auto-converted, @file reads from file) |
--method | -X | HTTP method (default: GET without params, POST with) |
--paginate | Fetch all pages | |
--output | Format: json (default), ndjson | |
--header | -H | Additional HTTP header |
--hostname | Override GitLab host | |
--include | -i | Include response headers |
--input | Request body from file (- for stdin) | |
--silent | Don't print response body |
Discover flags with --help:
| Group | Description |
|---|---|
mr list, mr diff, mr merge, mr approve, mr rebase, mr checkout | MR management |
issue list, issue view, issue create, issue update, issue close | Issues |
ci list, ci run, ci lint, ci cancel | CI/CD pipelines |
job artifact | Download job artifacts |
repo view, repo list, repo clone | Repositories |
release list, release view, release create | Releases |
variable list, variable get, variable set | CI/CD variables |
schedule list, schedule create, schedule run | Pipeline schedules |
label list, label create | Labels |
milestone list, milestone create | Milestones |
glab-search-code <query> | Code search |
glab <command> --help
glab <command> <subcommand> --help