[](https://github.com/nao1215/atago) [](https://github.com/nao1215/himorime) [](https://github.com/nao1215/sqly/actions/workflows/build.yml) [](https://github.com/nao1215/sqly/actions/workflows/reviewdog.yml) [](https://github.com/nao1215/sqly/releases)
sqly
sqly runs SQL against CSV, TSV, LTSV, JSON, JSONL, Parquet, Excel, ACH, and Fedwire files. It loads them into an in-memory SQLite3 database, so joins, CTEs, window functions, and aggregates all work — across formats, in one query. Compressed files (.gz, .bz2, .xz, .zst, .z, .snappy, .s2, .lz4) are read transparently.
Documentation: https://nao1215.github.io/sqly/
Try it in 30 seconds
If you have Go, paste this:
printf 'name,dept,salary\nalice,eng,120\nbob,sales,90\ncarol,eng,140\n' > staff.csv
go run github.com/nao1215/sqly@latest --sql "SELECT dept, ROUND(AVG(salary)) AS avg FROM staff GROUP BY dept" staff.csv+-------+-----+
| dept | avg |
+-------+-----+
| eng | 130 |
| sales | 90 |
+-------+-----+The file is the table: staff.csv became staff. No schema to declare, no import step.
Why sqly?
Pick the tool that fits the job:
| You want | Use | |:--|:--| | A field-oriented text processor for logs and columns | awk, Miller | | A CSV-native SQL dialect with its own engine and cursors | csvq | | SQL over CSV/TSV/JSON with a choice of backend engines | trdsql | | SQL over CSV with long-standing, mature tooling | q, textql | | SQL over files, with an interactive shell, cross-format joins, and write-back | sqly |
sqly's emphasis is the session: an interactive shell with completion and history, files of different formats joined as peers, and the ability to write edits back into the source file.
Install
go install github.com/nao1215/sqly@latestbrew install nao1215/tap/sqlyArch Linux users can install the AUR package:
yay -S sqly-bin