@kszongic/sort-lines-cli
v1.0.0
Published
Sort lines from stdin or files — alphabetically, numerically, reverse, unique, case-insensitive
Maintainers
Readme
@kszongic/sort-lines-cli
Sort lines from stdin or files — alphabetically, numerically, reverse, unique, case-insensitive.
Zero dependencies. Works everywhere Node.js runs.
Install
npm i -g @kszongic/sort-lines-cliUsage
# Sort a file alphabetically
sort-lines names.txt
# Pipe from stdin
cat data.txt | sort-lines
# Reverse numeric sort
sort-lines -rn numbers.txt
# Unique lines, case-insensitive
sort-lines -ui mixed.txt
# Combine flags
echo -e "Banana\napple\nbanana\nApple" | sort-lines -iuOptions
| Flag | Description |
|------|-------------|
| -r, --reverse | Reverse sort order |
| -n, --numeric | Sort numerically |
| -u, --unique | Remove duplicate lines |
| -i, --ignore-case | Case-insensitive sort |
| -h, --help | Show help |
| -v, --version | Show version |
License
MIT © 2026 kszongic
