# 使用 Homebrew, Nix 安装 snakefmt

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

## 安装

```sh
sudo av install brew:snakefmt
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install snakefmt
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#snakefmt
```

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

## 软件包事实

- **软件包键:** brew:snakefmt
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/snakefmt>
- **版本:** 2.0.3
- **来源摘要:** Snakemake code formatter
- **主页:** <https://github.com/snakemake/snakefmt/>
- **仓库:** <https://github.com/snakemake/snakefmt>
- **上游文档:** <https://github.com/snakemake/snakefmt/>
- **许可证:** MIT
- **源码归档:** <https://files.pythonhosted.org/packages/da/9b/c3dce69468a32d9b2dd9366c41c472b59ecafa28971761e8620466fb288f/snakefmt-2.0.3.tar.gz>
- **最后更新:** 2026-06-27T05:29:21Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- snakefmt (cli)
- snakefmt (别名)

## 依赖

- python@3.14

## 构建依赖

- rust

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 2.0.3
- 管理器更新时间: 2026-06-27
- 本地数据: OK
- 上游仓库: https://github.com/snakemake/snakefmt
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

snakefmt is the Snakemake code formatter, modeled culturally on opinionated formatters such as Black while targeting Snakefiles and Snakemake-specific syntax.

### 项目历史

The official GitHub repository was created in February 2020 and v0.1.0 was published in June 2020. The project metadata and README describe it as the uncompromising Snakemake code formatter.

### 采用历史

snakefmt is distributed through Homebrew and Nix in the supplied package metadata and supports pre-commit integration from its official README, making it easy to add to package and repository hygiene workflows.

### 使用方式

Users run snakefmt against Snakefiles or directories. By default it searches parent directories for pyproject.toml and reads snakefmt and Black configuration from that file; command-line options override config values.

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

snakefmt matters to package and workflow maintainers because it standardizes Snakemake formatting, can run in pre-commit, and reduces noisy diffs in scientific workflow repositories.

### 时间线

- 2020: Official GitHub repository created.
- 2020: v0.1.0 published on GitHub releases.
- 2026: Project metadata lists snakefmt 2.x and a Python 3.11+ requirement.

### Related projects

- Snakemake
- Black
- shfmt
- pre-commit

### 来源

- <https://api.github.com/repos/snakemake/snakefmt>
- <https://api.github.com/repos/snakemake/snakefmt/releases>
- <https://github.com/snakemake/snakefmt>
- <https://github.com/snakemake/snakefmt/blob/master/pyproject.toml>
- input source_facts.package-manager


## 安全说明

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
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** snakefmt
- **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 - snakefmt: normalized package name match | nixpkgs package indexes: pkgs/by-name/sn/snakefmt/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [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.
- [python@3.14](https://pkg.so/zh-hans/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [rust](https://pkg.so/zh-hans/brew/rust/) - Build dependency declared by Homebrew.
- [black](https://pkg.so/zh-hans/brew/black/) - Shares pkgdb curated category or tags: cli, code-style, developer-tools, formatter, python.
- [pgformatter](https://pkg.so/zh-hans/brew/pgformatter/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter.
- [rubyfmt](https://pkg.so/zh-hans/brew/rubyfmt/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter.
- [yapf](https://pkg.so/zh-hans/brew/yapf/) - Shares pkgdb curated category or tags: cli, code-style, developer-tools, formatter, python.
- [jsonpp](https://pkg.so/zh-hans/brew/jsonpp/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter.
- [sql-formatter](https://pkg.so/zh-hans/brew/sql-formatter/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter.
- [gersemi](https://pkg.so/zh-hans/brew/gersemi/) - Shares pkgdb curated category or tags: cli, code-style, developer-tools, formatter, python.
- [odinfmt](https://pkg.so/zh-hans/brew/odinfmt/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter.
- [autopep8](https://pkg.so/zh-hans/brew/autopep8/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, code, developer, developer-tools, formatter.

## Combined YAML source

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


## 来源

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