# Install sqlfmt with Homebrew

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

## 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
- **Package manager page:** <https://formulae.brew.sh/formula/sqlfmt>
- **Version:** 0.5.0
- **Source summary:** SQL formatter with width-aware output
- **Homepage:** <https://sqlfum.pt/>
- **Repository:** <https://github.com/madelynnblue/sqlfmt>
- **Upstream docs:** <https://sqlfum.pt/about>
- **License:** Apache-2.0
- **Source archive:** <https://github.com/madelynnblue/sqlfmt/archive/refs/tags/v0.5.0.tar.gz>
- **Last updated:** 2026-07-04T16:53:45+09:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- sqlfmt (cli)
- sqlfmt (alias)

## Build dependencies

- go

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, monterey, sonoma, ventura, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.5.0
- Package-manager updated: 2026-07-04
- Local data: ok
- Upstream repository: https://github.com/madelynnblue/sqlfmt
- Upstream latest detected: v0.5.0 (current)
## 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

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** sqlfmt
- **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


## Related links

- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [go](https://www.automicvault.com/pkg/brew/go/) - Build dependency declared by Homebrew.
- [sleek](https://www.automicvault.com/pkg/brew/sleek/) - Shares av.db curated category or tags: cli, developer-tools, formatter, sql.
- [sqlfluff](https://www.automicvault.com/pkg/brew/sqlfluff/) - Shares av.db curated category or tags: cli, developer-tools, formatter, sql.
- [sqruff](https://www.automicvault.com/pkg/brew/sqruff/) - Shares av.db curated category or tags: cli, developer-tools, formatter, sql.
- [bcpp](https://www.automicvault.com/pkg/brew/bcpp/) - Shares av.db curated category or tags: cli, developer-tools, formatter, formatting.
- [golines](https://www.automicvault.com/pkg/brew/golines/) - Shares av.db curated category or tags: cli, developer-tools, formatter, formatting.
- [keep-sorted](https://www.automicvault.com/pkg/brew/keep-sorted/) - Shares av.db curated category or tags: cli, developer-tools, formatter, formatting.
- [pgformatter](https://www.automicvault.com/pkg/brew/pgformatter/) - Shares av.db curated category or tags: cli, developer-tools, formatter, postgresql, sql.
- [sql-lint](https://www.automicvault.com/pkg/brew/sql-lint/) - Shares av.db curated category or tags: cli, developer-tools, sql.

## Combined YAML source

View the package source record on GitHub. [combined/sqlfmt.yml](https://github.com/automic-vault/db/blob/main/combined/sqlfmt.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- cross-ecosystem install command graph
