GitLab Integration

GitLab Integration

Seamlessly work with GitLab Merge Requests and Issues directly from wt.

Platform Detection

wt automatically detects your platform from the git remote URL. If the remote contains gitlab, it uses GitLab mode. Otherwise, it defaults to GitHub.

bash
# Auto-detected from remote URL
git remote get-url origin
# gitlab.com/user/repo  -> GitLab mode (glab)
# github.com/user/repo  -> GitHub mode (gh)

# Override with environment variable
WT_PLATFORM=gitlab wt
WT_PLATFORM=github wt

Self-hosted GitLab

For self-hosted instances, any remote URL containing gitlab is detected automatically. You can also set WT_PLATFORM=gitlab in your shell profile.

Setup

GitLab integration requires the GitLab CLI (glab). Install and authenticate:

bash
# Install glab (macOS)
brew install glab

# Authenticate
glab auth login

Run wt --setup to verify glab is properly configured. If glab is not authenticated, wt will offer to set it up for you.

Merge Requests

Access MRs via Ctrl+P or select "Review a MR" from the create menu. The interface is identical to the GitHub PR workflow but uses GitLab terminology and commands.

+------------------------------------------------------------+
| Open MRs | Enter: select | Ctrl+O: open in browser         |
+------------------------------------------------------------+
| > #142  [ok]     feat: add dark mode            @john      |
|   #140  [fail]   fix: memory leak               @jane      |
|   #138  [..]     chore: update deps             @bob       |
|   #135  [--]     docs: update readme            @alice     |
|   #133  [draft]  wip: new feature               @dave      |
+------------------------------------------------------------+

CI Status Indicators

CI status is read from the GitLab pipeline attached to the MR:

[ok]

Pipeline passed

All pipeline jobs succeeded

[fail]

Pipeline failed

One or more jobs failed

[..]

Pipeline running

Jobs are still in progress

[--]

No pipeline

No CI configured for this MR

Differences from GitHub

FeatureGitHubGitLab
TerminologyPull Request (PR)Merge Request (MR)
CLIghglab
Review statusShown (approved / changes requested)Not available via CLI
Diff statsgh pr diff --statgit diff --stat (fallback)
CI commandsgh run list/viewglab ci list/view

Issues

Access issues via Ctrl+G or select "From an issue" from the create menu. Works the same as with GitHub.

+------------------------------------------------------------+
| Open Issues | Enter: select | Ctrl+O: open in browser      |
+------------------------------------------------------------+
| > #7   Add dark mode support                    @john      |
|   #5   Fix memory leak in parser                @jane      |
|   #3   Update documentation                     @bob       |
+------------------------------------------------------------+

Browser Integration

Press Ctrl+O to open in browser

When viewing MRs or issues, press Ctrl+O to open the selected item in your default browser on GitLab.

Tips

*

Same workflow: The keyboard shortcuts and UI are identical for GitHub and GitLab. Only the underlying CLI commands differ.

*

Claude prompts: Claude prompts are automatically adapted to use glab commands instead of gh when working with GitLab repos.

*

glab auth: If you're not authenticated with glab, wt will offer to set it up when you try to access MR or issue features.