| name | sq |
| description | Use this skill when the user wants to query structured data with SQL — inspect CSV/JSON/Excel/Parquet files, run ad-hoc queries against databases, or pipe jq-style transformations on tabular data. |
sq Plugin
SQL + jq for structured data. Query CSV, JSON, Excel, Parquet, Postgres, MySQL, SQLite, and more using familiar SQL syntax or jq-style expressions.
Installation
go install github.com/neilotoole/sq@latest
brew install sq
Basic Usage
sq ls
sq '@file.csv' 'SELECT * FROM @file.csv LIMIT 10'
sq '@data.json' 'SELECT name, age FROM @data.json WHERE age > 30'
sq inspect @file.csv
Common Patterns
sq add postgres pg://user:pass@localhost/mydb
sq '@mydb' 'SELECT count(*) FROM users'
sq '@file.csv' 'SELECT * FROM @file.csv' --format csv > output.csv
sq '@a.csv' 'SELECT a.id, b.name FROM @a.csv a JOIN @b.csv b ON a.id = b.id'
Usage Examples
- "Query this CSV file with SQL"
- "Show me the schema of this JSON dataset"
- "Count rows where status is active in this Excel file"
SuperCLI
sc sq _ _ ls
sc sq _ _ '@data.csv' 'SELECT * FROM @data.csv LIMIT 5'
sc plugins learn sq