# Install sqlfmt with Homebrew

SQL formatter with width-aware output. Version 0.5.0 via Homebrew; verified 2026-07-26.

## Install

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

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install sqlfmt
```

  Evidence: local Homebrew formula metadata

## Package facts

- **Package key:** brew:sqlfmt
- **Package manager:** Homebrew
- **Version:** 0.5.0
- **Source summary:** SQL formatter with width-aware output
- **Homepage:** <https://sqlfum.pt/>
- **Repository:** <https://github.com/madelynnblue/sqlfmt>
- **Last updated:** 2026-07-26T04:03:45+02:00
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- sqlfmt (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 0.5.0
## Project history and usage

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.

### Project history

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.

### Adoption history

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.

### How it is used

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.

### Why package nerds care

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.

### Timeline

- 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.

### Sources

- <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.


## Security Notes

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

- **Geiger risk:** blue / medium
- 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)


## Sources

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