SQL exploration over data files with your CLI and LLM
Project description
sqlexplore
Get answers from messy data files fast, without building pipelines first.
With sqlexplore, you can:
- Inspect new datasets in minutes instead of writing setup scripts.
- Ask ad hoc questions with SQL and get immediate feedback.
- Move from quick profiling to exportable results in one terminal workflow.
sqlexplore is a terminal SQL workbench for flat files. Point it at a local or remote dataset, then explore with DuckDB SQL in an interactive TUI or run one-shot queries in standard CLI mode.
Useful features
- Works with
.csv,.tsv,.txt,.parquet, and.pq. - Accepts local paths and
http(s)URLs for supported file types. - Accepts piped stdin text (omit
datawhen piping) and opens in TUI by default. If no controlling tty is available, it falls back to--no-ui. - Interactive TUI with query editor, results grid, preview pane, and activity log.
- SQL + helper commands for common analysis tasks:
/summary,/profile,/hist,/corr,/dupes,/top,/group, and more. - Context-aware autocomplete for SQL clauses and helper command arguments.
- Query history and rerun support (
/history,/rerun), plus editor helpers (/last,/clear). - Export last result to
.csv,.parquet/.pq, or.jsonwith/save. - JSON-aware rendering in result cells and clickable links in preview.
- Image bytes in
BLOBorSTRUCT{bytes,path}cells render as compact[img ...]tags with metadata in preview. - Non-interactive mode via
--no-ui(optionally with--executeor--file). - Remote download controls: custom directory (
--download-dir) and overwrite behavior (--overwrite); existing local downloads are reused by default. .txtfiles are ingested line-by-line with derived metrics (line_number,word_count,line_hash, etc).
Usage examples
Open a local file in the TUI:
sqlexplore ./data/example.parquet
Open a remote dataset URL (downloaded first, then loaded):
sqlexplore https://github.com/dylanhogg/awesome-python/raw/refs/heads/main/github_data.parquet
Run one SQL query and exit:
sqlexplore ./data/example.parquet --execute "SELECT COUNT(*) AS n FROM data" --no-ui
Run SQL from a file and exit:
sqlexplore ./data/example.parquet --file ./queries/report.sql --no-ui
Run default sample query in plain terminal output (no TUI):
sqlexplore ./data/example.csv --no-ui
Analyze piped terminal text:
ls -lha | sqlexplore
Analyze piped terminal text in plain terminal output (no TUI):
ls -lha | sqlexplore --no-ui
Pipe text and open TUI with a startup SQL query:
ps aux | sqlexplore - --execute "SELECT line FROM data WHERE line ILIKE '%python%'"
Control remote download location and overwrite:
sqlexplore https://github.com/dylanhogg/awesome-python/raw/refs/heads/main/github_data.parquet --download-dir ./data/cache --overwrite
Typical helper commands in the editor:
/limit 5000
/rows 5000
/summary
/profile amount
/top category 10
/hist amount 20 | amount > 0
/corr tip_amount total_amount
/dupes order_id
/save ./out/results.parquet
/limit <n> sets both helper query limit and row display limit.
/rows <n> only sets row display limit.
Show installed version:
sqlexplore --version
Install
Requires Python 3.13+.
pip install sqlexplore
or:
uv tool install sqlexplore
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sqlexplore-0.7.0.tar.gz.
File metadata
- Download URL: sqlexplore-0.7.0.tar.gz
- Upload date:
- Size: 64.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8bfc51db3518c599293af54fe1f38651bd0be02870b5794171668c0bbc86ac52
|
|
| MD5 |
7828257807667455ca1892e4ade71f9e
|
|
| BLAKE2b-256 |
7f2888c51ce3b945db1acdfc5b041271a30cd1b685b82cc431128fb4fc29e92d
|
File details
Details for the file sqlexplore-0.7.0-py3-none-any.whl.
File metadata
- Download URL: sqlexplore-0.7.0-py3-none-any.whl
- Upload date:
- Size: 70.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
994cefb2b2f881525d34a9d353efdbf841d25f47fcd35cffe8895357c3c7da02
|
|
| MD5 |
a7a313b70c0adb987f5c0c0de165d307
|
|
| BLAKE2b-256 |
030ef2e57380665a2ab1d06d99dd319d4360a685192c4b38cdc4b99297d3d65b
|