pkg.soopen package index

brew / rank 5250

Install keep-sorted with Homebrew, Nix

Language-agnostic formatter that sorts selected lines. Version 0.9.1 via Homebrew; verified 2026-07-27. Also installable with nix: nix profile install nixpkgs#keep-sorted.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install keep-sorted

local Homebrew formula metadata

Linux

Nixverified · 92%
nix profile install nixpkgs#keep-sorted

nixpkgs package indexes · pkgs/by-name/ke/keep-sorted/package.nix · source: api.github.com

overview

Package summary

Language-agnostic formatter that sorts selected lines

Commands and aliases

  • keep-sorted

history

Project history and usage

keep-sorted is Google's language-agnostic formatter for sorting marked blocks of lines inside larger files. Instead of trying to parse a whole language, it asks maintainers to mark regions with `keep-sorted start` and `keep-sorted end`, then sorts just those regions.

Project history

The GitHub repository was created on 2023-02-23. The README presents the tool as a general formatter for sorted blocks and documents installation through `go install` and pre-commit integration. Public GitHub releases began with the 0.1.x line in January 2024, followed by rapid feature growth around nested blocks, numeric sorting, YAML-style option lists, regex sorting, release binaries, and skip/group options.

Adoption history

Adoption is strongest in repositories that want deterministic ordering for generated-looking lists without adopting a language-specific formatter. The pre-commit hook documented in the README is the main adoption path: projects can enforce sorted blocks in review and CI while keeping the tool independent of file type.

How it is used

Users wrap a section of code, configuration, documentation, or data with keep-sorted markers and run `keep-sorted` over files or stdin. Options on the marker control grouping, block parsing, case sensitivity, duplicate removal, descending order, regex-based sorting, and blank-line handling.

Why package nerds care

keep-sorted is package-nerdy because it solves a recurring maintenance itch with a tiny explicit contract: the source file says which lines are machine-sortable. That makes it a useful complement to gofmt-style whole-file formatters and to pre-commit-driven hygiene stacks.

Timeline

  • 2023-02-23: GitHub repository created.
  • 2024-01-23: v0.1.1, v0.2.0, and v0.3.0 releases published.
  • 2024-03-05: v0.4.0 added skip_lines and group_prefixes options.
  • 2024-09-27: v0.5.0 added YAML-list support for multi-valued options.
  • 2025-03-18: v0.6.0 added by_regex and a --version flag.
  • 2026-06-30: v0.9.1 published.

Related projects

  • keep-sorted is related to pre-commit, Go module distribution, repository-formatting tools, and language-specific formatters such as gofmt and clang-format, but it intentionally stays language-agnostic.

security posture

Risk level: green

narrow executable package without higher-risk signals.

Risk classifier

green risk · low confidence · appliance

Why

  • narrow executable package without higher-risk signals

Signals

  • metadata:no-higher-risk-signals

Install behavior

  • No Homebrew bottle metadata was recorded.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

executables

Installed executables

CommandKindExposureNote
keep-sortedexecutableindexed executableDiscovered from the local executable index.

freshness

Version and freshness

These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.

page generated2026-08-03
manager version0.9.1
manager updated2026-07-27
local dataunknown
upstreamnot available
latest detectednot detected
  • okNo freshness warnings were generated.

install metadata

Package metadata

Package keybrew:keep-sorted
Version0.9.1
Package managerHomebrew
Homepagehttps://github.com/google/keep-sorted
Repositoryhttps://github.com/google/keep-sorted
Last updated2026-07-27T21:58:38+02:00
Pulseupdated
Bottlenot recorded
Servicenone declared

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

Nix95%

keep-sorted

nix profile install nixpkgs#keep-sorted
  • normalized package name match
  • Matched by: Keep Sorted
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/ke/keep-sorted/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

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