# 使用 Homebrew 安装 darker

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

## 安装

```sh
sudo av install brew:darker
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install darker
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:darker
- **软件包管理器:** Homebrew
- **版本:** 3.0.0
- **来源摘要:** Apply Black formatting only in regions changed since last commit
- **主页:** <https://github.com/akaihola/darker>
- **最后更新:** 2026-07-13T14:12:41Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- darker (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

Darker is a Python formatting tool that applies Black-style formatting only to regions changed between Git revisions or in a working tree.

### 项目历史

The README explains Darker as a response to a common adoption problem for Black: teams often want consistent formatting without one large repository-wide reformat. Darker compares revisions, formats with Black or another supported formatter, and writes back only the changed regions.

### 采用历史

Darker's official docs document installation from PyPI, conda-forge availability, editor integrations, pre-commit usage, and a GitHub Action. The changelog records early 2020 releases, a 1.0.0 release in July 2020, conda-forge availability in 1.2.2, support for plain directories in 1.4.0, and a 3.0.0 release that added Ruff formatter support while moving linting to Graylint.

### 使用方式

Users typically run darker on files or directories inside a Git repository, optionally selecting a revision range, showing a diff, or configuring behavior through pyproject.toml under tool.darker.

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

Darker matters to Python package maintainers because it is about incremental formatter adoption: it reduces formatting churn in old codebases while still letting projects standardize on tools such as Black, Ruff, isort, flynt, and pyupgrade.

### 时间线

- 2020: 0.1.0 and 1.0.0 were released.
- 2020: 1.2.2 added conda-forge availability.
- 2022: 1.4.0 added support for plain directories outside Git repositories.
- 2025: 3.0.0 added Ruff formatter support and changed default formatter dependencies.

### Related projects

- The README points to Black, Ruff, isort, flynt, pyupgrade, pytest-darker, Graylint, pre-commit, and the Darker GitHub Action as adjacent tools and integrations.

### 来源

- <https://github.com/akaihola/darker>
- <https://github.com/akaihola/darker/blob/master/CHANGES.rst>
- <https://github.com/akaihola/darker/releases>


## 安全说明

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: pyproject.toml

## Combined YAML source

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


## 来源

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