Agent analysis
Let the model write SQL while the process enforces the limits.
v0.3.4 Agent-native data CLI
SQL in. Files out.
Bounded SQL over local CSV, TSV, JSON, and Parquet—for agents that already write the query.
$ brew install yhay81/tap/sqrail
$ curl -LO
https://github.com/yhay81/sqrail/releases/download/v0.3.4/sqrail-v0.3.4-linux-x86_64.tar.gz
> curl.exe -LO
https://github.com/yhay81/sqrail/releases/download/v0.3.4/sqrail-v0.3.4-windows-x86_64.zip
> Open install-agent.md, review it, then
install sqrail and its Agent Skill for this agent.
$ sqrail schema trials.parquet
{"schema_version":1,"sqrail_version":"0.3.4",
"file":"/data/trials.parquet","files":1,
"columns":[{"name":"phase",
"type":"BIGINT","nullable":true}]}
$ sqrail check \
-t trials=trials.parquet \
'SELECT phase, count(*) AS n
FROM trials GROUP BY phase'
{"schema_version":1,"sqrail_version":"0.3.4",
"ok":true,
"columns":[{"name":"phase","type":"BIGINT","nullable":true},
{"name":"n","type":"BIGINT","nullable":true}],
"inputs":[{"table":"trials","files":1}],
"plan":[{"name":"HASH_GROUP_BY","children":[],
"extra_info":{}}]}
$ sqrail run \
-t trials=trials.parquet \
--memory 512MB --threads 2 \
--stats \
'SELECT phase, count(*) AS n
FROM trials
GROUP BY phase
ORDER BY phase'
{"phase":1,"n":8231}
{"phase":2,"n":4817}
{"phase":3,"n":1092}
One executable. No daemon. No prompt layer.
Three verbs
Inspect names and types once when the input is unknown.
sqrail schema data.parquet
Validate bindings and inspect the plan without execution.
sqrail check -t d=data.csv - < query.sql
Execute once, consume the result, and stop after success.
sqrail run -t d=data.csv - < query.sql
Why sqrail
Use DuckDB directly for interactive analytics and its complete SQL surface. Use sqrail when an automated caller needs one predictable, inspectable operation over explicitly named files.
| Need | DuckDB CLI | sqrail |
|---|---|---|
| Working mode | Interactive and general purpose | One bounded operation |
| Inputs | SQL can address configured sources | Only explicit bindings are allowlisted |
| Failure contract | Human-oriented CLI behavior | One strict JSON diagnostic |
| Output commit | Flexible export paths | Atomic and never overwrites |
Let the model write SQL while the process enforces the limits.
Turn large extracts into a bounded, machine-readable result.
Validate, execute, and commit one file transformation safely.
Complete agent context
The stable help is deliberately short enough to place in an agent context without a separate tool manual.
Open as plain textsqrail --help
Names/types result: schema once.
Otherwise trust stated names/types,
run once, and stop after success.
-t binds a file, Parquet directory, or glob.
- reads SQL from stdin.
No -o streams JSONL.
-o selects format by extension.
Limits fail closed.
Errors are one stderr JSON.
Measured, not imagined
sqrail embeds DuckDB v1.5.5. It does not claim a faster engine; it removes layers around one carefully constrained local query.
Hardware-specific observation, not a universal claim. Dataset generator, raw timing, peak RSS, row counts, and logical checksums are committed for reproduction.
Audit the baselineConstrained by default
Exact inputs are allowlisted. Extension loading and arbitrary external access are disabled. Output stays private until an atomic, no-overwrite commit succeeds.
Choose the next step
Ready for the next command
$ brew install yhay81/tap/sqrail
Linux, macOS, and Windows · Arm64 and x86-64 · MIT licensed