Official GitLab CLI for merge requests, issues, pipelines, releases, and API calls.
$brew install glab
Agent Compatibility
JSON Output
Agent Skill
MCP Support
AI Analysis
glab is GitLab's official CLI for working with GitLab projects and account resources from the shell. It covers merge requests and issues, CI/CD, releases, repo operations, tokens and keys, and raw API access across GitLab.com and self-managed instances.
What It Enables
- List, review, create, approve, merge, and comment on merge requests and issues without leaving the terminal.
- Inspect and change pipelines, jobs, schedules, releases, variables, runners, and project metadata, or fall back to
glab apifor direct REST and GraphQL calls. - Authenticate against GitLab.com or self-managed instances and run the same workflows in local scripts or CI with personal tokens or job tokens.
Agent Fit
- Many read paths expose
--output json, andglab apiaddsjsonandndjson, so follow-up parsing with shell tools is straightforward. - The command surface is broad enough for inspect, change, and verify loops across merge requests, issues, pipelines, releases, and repository metadata from one CLI.
- It can also expose a stdio MCP server with
glab mcp serve, but that path is explicitly experimental and secondary to the CLI itself.
Caveats
- Useful automation still depends on GitLab credentials and often repository context; browser login and prompts are the default unless you switch to token-based auth or disable prompts.
glab mcpis documented as experimental and not ready for production use.