glab is an open-source command line interface for GitLab, bringing merge requests, issues, CI/CD pipelines, and other GitLab features directly to your terminal. It streamlines GitLab workflows and integrates seamlessly with your development process.
Key Features
- Merge Requests - Create, review, approve, and merge from the terminal
- Issue Management - Create, list, and manage issues
- Pipeline Control - View, trigger, and monitor CI/CD pipelines
- Repository Operations - Clone, fork, and manage repositories
- Interactive Mode - User-friendly prompts for common actions
- Authentication - Secure token-based authentication
Core Commands
- MR Operations -
glab mr create
,glab mr view
,glab mr merge
- Issue Management -
glab issue create
,glab issue list
,glab issue close
- Pipeline Management -
glab pipeline list
,glab pipeline ci view
- Repository Actions -
glab repo clone
,glab repo fork
- Release Management -
glab release create
,glab release list
- CI/CD Jobs -
glab ci view
,glab ci trace
Common Use Cases
- Code Review - Review and approve merge requests without leaving terminal
- CI/CD Monitoring - Track pipeline status and job logs
- Issue Tracking - Quickly create and update issues during development
- Release Management - Automate release creation and deployment
- Repository Management - Clone and fork projects efficiently
- Automation - Script GitLab workflows in CI/CD or local scripts
Getting Started
# Install glab
brew install glab # macOS
# or download from https://gitlab.com/gitlab-org/cli
# Authenticate with GitLab
glab auth login
# Create a merge request
glab mr create --title "Feature: Add new component" --description "Implements feature X"
# List merge requests
glab mr list
# View pipeline status
glab pipeline ci view
# Create an issue
glab issue create --title "Bug: Fix login error"
# View CI job logs
glab ci trace
# Clone a repository
glab repo clone group/project
Why Choose glab?
glab excels when you need:
- Terminal Workflow - Stay in the terminal and avoid context switching
- Automation - Script GitLab operations in CI/CD pipelines
- Speed - Faster than web UI for common operations
- Integration - Seamlessly integrate with shell scripts and tools
- Productivity - Reduce clicks and improve development velocity
glab is essential for developers and DevOps engineers who prefer terminal-based workflows and want to streamline their GitLab interactions without sacrificing functionality.