glab for GitLab
glab is gh-equivalent for GitLab.
Usage
glab is the CLI for GitLab, equivalent to gh for GitHub. Engineers using GitLab benefit from CLI access to common operations; the discipline is using glab rather than the web UI for routine tasks.
What basic usage looks like:
- glab mr create.: Creating merge requests from the CLI. The command prompts for the relevant fields; opens the MR; the engineer continues working without browser context-switch.
- glab issue list.: Listing issues. Filter by state, label, assignee; the output is text; the engineer can pipe to other tools.
- Mirror gh's UX.: glab's interface intentionally mirrors gh. Engineers familiar with gh can use glab quickly; the cognitive overhead is low.
- Familiar if you've used gh.: The command structure, the option names, the workflow patterns are all similar. Learning glab is fast for gh users.
- Many subcommands.: glab covers many GitLab features. Pipelines, releases, packages, deployments all have CLI access; the team's GitLab interaction can be CLI-first.
Basic usage is fast. Engineers who use glab often benefit from learning it deeply.
Auth
Authentication is the first step. glab auth login authenticates to the GitLab instance; the engineer's credentials are stored; subsequent commands work.
- glab auth login authenticates to GitLab instance.: The login flow handles authentication. Browser-based or token-based; the engineer's choice; the result is authenticated CLI access.
- Self-hosted or gitlab.com.: glab works with both. Self-hosted GitLab instances have their own URL; gitlab.com is the default; the team configures which they use.
- Token-based for scripts.: Personal access tokens can be used for CLI authentication. Scripts and automation use tokens; the team's CI uses them; the discipline is similar to gh.
- Per-instance configuration.: Different instances can have different configurations. Engineers working with multiple GitLab instances configure each; glab handles the routing.
- Stored credentials.: Credentials are stored in the team's preferred location (keychain on macOS, credential manager on Windows, file on Linux). The discipline is similar to other tools.
Authentication is one-time setup. After authentication, glab is fast.
When
The when is straightforward. GitLab teams should use glab for CLI-doable tasks; falling back to web UI is slower for repeated work.
- GitLab teams.: Teams using GitLab as their VCS benefit from glab. The discipline is using the CLI for routine operations rather than the web UI.
- Don't fall back to web UI for CLI-doable tasks.: Listing MRs, creating MRs, viewing pipelines, reviewing CI logs all are CLI-doable. The web UI is fine for browsing; CLI is faster for known operations.
- Faster than browser.: The CLI is dramatically faster than the browser for known operations. No page load; no context-switch; the operation completes in seconds.
- Composable.: CLI output can be piped to other tools. The team's automation builds on glab; the discipline extends beyond interactive use.
- Document common workflows.: The team's runbooks reference glab commands. New engineers learn the team's patterns; the discipline is consistent.
glab for GitLab is one of those CLI tooling disciplines that pays off across many interactions. Nova AI Ops integrates with version control telemetry, surfaces patterns, and supports the team's CLI-first operations.