csvQL
SQL for CSV and Excel files, in the terminal.

Point it at a CSV file, a folder of them, or an .xlsx workbook, and query them with SQL. Every
file (and every sheet) becomes a table named after it.
Install
Requires Go 1.25 or newer.
go install github.com/chazzychouse/csvql@latest
Use
csvql shell sales.csv # interactive shell on one file
csvql shell ./data # every CSV in a folder, one table each
csvql shell report.xlsx # every sheet of a workbook
csvql query "SELECT city, sqft FROM stores.csv WHERE sqft > 1600"
csvql schema stores.csv # column names and inferred types
In the shell
| Key |
Does |
/ |
Write a SQL query (autocompletes tables, columns and values; Tab accepts) |
: |
Run a command (below) |
h j k l or arrows |
Move around the grid |
gg / G, 0 / $ |
First or last row, first or last column |
Ctrl+D / Ctrl+U |
Half a page down or up |
Tab |
Toggle the side panel: the selected cell, the schema, the tables |
1–9 |
Switch table |
R |
Back to the full table after a query |
q |
Quit |
| Command |
Does |
:unpivot |
Turn date columns (Jan 2026, 2026-01-15, …) into date and value rows |
:reset |
Undo :unpivot |
:schema |
Open the side panel on the schema |
:header N |
Reload the table using row N as its header |
:table NAME |
Switch to a table by name |
WHERE supports comparisons, AND/OR/NOT, IS [NOT] NULL and BETWEEN. Column types are
inferred from the data, so numbers compare as numbers. Headers become SQL-friendly names:
Jan 2026 is jan_2026.
Develop
go test ./...
go build .
License
MIT