# 使用 Homebrew, Nix 安装 gitlab-ci-linter

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

## 安装

```sh
sudo av install brew:gitlab-ci-linter
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install gitlab-ci-linter
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#gitlab-ci-linter
```

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

## 软件包事实

- **软件包键:** brew:gitlab-ci-linter
- **软件包管理器:** Homebrew
- **版本:** 2.4.0
- **来源摘要:** Command-line tool to lint GitLab CI YAML files
- **主页:** <https://gitlab.com/orobardet/gitlab-ci-linter>
- **最后更新:** 2026-07-29T16:05:02+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- gitlab-ci-linter (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

gitlab-ci-linter is a small Go command-line tool that validates a local `.gitlab-ci.yml` file by calling a GitLab instance's CI lint API. It is designed to catch invalid GitLab CI configuration before a developer commits or pushes changes.

### 项目历史

The GitLab project was created in March 2017. Its README makes the architectural boundary explicit: the tool does not implement its own GitLab CI linter, but delegates validation to the GitLab API that belongs to the target project.

The project adapted to GitLab API evolution after the older `/ci/lint` endpoint was deprecated in GitLab 15.7 and removed in GitLab 16.0; the README documents use of the `projects/:project_path_or_id/ci/lint` endpoint and project path or project ID options.

### 采用历史

Adoption appears specialized: the GitLab project metadata collected for this enrichment reported 53 stars. Its practical audience is teams that want local or pre-commit validation against gitlab.com or a private GitLab instance rather than waiting for a failed pipeline.

### 使用方式

Practitioners run `gitlab-ci-linter` from inside a Git repository with a GitLab origin and a `.gitlab-ci.yml` file. The README documents installation as a Git pre-commit hook, optional use through the `pre-commit` framework, explicit GitLab URL and project options, and authentication through a personal access token or `.netrc` account field.

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

For package-manager users, gitlab-ci-linter is a classic sharp-edged CLI: a cross-platform binary, a narrow API-backed job, and enough configuration to work with self-hosted GitLab. It fills the gap between static YAML syntax checks and a real GitLab CI validation request.

### 时间线

- 2017: GitLab project created.
- 2017: README documented local `.gitlab-ci.yml` validation through GitLab's lint API.
- 2022: GitLab 15.7 deprecated the older `/ci/lint` endpoint.
- 2023: GitLab 16.0 removed the older endpoint, leading the tool's documented flow to use the project-scoped lint endpoint.

### Related projects

- Related projects and services include GitLab CI, GitLab's CI lint API, the `pre-commit` framework, Cloudsmith packages, and Docker-based CLI distribution.

### 来源

- <https://docs.gitlab.com/ee/api/lint.html>
- <https://formulae.brew.sh/formula/gitlab-ci-linter>
- <https://gitlab.com/api/v4/projects/orobardet%2Fgitlab-ci-linter>
- <https://gitlab.com/orobardet/gitlab-ci-linter>
- <https://gitlab.com/orobardet/gitlab-ci-linter/-/raw/master/README.md>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## 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.


## Credential files

- Unix: ~/.netrc
- Windows: ~/_netrc
## 其他软件包管理器记录

- Nix - gitlab-ci-linter: normalized package name match | nixpkgs package indexes: pkgs/by-name/gi/gitlab-ci-linter/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/gitlab-ci-linter.yml](https://github.com/mxcl/pkgdb/blob/main/combined/gitlab-ci-linter.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
