jq-coder
Natural language → executable jq filters. A 0.6B model in a single native binary — 100% offline, no API keys, your JSON never leaves your machine.
$ jqc "keep only the orders whose status is done" orders.json
filtro: [.orders[] | select(.status == "done")]
[{"id":1,"status":"done","total":120.5}]Why
Everyone who uses jq knows the loop: you know exactly what you want,
you just can't remember the incantation. Pasting production JSON into a cloud
chatbot is not an option when the payload contains PII, credentials, or anything
under NDA.
jq-coder is a 0.6B model fine-tuned for exactly one job: translating plain English (and Brazilian Portuguese) into executable jq filters. It ships inside a single native binary with an embedded inference engine and an embedded executor — no Python, no server, no API key. After the model weights are cached, it never touches the network.
The training data is execution-verified: jq programs are sampled from a grammar and actually executed against synthetic JSON to produce provably correct ground truth — the teacher model never writes a filter, only describes it.
Install
Download a binary for Windows x64, Linux x64, or macOS arm64 (with optional GPU variants) from the GitHub Releases page. Or run the model directly via Ollama:
ollama run hf.co/DominuZ/jq-coder-0.6B:Q8_0The Python package jqc
is reserved on PyPI; the pip-installable port is in progress.
Benchmarks
We publish jq-bench, our own execution-verified benchmark built from real StackOverflow questions, as the project's canonical evaluation set. We also report our numbers on nl2jq-bench, an independent, frozen, external benchmark — including the unflattering ones:
| nl2jq-bench metric (default settings) | Score |
|---|---|
| valid@1 — output is a syntactically valid jq filter | 0.77 |
| pass@1 — output produces the correct result | 0.31 |
A 0.6B model is not GPT-5. Publishing honest numbers on a public benchmark is the point: it gives the next version — and anyone else's model — something real to beat.
Limitations
- Complex multi-step transformations often need a retry or a human touch-up; interactive mode exists for exactly that.
- First run downloads ~640 MB of model weights (then cached, fully offline).
- English and Brazilian Portuguese only.
Links
- CLI: jq-coder-cli on GitHub (Rust, MIT)
- Model: jq-coder-0.6B on Hugging Face
- Benchmark: jq-bench (dataset)
A Softgrande project, by Edelmar Schneider (DominuZ on Hugging Face).