glab¶
Official gitlab cli client
Install¶
Configuration¶
Authentication:
Get a GitLab personal access token with
apiandwrite_repositoryscopes
export GITLAB_HOST=https://0xacab.org/
export GITLAB_TOKEN=$(gopass show --password token/0xacab.org/glab)
Usage¶
Merge requests¶
List all open MRs in group:
Show all merged MRs since a date:
glab mr list --merged -g GROUP --created-after 2026-09-13T12:00:00Z --output json | \
jq '.[] | {id: .id, title: .title, author: .author.name}'
CI¶
Access tokens¶
Personal access token¶
List active PATs:
List all PATs (including inactive ones):
Rotate PAT:
Project access token¶
List active project token:
Create project token:
Rotate project token with maximaum duration (365 days):
Snippets¶
Create new snippet: