# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix, zypper 安装 gitlint

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

## 安装

```sh
sudo av install brew:gitlint
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install gitlint
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install gitlint
```

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

### Linux

- apk (92%):

```sh
sudo apk add gitlint
```

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

- Debian apt (92%):

```sh
sudo apt install gitlint
```

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

- dnf (92%):

```sh
sudo dnf install gitlint
```

  证据: Fedora Rawhide package metadata: gitlint 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#gitlint
```

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

- zypper (92%):

```sh
sudo zypper install python313-gitlint
```

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

## 软件包事实

- **软件包键:** brew:gitlint
- **软件包管理器:** Homebrew
- **版本:** 0.19.1
- **来源摘要:** Linting for your git commit messages
- **主页:** <https://jorisroovers.com/gitlint/>
- **最后更新:** 2026-07-13T10:51:56Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- gitlint (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

Gitlint is a Python command-line linter for Git commit messages. It gives teams a way to enforce subject length, body formatting, trailers, conventional-commit-like rules, and custom policies before commits or merge requests land.

### 项目历史

The GitHub repository was created in September 2015 and the PyPI package history begins with the 0.1.0 release. The project grew as a small but durable Git add-on with documentation, built-in rules, user-defined rules, hooks, and CI usage patterns.

The 0.14 and 0.15 releases marked the end of Python 2.7 and Python 3.5 support, while the 0.17 release split the package into gitlint and gitlint-core. The 0.19 release modernized build and test tooling, adopted Hatch and Ruff, and improved development builds.

### 采用历史

Gitlint's adoption sits in the commit-quality niche rather than the broader code-linting market. It is packaged on PyPI and in several system package managers, and it appeals to projects that treat commit history as a reviewable interface for releases, changelogs, and audit trails.

### 使用方式

Practitioners run gitlint against the commit message being written through a commit-msg hook, against selected commit ranges in CI, or through pre-commit. Configuration usually lives in .gitlint, with built-in rules tuned by project policy and custom Python rules added for organization-specific checks.

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

Gitlint is notable as a classic Python CLI packaged across PyPI, Homebrew, Linux distributions, and MacPorts. For package maintainers, its dependency-management changes and gitlint-core split show the pressure small developer tools face when they need to support both hook-time speed and system-package constraints.

### 时间线

- 2015: The jorisroovers/gitlint repository was created.
- 2020: The 0.14 and 0.15 release line ended Python 2.7 and Python 3.5 support.
- 2021: The 0.17 release split gitlint and gitlint-core.
- 2023: The 0.19 release modernized project tooling and CI.

### Related projects

- pre-commit is a common integration point for running gitlint before commits or in CI.
- Conventional Commits is an adjacent convention supported through gitlint contrib rules and configuration.

### 来源

- <https://formulae.brew.sh/formula/gitlint>
- <https://github.com/jorisroovers/gitlint>
- <https://jorisroovers.github.io/gitlint/>
- <https://pypi.org/pypi/gitlint/json>
- <https://raw.githubusercontent.com/jorisroovers/gitlint/main/CHANGELOG.md>
- <https://raw.githubusercontent.com/jorisroovers/gitlint/main/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.


## Configuration files

- Unix: .gitlint
## 其他软件包管理器记录

- Debian apt - gitlint - 0.19.1-6: normalized package name match | Debian stable package indexes: gitlint from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Git commit message linter | https://jorisroovers.com/gitlint/
- Nix - gitlint: normalized package name match | nixpkgs package indexes: pkgs/by-name/gi/gitlint/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - gitlint - 0.19.1-2: normalized package name match | Ubuntu 24.04 LTS package indexes: gitlint from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Git commit message linter | https://jorisroovers.com/gitlint/
- apk - gitlint - 0.19.1-r3: normalized package name match | Alpine Linux edge package indexes: gitlint from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Linting for your git commit messages | https://github.com/jorisroovers/gitlint
- apk - gitlint-pyc - 0.19.1-r3: normalized package name match | Alpine Linux edge package indexes: gitlint-pyc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Precompiled Python bytecode for gitlint | https://github.com/jorisroovers/gitlint
- dnf - gitlint - 0.19.1-3.fc45: normalized package name match | Fedora Rawhide package metadata: gitlint from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Git commit message linting tool | https://jorisroovers.github.io/gitlint
- zypper - python313-gitlint - 0.18.0-2.8: normalized package name match | openSUSE Tumbleweed package metadata: python313-gitlint from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Git commit message linter checking | https://github.com/jorisroovers/gitlint
- MacPorts - gitlint: normalized package name match | MacPorts ports tree: devel/gitlint/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/gitlint.yml](https://github.com/mxcl/pkgdb/blob/main/combined/gitlint.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
