rtsort
A real-time sort with a live terminal preview.

rtsort is a streaming alternative to the standard sort command. It displays a continuously updated preview of your sorted data as it arrives, then seamlessly writes the final output to stdout.
Features
- Live terminal display updates as each line arrives
- Alphabetical, numeric, human-readable numeric, and version number sort modes
- Case-insensitive sorting
- Reverse ordering
- Limit output to the top or bottom N results
- Deduplicate lines that compare equal under the active sort mode (like
sort -u) --no-previewmode for scripting without the live terminal display- Configurable preview update rate via
--fps - Sort by a specific field with a configurable field delimiter
Install
Install with Cargo from crates.io
Download a release binary
Download the archive for your platform from the GitHub Releases page, extract it, and place the rtsort binary somewhere on your PATH.
Install with Cargo from the repository
If your GitHub access uses SSH:
Build from a local clone
Usage
rtsort [OPTIONS]
Options:
-n, --numeric-sort Compare by string numerical value
-h, --human-numeric-sort Compare by human-readable numeric values (e.g. 2K, 1G)
-f, --ignore-case Fold lower case to upper case characters for comparison
-V, --version-sort Sort by version numbers (e.g. 1.9 < 1.10)
-r, --reverse Reverse the sort order
-u, --unique Remove lines that compare equal under the active sort mode
--top <N> Output only the first N lines of the sorted result
--bottom <N> Output only the last N lines of the sorted result
--no-preview Suppress the live terminal preview (no alternate screen)
--fps <N> Preview update rate in frames per second (default: 30; 0 = every line)
-k, --key <N> Sort by field N (1-indexed)
-t, --field-separator <CHAR> Field delimiter character (used with -k; default: whitespace)
--help Print help
Examples
# Alphabetical sort (default)
|
# Numeric sort
|
# Human-readable numeric sort
|
# Version sort (1.9 < 1.10 < 2.0)
|
# Case-insensitive sort
|
# Reverse sort
|
# Show only the top 3 results
|
# Show only the bottom 3 results
|
# Remove duplicate lines
|
# Sort by the second whitespace-delimited field
|
# Sort by the second colon-delimited field
|
# Sort directories by size (human-readable)
|
# Find the 5 largest directories
|
# Sort without live terminal preview (useful in scripts)
|
# Limit preview to 10 fps (useful on slow terminals)
|
# Slow preview for very long-running streams
|
# Update preview on every line (no rate limiting)
|
Development
To try without installing:
|
|