Automic VaultAutomic Vault

brew

Install keep-sorted with Homebrew, Nix

Language-agnostic formatter that sorts selected lines. Version 0.9.1 via Homebrew; verified 2026-06-30.

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 post-install hook is recorded in formula metadata.
  • Homebrew bottle metadata is available for 6 platform targets.
  • Build metadata lists 1 build dependencies.

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-sortedcliglobal executable

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-07-08
manager version0.9.1
manager updated2026-06-30
local dataok
upstreamnot checked
latest detectednot detected

https://github.com/google/keep-sorted

install metadata

Package metadata

Package keybrew:keep-sorted
Version0.9.1
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/keep-sorted
Homepagehttps://github.com/google/keep-sorted
Repositoryhttps://github.com/google/keep-sorted
Upstream docshttps://github.com/google/keep-sorted#readme
LicenseApache-2.0
Source archivehttps://github.com/google/keep-sorted.git
Last updated2026-06-30T18:46:01Z
Pulseupdated
Build dependenciesgo
Bottleavailable (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-installnot defined
Servicenone declared

registry facts

Source database details

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namekeep-sorted
Version Scheme0
Revision0
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

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
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment