keep-sorted
« Back to VersTracker
Description:
Language-agnostic formatter that sorts selected lines
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: formatter developer-tools code-quality productivity cli
Install: brew install keep-sorted
About:
KeepSorted is a language-agnostic formatter that identifies and sorts selected blocks of lines within source code. It helps maintain consistent ordering in lists, dependencies, and other grouped data without requiring specialized plugins for each language. This reduces manual effort and prevents ordering-related diffs in version control.
Key Features:
  • Language-agnostic operation works with any text format
  • Configurable block detection using comment markers
  • Preserves code structure while sorting only selected sections
  • Idempotent output ensures consistent formatting
Use Cases:
  • Sorting dependency lists in configuration files
  • Organizing imports or includes in source files
  • Maintaining ordered data in documentation or data files
Alternatives:
  • sort – Unix sort command sorts entire files but lacks context-aware block selection
  • prettier – General code formatter that doesn't offer selective line sorting
Version History
Detected Version Rev Change Commit
Sep 11, 2025 6:18pm 0 VERSION_BUMP cd02465d
Sep 28, 2024 5:40pm 0 VERSION_BUMP ebc6fcc6