Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By neilotoolev1.1.0MITIn 1 marketplace
Query SQL databases and CSV or Excel files with SQL or jq-style syntax, joining sources in one statement. Requires the sq CLI installed.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
1 marketplace, most starred first
SQL, PostgreSQL, MySQL, SQLite, DuckDB, ClickHouse, SQL Server, Excel
database-queries, csv, data-wrangling, cross-source-joins, cli, data-migration
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
sq is a command line tool that provides jq-style access to
structured data sources: SQL databases, or document formats like CSV or Excel.
It is the lovechild of SQL+jq.

sq executes jq-like queries, or database-native
SQL. It can join
across sources: join a CSV file to a Postgres table, or MySQL with Excel.
sq outputs to a multitude of formats
including JSON,
Excel, CSV,
HTML, Markdown
and XML, and can insert query
results directly to a SQL database.
sq can also inspect sources to view metadata about the
source structure (tables, columns, size). You can use sq diff
to compare tables, or entire databases. sq has commands for common database operations to
copy, truncate,
and drop tables.
Find out more at sq.io.
[!TIP] The rest of this doc is mainly for
sqend users and first-timers. Contributors (bug reports, feature requests, pull requests), see CONTRIBUTING.md.
sq knows how to deal with a data source type via a driver
implementation. To view the installed/supported drivers:
$ sq driver ls
DRIVER DESCRIPTION
sqlite3 SQLite
rqlite rqlite
duckdb DuckDB
postgres PostgreSQL
sqlserver Microsoft SQL Server
mysql MySQL
clickhouse ClickHouse
oracle Oracle
csv Comma-Separated Values
tsv Tab-Separated Values
json JSON
jsona JSON Array: LF-delimited JSON arrays
jsonl JSON Lines: LF-delimited JSON objects
xlsx Microsoft Excel XLSX
brew install sq
[!NOTE]
sqis a core brew formula. The oldneilotoole/sqtap is retired. If you installedsqfrom it (brew install neilotoole/sq/sq), the nextbrew updateswitches that install to the core formula.Homebrew no longer builds bottles for Intel Macs, so on an Intel Mac,
brew install sqbuilds from source. To skip the build, download themacos-amd64binary from GitHub releases.
/bin/sh -c "$(curl -fsSL https://sq.io/install.sh)"
scoop bucket add sq https://github.com/neilotoole/sq
scoop install sq
Prefer a package manager above, or a release binary.
go install needs the SQLite build tags, and its binary reports version v0.0.0-dev; use
make install from a clone for a version-stamped build.
go install -tags "sqlite_vtable sqlite_stat4 sqlite_fts5 sqlite_introspect sqlite_json sqlite_math_functions" \
github.com/neilotoole/sq@latest
The ghcr.io/neilotoole/sq
image is preloaded with sq and a handful of related tools like jq. The same
image is published to Docker Hub as
neilotoole/sq. Both are cosign-signed
and carry SLSA build provenance and an SPDX SBOM.
# Shell into a one-time container.
$ docker run -it ghcr.io/neilotoole/sq zsh
# Start detached (background) container named "sq-shell".
$ docker run -d --name sq-shell ghcr.io/neilotoole/sq
# Shell into that container.
$ docker exec -it sq-shell zsh
Running sq in a Kubernetes environment is useful for DB migrations,
as well as general data wrangling.
# Start pod named "sq-shell".
$ kubectl run sq-shell --image ghcr.io/neilotoole/sq
# Shell into the pod.
$ kubectl exec -it sq-shell -- zsh
See other install options.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground