Skip to Content
  • Website
Codsen
  • Home
  • Open Source
  • Articles
  • About

prevOpen Source→csv-sort-clinext

csv-sort-cli4.2.1

Command line app to sort double-entry CSVs coming from internet banking statements

Downloads per monthChangelogMIT Licenselibera manifesto
  • the top
  • Installation
  • CALL ON A FILE
  • OR OMIT THE FI…
  • WHAT IT DOES…
  • Changelog

Installation

Call on a file

Call csvsort (or sortcsv) appending your file name (with or without -o/--overwrite flag):

csvsort YOURFILE.csv

csvsort -o YOURFILE.csv
csvsort --overwrite YOURFILE.csv
csvsort -v
csvsort --version
csvsort -h
csvsort --help

like this:

calling directly on a file
calling directly on a file

Or omit the file’s name

It will let you pick a CSV:

csvsort # omit the file's name, but you can include -o/--overwrite flag

omit the file name and csv-sort-cli will offer a list of CSV files in the current folder to choose from:

calling without specifying a file name
calling without specifying a file name

You can even try it without installing — use npx:

npx csv-sort-cli YOURFILE.csv

What it does exactly

  1. It sorts CSV file rows to correspond to the double-entry bookkeepingopens in a new tab principles:
double bookkeeping example
double bookkeeping example

Sometimes internet banking CSV’s have rows in a wrong order, especially when entries are on the same date. This library helps to sort the rows in correct order.

  1. As a bonus, it will trim the empty columns/rows:
2D trim of a CSV contents
2D trim of a CSV contents
  1. Not to mention, the our custom CSV parser csv-split-easy used here will ensure that all CSV cell contents are trimmed, and there are no empty rows between the content rows. It also accepts any commas as content if the cell is wrapped with a double quotes.

Changelog

Open Changelog
↑ back to top
prev next

Copyright

All rights reserved © Roy Revelt 2026
All our open source packages are under MIT licenceopens in a new tab

Activities

🐛 See a bug? Raise an issueopens in a new tab
💘 Check out the Indiewebopens in a new tab and Libera manifestoopens in a new tab