sq
sq is a CLI tool that lets you query SQL databases, CSV, Excel, and JSON files using jq-like syntax or native SQL. It unifies access to multiple data source types and supports joining across them, with output to JSON, CSV, Excel, Markdown, XML, and HTML.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | neilotoole/sq |
| Owner | neilotoole |
| Primary language | Go |
| License | MIT — OSI-approved |
| Stars | 2.5k |
| Forks | 40 |
| Open issues | 74 |
| Latest release | v0.54.1 (2026-06-23) |
| Last updated | 2026-07-07 |
| Source | https://github.com/neilotoole/sq |
What sq is
Written in Go, sq provides a unified driver abstraction layer supporting 13+ data source types (SQLite, Postgres, MySQL, SQL Server, Oracle, DuckDB, ClickHouse, CSV, TSV, JSON, JSONL, JSONA, XLSX). It executes both declarative jq-style queries and native SQL, with cross-source join capability and metadata inspection.
Get the sq source
Clone the repository and explore it locally.
git clone https://github.com/neilotoole/sq.gitcd sq# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Install via brew (macOS), curl (Linux), scoop (Windows), or go install. Docker image available for containerized environments and Kubernetes.
- Sources are registered locally via 'sq add' with a handle; credentials are stored locally (review security model for sensitive environments).
- Drivers are composable; not all features (e.g., cross-source joins) may be equally mature across all driver combinations—test your specific workflow.
- Query syntax is jq-inspired but not identical; refer to sq.io documentation to avoid assuming full jq compatibility.
- Output formats (JSON, CSV, Excel, Markdown, XML, HTML) are well-supported; insertion into databases is documented but should be tested for your target DB.
When to avoid it — and what to weigh
- Real-time streaming or high-throughput analytics — sq is a CLI tool designed for interactive queries and scripted workflows, not a streaming engine or OLAP database optimized for massive concurrent loads.
- Complex multi-tenant SaaS backend — sq is not a server application with auth/RBAC; it's a user-facing CLI. Not designed as a replacement for application query layers or service APIs.
- Offline-first or embedded data access — sq requires connectivity to source systems (databases, remote files). No built-in offline caching or embedded datastore mode for disconnected operation.
- Highly proprietary or closed data formats — Limited to supported drivers. Custom or vendor-specific formats require additional work to integrate.
License & commercial use
MIT License. Permissive OSI-approved license. No copyleft restrictions; commercial use, modification, and private use are allowed. See CONTRIBUTING.md and LICENSE for details.
MIT is a permissive license with no restrictions on commercial use. However, as with any open-source tool, verify your own compliance obligations, consult legal if needed, and note that the maintainer offers no commercial SLA or support guarantee embedded in the license.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Strong |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Good |
| Assessment confidence | High |
sq is a client-side CLI tool. Security depends on: (1) how source credentials are stored locally (not encrypted by default—review for sensitive data), (2) TLS/auth config of remote databases, (3) file permissions on local CSV/Excel inputs. No built-in encryption of query logs or outputs. Suitable for trusted developer environments; not for untrusted multi-user systems without additional hardening.
Alternatives to consider
duckdb (CLI + library)
Also supports multiple data formats and SQL; more optimized for analytics. Lacks jq-style query syntax and cross-source joins out-of-box. Consider if you need pure SQL + performance over ease-of-use.
jq + shell scripting
Minimal dependency; pure JSON wrangling. Less suitable for SQL databases or structured joins. Requires more manual glue code.
Pandas (Python) + Jupyter
Richer data transformation and visualization. Higher learning curve and requires Python runtime. Better for exploratory analysis than automation.
Build on sq with DEV.co software developers
Test sq on your own data sources. Start with 'sq add' and 'sq inspect' to understand integration effort, then assess whether jq-style queries or cross-source joins add value for your team.
Talk to DEV.coRelated on DEV.co
Explore the category and the services that help you build with it.
sq FAQ
Can I use sq to join a CSV to a Postgres table?
Is sq suitable for production data pipelines?
How does sq store database credentials?
Does sq modify source data by default?
Work with a software development agency
Need help beyond evaluating sq? DEV.co is a software development agency offering software development services and web development for teams of every size. Our software developers and web developers build custom software, web applications, APIs, and open-source databases integrations — and maintain them long-term.
Evaluate sq for your data wrangling workflow
Test sq on your own data sources. Start with 'sq add' and 'sq inspect' to understand integration effort, then assess whether jq-style queries or cross-source joins add value for your team.