# 使用 Homebrew 安装 sqlfmt

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

## 安装

```sh
sudo av install brew:sqlfmt
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install sqlfmt
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:sqlfmt
- **软件包管理器:** Homebrew
- **版本:** 0.5.0
- **来源摘要:** SQL formatter with width-aware output
- **主页:** <https://sqlfum.pt/>
- **仓库:** <https://github.com/madelynnblue/sqlfmt>
- **最后更新:** 2026-07-26T04:03:45+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- sqlfmt (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

sqlfmt is a command-line SQL formatter focused on width-aware output. In package-manager culture it fits the formatter niche: a small tool installed by name and wired into editor, CI, or pre-commit workflows to make SQL diffs less noisy.

### 项目历史

The public repository describes sqlfmt as a SQL formatter with width-aware output and says its formatting model is based on Philip Wadler's pretty-printing work. The first GitHub release, v0.1.0, was published as an initial binary release in October 2018.

Later releases kept the tool packaged as standalone binaries. Version 0.5.0, published in March 2023, switched to the CockroachDB parser package according to the project's release notes.

### 采用历史

Homebrew packages sqlfmt as the `sqlfmt` formula, making it available through the same install path used for other formatter CLIs. GitHub repository metadata also shows a modest open-source audience through stars, forks, and releases.

### 使用方式

The tool is used as `sqlfmt` to reformat SQL text. Its value is strongest in repositories where SQL lives beside application code and maintainers want predictable wrapping and casing without manually adjusting query text.

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

Package nerds care about sqlfmt because it is a narrowly scoped formatter with prebuilt release artifacts and a Homebrew formula: the classic shape of a small CLI that becomes useful once it is easy to install everywhere.

### 时间线

- 2018: v0.1.0 published as the initial binary release.
- 2019: v0.4.0 release notes mention adding case-mode support to the CLI.
- 2023: v0.5.0 release notes mention moving to the CockroachDB parser package.

### Related projects

- The project README cites Wadler-style pretty printing as an influence.
- The v0.5.0 release notes cite CockroachDB's parser package as the parser dependency.

### 来源

- <https://api.github.com/repos/madelynnblue/sqlfmt/releases - official GitHub release dates and release notes.>
- <https://github.com/madelynnblue/sqlfmt - official repository README, release metadata, and project description.>
- source_facts.package-manager.brew - Homebrew formula name supplied in input.


## 安全说明

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

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


## Combined YAML source

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


## 来源

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