# 使用 Homebrew, apk, Nix, scoop 安装 sqruff

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

## 安装

```sh
sudo av install brew:sqruff
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install sqruff
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add sqruff
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#sqruff
```

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

### Windows

- Scoop (92%):

```sh
scoop install main/sqruff
```

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

## 软件包事实

- **软件包键:** brew:sqruff
- **软件包管理器:** Homebrew
- **版本:** 0.39.0
- **来源摘要:** Fast SQL formatter/linter
- **主页:** <https://github.com/quarylabs/sqruff>
- **仓库:** <https://github.com/quarylabs/sqruff>
- **最后更新:** 2026-07-03T15:51:03Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- sqruff (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

sqruff is a Rust-written SQL linter and formatter packaged as a fast, portable developer CLI.

### 项目历史

The official sqruff README describes the project as a SQL linter and formatter written in Rust, with configurable linting, automated formatting, speed, and portability as core goals. Official repository metadata places public development in 2023.

The official README presents a package-manager-first quickstart for macOS with brew install sqruff, plus documentation for pip, cargo, and binary downloads. Release pages show continued fast iteration with tagged releases through the 0.3x series.

### 采用历史

The supplied package-manager facts show sqruff available through Homebrew, Alpine, Nix, and Scoop. That cross-platform packaging matches the README's portability pitch and makes the tool suitable for local editors, pre-commit hooks, and CI lint jobs.

### 使用方式

The README's basic workflow is to install sqruff, run sqruff lint with a SQL dialect such as postgres, and optionally create a .sqruff file in the project root so subsequent lint runs can infer configuration.

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

Package nerds care about sqruff because SQL formatting and linting often sit in awkward dependency territory between data teams, Python tools, Rust binaries, and editor integrations. sqruff's appeal is that the formatter/linter can be shipped as one fast CLI across package managers.

### 时间线

- 2023: Official repository metadata reports public repository creation.
- 2024: GitHub issue history shows users configuring .sqruff in project roots for editor and SQL dialect workflows.
- 2026: Release page shows active 0.3x releases with downloadable assets.

### Related projects

- The official documentation connects sqruff to SQL dialect workflows, editor/CI usage, and Quary's hosted playground and docs.

### 来源

- <https://github.com/quarylabs/sqruff>
- <https://github.com/quarylabs/sqruff/releases>
- <https://playground.quary.dev/docs>
- source_facts.package-manager


## 安全说明

broad file, network, media, or database tool signal.

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal


## 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: .sqruff
## 其他软件包管理器记录

- Nix - sqruff: normalized package name match | nixpkgs package indexes: pkgs/by-name/sq/sqruff/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - sqruff - 0.38.0-r0: normalized package name match | Alpine Linux edge package indexes: sqruff from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Fast SQL formatter/linter | https://playground.quary.dev/
- apk - sqruff-doc - 0.38.0-r0: normalized package name match | Alpine Linux edge package indexes: sqruff-doc from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Fast SQL formatter/linter (documentation) | https://playground.quary.dev/
- Scoop - main/sqruff: normalized package name match | Scoop official bucket manifest trees: bucket/sqruff.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Combined YAML source

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