# 使用 Homebrew, apk, chocolatey, apt, dnf, MacPorts, Nix, pacman, zypper, scoop, winget 安装 glab

查看 glab 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:glab
```

## 代理安全回答

glab controls GitLab repositories, pipelines, releases, and authenticated project state.

- **凭据访问:** Reads GitLab tokens, config, and repository credentials.
- **远程变更:** Can create releases, merge requests, issues, pipelines, and repo changes.
- **发布/制品风险:** Can upload release assets and trigger CI/CD.
- **推荐控制:** Gate token output, release, pipeline, and write commands.
- **代理使用指南:** Allow read-only queries; require approval for releases, pipeline triggers, and project writes.

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install glab
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install glab
```

  证据: MacPorts ports tree: devel/glab/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add glab
```

  证据: Alpine Linux edge package indexes: glab from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install glab
```

  证据: Debian stable package indexes: glab from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install glab
```

  证据: Fedora Rawhide package metadata: glab from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#glab
```

  证据: nixpkgs package indexes: pkgs/by-name/gl/glab/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S glab
```

  证据: Arch Linux sync databases: glab from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install glab
```

  证据: openSUSE Tumbleweed package metadata: glab from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

### Windows

- Chocolatey (92%):

```sh
choco install glab
```

  证据: Chocolatey community package catalog: glab from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','gitextensions'

- Scoop (92%):

```sh
scoop install main/glab
```

  证据: Scoop official bucket manifest trees: bucket/glab.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id GLab.GLab -e
```

  证据: Windows Package Manager source index: GLab.GLab from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:glab
- **软件包管理器:** Homebrew
- **版本:** 1.111.0
- **来源摘要:** Open-source GitLab command-line tool
- **主页:** <https://gitlab.com/gitlab-org/cli>
- **最后更新:** 2026-07-30T22:47:44Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- glab (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.111.0
## 项目历史与用法

GLab is the open-source GitLab command-line interface. It brings GitLab issues, merge requests, CI/CD pipelines, jobs, releases, repository operations, authentication, API access, and related DevOps tasks into the terminal beside Git.

### 项目历史

GLab began as a community project by Clement Sam. GitLab's adoption announcement says he started work more than two years before December 2022 to make his workflow easier and avoid switching among browser tabs, IDE, and terminal.

The original profclems/glab GitHub repository was created in 2020 and gathered a community before GitLab adopted it. GitLab's announcement says more than 80 contributors had built on the tool before adoption, adding commands for merge requests, issues, pipelines, and more.

GitLab adopted the project in 2022 and moved it into gitlab-org/cli as the foundation of GitLab's native CLI experience. The transition included migrating project infrastructure, adapting GitHub Actions work to GitLab CI, reviewing security, and updating distribution methods to point to the new repository.

### 采用历史

GLab's adoption is tied directly to GitLab's broader editor and terminal strategy. GitLab's announcement frames the CLI as another way to integrate GitLab with tools developers already use, following its earlier adoption of GitLab Workflow for VS Code.

The official README documents support for GitLab.com, GitLab Dedicated, and GitLab Self-Managed, with multiple authenticated GitLab instances and automatic host detection from Git remotes. Package metadata in this batch shows GLab in Homebrew, Chocolatey, Debian, Fedora, MacPorts, Nix, Arch, Scoop, Ubuntu, Winget, openSUSE, and Alpine.

### 使用方式

Practitioners use glab to stay in the terminal while listing and creating issues, opening and reviewing merge requests, checking pipelines, retrying jobs, creating releases and changelogs, managing labels and milestones, calling the GitLab API, and configuring authentication.

The README shows a command structure of glab command subcommand flags and examples such as listing merge requests assigned to the user, approving a merge request, and creating an issue with milestone, title, and label. Authentication can use OAuth, personal access tokens, CI job tokens, and host-specific configuration.

### 为什么软件包爱好者会关心

GLab matters to package maintainers because it is the GitLab-side counterpart to the habit of doing forge work from a shell. It turns GitLab from a browser destination into a scriptable CLI surface for local development and CI contexts.

Its history also shows a common open-source lifecycle: a community tool proved demand, then the platform vendor adopted it, moved distribution, and expanded support for enterprise and self-managed installations.

### 时间线

- 2020: The original profclems/glab repository is created on GitHub.
- 2022: GitLab adopts glab and announces it as the foundation of GitLab's native CLI experience.
- 2022: GitLab moves the project toward gitlab-org/cli and updates distribution methods.
- 2023: GitLab CLI v1.29.1 appears in the GitLab releases feed after the adoption.
- 2026: The GitLab-hosted repository and docs describe broad command coverage for issues, merge requests, CI/CD, releases, APIs, authentication, and GitLab instances.

### Related projects

- GitLab is the forge and DevSecOps platform targeted by GLab.
- Git provides the local repository context used for host detection and developer workflows.
- GitLab Workflow for VS Code is cited by GitLab as a related integration effort.
- 1Password Shell Plugins are documented by GitLab as an authentication integration.

### 来源

- <https://about.gitlab.com/blog/introducing-the-gitlab-cli/>
- <https://api.github.com/repos/profclems/glab>
- <https://docs.gitlab.com/cli>
- <https://gitlab.com/api/v4/projects/gitlab-org%2Fcli>
- <https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com/-/raw/main/content/en-us/blog/introducing-the-gitlab-cli.md>
- <https://gitlab.com/gitlab-org/cli>
- <https://gitlab.com/gitlab-org/cli/-/raw/main/README.md>


## 安全说明

没有找到 glab 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- macOS: ~/Library/Application Support/glab-cli/config.yml
- Unix: $XDG_CONFIG_HOME/glab-cli/config.yml, ~/.config/glab-cli/config.yml

## Credential files

- macOS: ~/Library/Application Support/glab-cli/config.yml
- Unix: $XDG_CONFIG_HOME/glab-cli/config.yml, ~/.config/glab-cli/config.yml
## 其他软件包管理器记录

- Debian apt - glab - 1.53.0-1+b3: normalized package name match | Debian stable package indexes: glab from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | commandline interface for gitlab instances | https://gitlab.com/gitlab-org/cli
- Nix - glab: normalized package name match | nixpkgs package indexes: pkgs/by-name/gl/glab/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - glab - 1.36.0-1: normalized package name match | Ubuntu 24.04 LTS package indexes: glab from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | commandline interface for gitlab instances | https://gitlab.com/gitlab-org/cli
- apk - glab - 1.103.0-r1: normalized package name match | Alpine Linux edge package indexes: glab from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Open source GitLab CLI tool written in Go | https://gitlab.com/gitlab-org/cli
- apk - glab-bash-completion - 1.103.0-r1: normalized package name match | Alpine Linux edge package indexes: glab-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Bash completions for glab | https://gitlab.com/gitlab-org/cli
- apk - glab-doc - 1.103.0-r1: normalized package name match | Alpine Linux edge package indexes: glab-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Open source GitLab CLI tool written in Go (documentation) | https://gitlab.com/gitlab-org/cli
- apk - glab-fish-completion - 1.103.0-r1: normalized package name match | Alpine Linux edge package indexes: glab-fish-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Fish completions for glab | https://gitlab.com/gitlab-org/cli
- apk - glab-zsh-completion - 1.103.0-r1: normalized package name match | Alpine Linux edge package indexes: glab-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Zsh completions for glab | https://gitlab.com/gitlab-org/cli
- dnf - glab - 1.109.0-1.fc45: normalized package name match | Fedora Rawhide package metadata: glab from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | A GitLab CLI tool bringing GitLab to your command line | https://gitlab.com/gitlab-org/cli
- pacman - glab - 1.111.0-1: normalized package name match | Arch Linux sync databases: glab from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Cli tool to help work seamlessly with GitLab from the command line | https://gitlab.com/gitlab-org/cli
- zypper - glab - 1.111.0-1.1: normalized package name match | openSUSE Tumbleweed package metadata: glab from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | A GitLab command line tool | https://gitlab.com/gitlab-org/cli
- zypper - glab-bash-completion - 1.111.0-1.1: normalized package name match | openSUSE Tumbleweed package metadata: glab-bash-completion from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Bash completion for glab | https://gitlab.com/gitlab-org/cli
- zypper - glab-doc - 1.111.0-1.1: normalized package name match | openSUSE Tumbleweed package metadata: glab-doc from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Documentation for GLab | https://gitlab.com/gitlab-org/cli
- zypper - glab-fish-completion - 1.111.0-1.1: normalized package name match | openSUSE Tumbleweed package metadata: glab-fish-completion from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Fish completion for glab | https://gitlab.com/gitlab-org/cli
- zypper - glab-zsh-completion - 1.111.0-1.1: normalized package name match | openSUSE Tumbleweed package metadata: glab-zsh-completion from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Zsh completion for glab | https://gitlab.com/gitlab-org/cli
- MacPorts - glab: normalized package name match | MacPorts ports tree: devel/glab/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/glab.yml](https://github.com/mxcl/pkgdb/blob/main/combined/glab.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
- curated agent safety answer
