All skills
Skillintermediate
glab Quick Reference Guide
A condensed reference for the most commonly used GitLab CLI commands.
Claude Code Knowledge Pack7/10/2026
Overview
glab Quick Reference Guide
A condensed reference for the most commonly used GitLab CLI commands.
Authentication
glab auth login # Interactive login
glab auth status # Check auth status
echo "token" | glab auth login --stdin # Login with token
Merge Requests
# Listing
glab mr list # All open MRs
glab mr list --assignee=@me # MRs assigned to me
glab mr list --reviewer=@me # MRs for me to review
# Creating
glab mr create # Interactive creation
glab mr create --title "Fix" --description "Desc"
glab mr create --draft # Create draft MR
glab mr create --reviewer=alice,bob
# Viewing & Managing
glab mr view 123 # View MR #123
glab mr checkout 123 # Checkout MR branch
glab mr approve 123 # Approve MR
glab mr merge 123 # Merge MR
glab mr note 123 -m "Comment" # Add comment
Issues
# Listing
glab issue list # All issues
glab issue list --assignee=@me # Assigned to me
glab issue list --label=bug # With label
# Creating & Managing
glab issue create # Interactive
glab issue create --title "Bug" --label=bug
glab issue view 456 # View issue
glab issue close 456 # Close issue
CI/CD
# Pipelines
glab pipeline ci view # Watch pipeline
glab ci list # List pipelines
glab ci status # Pipeline status
glab ci trace # View logs
# Running & Managing
glab ci run # Trigger pipeline
glab ci lint # Lint .gitlab-ci.yml
glab ci retry # Retry pipeline
glab ci cancel # Cancel pipeline
Repository
glab repo clone org/project # Clone repository
glab repo view # View repo details
glab repo fork # Fork repository
API
glab api projects/:id/merge_requests # GET request
glab api --method POST projects/:id/issues \\
--field title="Bug" # POST with data
Common Flags
--help, -h # Show help
--repo, -R owner/repo # Specify repository
--web, -w # Open in browser
--output, -o json # JSON output
--verbose # Verbose output
Environment Variables
GITLAB_TOKEN=xxx # API token
GITLAB_HOST=gitlab.example.org # Self-hosted GitLab
Configuration
glab config get # View configuration
glab config set key value # Set config value
Complete Command List
glab alias- Create command shortcutsglab api- Make API callsglab auth- Authentication managementglab changelog- Generate changelogsglab check-update- Check for updatesglab ci- CI/CD operationsglab cluster- Kubernetes cluster managementglab completion- Shell completionglab config- Configuration managementglab deploy-key- Deploy key managementglab duo- GitLab Duo AI featuresglab incident- Incident managementglab issue- Issue trackingglab iteration- Iteration managementglab job- CI job operationsglab label- Label managementglab mr- Merge request operationsglab opentofu- OpenTofu integrationglab release- Release managementglab repo- Repository operationsglab schedule- Pipeline schedule managementglab securefile- Secure file managementglab snippet- Snippet operationsglab ssh-key- SSH key managementglab stack- Stack managementglab token- Access token managementglab user- User operationsglab variable- CI/CD variable managementglab version- Show version
Tips
- Use
glab <command> --helpfor detailed help - Commands auto-detect repository context from git remote
- Use
-R owner/repowhen outside a repository - Most commands have
--webflag to open in browser - Use
--output=jsonfor scripting - Enable completion:
glab completion --shell bash