Skip to content
K

Keep Sorted

keep-sorted is a language-agnostic formatter

by googleFree

#3112in Developer Tools
0In stores

Description

keep-sorted is a command-line formatter that sorts the lines between two markers in any text file, whatever the language. You wrap the lines…

Highlights

  • Sorts lines between keep-sorted start and end markers
  • Works with any text file, whatever the language
  • Nested sorted blocks
  • Reads stdin and writes stdout
  • pre-commit hook support

Ratings & Reviews

No ratings yet

Be the first to rate Keep Sorted.

People also visit

P

Prettier

An opinionated code formatter

Developer Tools
Launch
B

Biome

Fast Rust-based formatter and code linter

Developer Tools
Launch
G

Gisto

Gisto is a Cross-platform snippets management application

Developer Tools
Launch
E

editorconfig

EditorConfig file generator

AI Skills
Get
M

Mdsf

Format markdown code blocks using your favorite tools

Developer Tools
Launch
D

DevGPT

Automate code formatting, debugging, refactor code

Developer Tools
Launch

Keep Sorted FAQ

What is keep-sorted?

A language-agnostic formatter that sorts the lines between two markers in a file.

How do I mark lines to sort?

Put keep-sorted start and keep-sorted end in comments around the lines you want sorted.

How do I install it?

Install Go first, at least version 1.23 according to the README, then install keep-sorted with Go and run it on your files.

Can I use it with pre-commit?

Yes. Add the repository to your pre-commit setup and it runs automatically.

Is it open source?

Yes. The source is on GitHub.

What are the best Keep Sorted alternatives?

Popular alternatives to Keep Sorted include Prettier, Biome and Gisto. See all Keep Sorted alternatives

Developer Stuff

Badges