harelba/q ? reverse-engineered prompt
Reverse engineered prompt
Build me a command line tool in Python that lets me run SQL directly on CSV, TSV, and other delimited text files as if they were tables.
I want to be able to point it at a file, or even pipe data into it, and then run normal SQL like SELECT, WHERE, GROUP BY, JOIN, ORDER BY, and LIMIT. It should auto detect headers and column names when possible, figure out basic data types, and handle different text encodings without making me fuss with setup.
It would be great if repeated queries on the same file could use caching to make things much faster, with an easy way to turn that on or off. Also support querying across multiple sqlite files without needing to merge them first.
Please make it feel like a real Unix style tool, with clear help text, useful examples, and sensible defaults. If you need to check current docs or edge cases, look them up online.
Are you gonna build this?
make sure you review the code using coderabbit