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

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

## 安装

```sh
sudo av install brew:ruff
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install ruff
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install ruff
```

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

### Linux

- apk (92%):

```sh
sudo apk add ruff
```

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

- dnf (92%):

```sh
sudo dnf install ruff
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#ruff
```

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

- pacman (92%):

```sh
sudo pacman -S ruff
```

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

- zypper (92%):

```sh
sudo zypper install python313-ruff
```

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

### Windows

- Chocolatey (92%):

```sh
choco install ruff
```

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

- Scoop (92%):

```sh
scoop install main/ruff
```

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

- winget (92%):

```sh
winget install --id astral-sh.ruff -e
```

  证据: Windows Package Manager source index: astral-sh.ruff from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:ruff
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/ruff>
- **版本:** 0.16.1
- **来源摘要:** Extremely fast Python linter, written in Rust
- **主页:** <https://docs.astral.sh/ruff/>
- **仓库:** <https://github.com/astral-sh/ruff>
- **上游文档:** <https://docs.astral.sh/ruff/>
- **许可证:** MIT
- **源码归档:** <https://github.com/astral-sh/ruff/archive/refs/tags/0.16.1.tar.gz>
- **最后更新:** 2026-07-30T22:48:19Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- ruff (cli)
- ruff (别名)

## 构建依赖

- rust

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.16.1
- 管理器更新时间: 2026-07-30
- 本地数据: OK
- 上游仓库: https://github.com/astral-sh/ruff
- 检测到的最新版本: 0.16.1 (当前)

## 安全说明

没有找到 ruff 的匹配本地密钥处理 manifest。软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 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

- Unix: pyproject.toml, ruff.toml, .ruff.toml
- Windows: pyproject.toml, ruff.toml, .ruff.toml
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** ruff
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 其他软件包管理器记录

- Nix - ruff: normalized package name match | nixpkgs package indexes: pkgs/by-name/ru/ruff/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - py3-ruff - 0.15.22-r0: normalized package name match | Alpine Linux edge package indexes: py3-ruff from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Extremely fast Python linter | https://github.com/astral-sh/ruff
- apk - ruff - 0.15.22-r0: normalized package name match | Alpine Linux edge package indexes: ruff from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Extremely fast Python linter | https://github.com/astral-sh/ruff
- apk - ruff-bash-completion - 0.15.22-r0: normalized package name match | Alpine Linux edge package indexes: ruff-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Bash completions for ruff | https://github.com/astral-sh/ruff
- apk - ruff-fish-completion - 0.15.22-r0: normalized package name match | Alpine Linux edge package indexes: ruff-fish-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Fish completions for ruff | https://github.com/astral-sh/ruff
- apk - ruff-pyc - 0.15.22-r0: normalized package name match | Alpine Linux edge package indexes: ruff-pyc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Precompiled Python bytecode for ruff | https://github.com/astral-sh/ruff
- apk - ruff-zsh-completion - 0.15.22-r0: normalized package name match | Alpine Linux edge package indexes: ruff-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Zsh completions for ruff | https://github.com/astral-sh/ruff
- dnf - python3-ruff - 0.15.21-2.fc45: normalized package name match | Fedora Rawhide package metadata: python3-ruff from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Importable Python module for ruff | https://github.com/astral-sh/ruff
- dnf - ruff - 0.15.21-2.fc45: normalized package name match | Fedora Rawhide package metadata: ruff from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Extremely fast Python linter and code formatter | https://github.com/astral-sh/ruff
- pacman - ruff - 0.16.1-1: normalized package name match | Arch Linux sync databases: ruff from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | An extremely fast Python linter, written in Rust | https://github.com/astral-sh/ruff
- zypper - python313-ruff - 0.16.1-1.1: normalized package name match | openSUSE Tumbleweed package metadata: python313-ruff from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | An extremely fast Python linter, written in Rust | https://github.com/astral-sh/ruff
- zypper - python314-ruff - 0.16.1-1.1: normalized package name match | openSUSE Tumbleweed package metadata: python314-ruff from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | An extremely fast Python linter, written in Rust | https://github.com/astral-sh/ruff
- MacPorts - ruff: normalized package name match | MacPorts ports tree: devel/ruff/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - ruff: normalized package name match | Chocolatey community package catalog: ruff from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='9.151999','cports'
- Scoop - main/ruff: normalized package name match | Scoop official bucket manifest trees: bucket/ruff.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - astral-sh.ruff: normalized package name match | Windows Package Manager source index: astral-sh.ruff from https://cdn.winget.microsoft.com/cache/source.msix


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://pkg.so/zh-hans/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [rust](https://pkg.so/zh-hans/brew/rust/) - Build dependency declared by Homebrew.
- [rumdl](https://pkg.so/zh-hans/brew/rumdl/) - Shares pkgdb curated category or tags: cli, developer-tools, linter, rust.
- [python-lsp-server](https://pkg.so/zh-hans/brew/python-lsp-server/) - Shares pkgdb curated category or tags: cli, developer-tools, python, static-analysis.
- [pipx](https://pkg.so/zh-hans/brew/pipx/) - Shares pkgdb curated category or tags: cli, developer-tools, python.
- [poetry](https://pkg.so/zh-hans/brew/poetry/) - Shares pkgdb curated category or tags: cli, developer-tools, python.
- [pyenv-virtualenv](https://pkg.so/zh-hans/brew/pyenv-virtualenv/) - Shares pkgdb curated category or tags: cli, developer-tools, python.
- [pytest](https://pkg.so/zh-hans/brew/pytest/) - Shares pkgdb curated category or tags: cli, developer-tools, python.
- [basedpyright](https://pkg.so/zh-hans/brew/basedpyright/) - Shares pkgdb curated category or tags: cli, developer-tools, python, static-analysis.
- [pylint](https://pkg.so/zh-hans/brew/pylint/) - Shares pkgdb curated category or tags: cli, developer-tools, linter, python, static-analysis.
- [ty](https://pkg.so/zh-hans/brew/ty/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, developer, developer-tools, extremely, fast.
- [uv](https://pkg.so/zh-hans/brew/uv/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, developer, developer-tools, extremely, fast.
- [dotenv-linter](https://pkg.so/zh-hans/brew/dotenv-linter/) - Both packages touch the same language runtime or ecosystem. Shared terms: analysis, cli, developer, developer-tools, fast.

## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
