CI/CD
GitLab CLI
GitLab CLI commands for repository and CI/CD management.
32 commands
Windows
MacOS
Linux
#automation
#gitlab
Authentication
Authenticate with GitLab
glab auth login
Login to self-hosted instance
glab auth login --hostname gitlab.example.com
Check authentication status
glab auth status
Set default editor
glab config set editor vim
Merge Requests
Create MR with branch info auto-filled
glab mr create --fill
List open merge requests
glab mr list
View merge request details
glab mr view 42
Check out MR branch locally
glab mr checkout 42
Merge a merge request
glab mr merge 42
Approve a merge request
glab mr approve 42
Close a merge request
glab mr close 42
Show merge request diff
glab mr diff 42
Pipelines
Show current pipeline status
glab ci status
List recent pipelines
glab ci list
View pipeline in browser
glab ci view
Trigger a new pipeline
glab ci run
Trace a running job
glab ci trace
Retry failed pipeline jobs
glab ci retry
CI/CD
Validate .gitlab-ci.yml
glab ci lint
List project CI/CD variables
glab variable list
Set a CI/CD variable
glab variable set MY_VAR value
Delete a CI/CD variable
glab variable delete MY_VAR
Download job artifacts
glab ci artifact download 12345
Repository
Clone a repository
glab repo clone group/project
Fork a repository
glab repo fork group/project
List open issues
glab issue list
Create an issue
glab issue create --title "Bug fix" --description "Details"
Create a new release
glab release create v1.0.0
Open repository in browser
glab repo view --web
Quick Commands
Create a merge request with auto-filled info
glab mr create --fill
Show current pipeline status
glab ci status
Validate the GitLab CI configuration file
glab ci lint