AI-Powered JQ Filter Synthesis Tool - synthesizes jq filters from input/output JSON examples using LLM generation with iterative refinement
Project description
JQ-By-Example
AI-powered jq filter synthesis from input/output JSON examples.
You know what JSON transformation you want, but writing the jq filter is tricky? Just provide examples — JQ-By-Example synthesizes the filter for you.
Installation
pip install jq-by-example
Requires jq binary: brew install jq (macOS) or apt install jq (Linux)
Quick Start
export OPENAI_API_KEY='sk-...'
jq-by-example \
--input '{"user": {"name": "Alice"}}' \
--output '"Alice"' \
--desc "Extract name"
# Output: .user.name
Features
- 🤖 LLM-Powered — Uses OpenAI, Anthropic, or local Ollama
- 🔄 Iterative Refinement — Automatically improves filters based on feedback
- ✅ Verified — Executes against real jq binary to ensure correctness
- 📊 Diagnostics — Detailed error classification and scoring
Documentation
Full documentation: github.com/nulone/jq-by-example
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jq_by_example-0.2.1.tar.gz.
File metadata
- Download URL: jq_by_example-0.2.1.tar.gz
- Upload date:
- Size: 71.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c42caa28d2c0fa53519a125176c2a5c6ce8e6e3dfa2aa88018be3c865ed15e9f
|
|
| MD5 |
3f81efa212c0f00e9524df3a259b1a49
|
|
| BLAKE2b-256 |
738cbff59401aa1f93fc92477c0c27ef150cccb63856dbbcde1f20f78a3a1e32
|
File details
Details for the file jq_by_example-0.2.1-py3-none-any.whl.
File metadata
- Download URL: jq_by_example-0.2.1-py3-none-any.whl
- Upload date:
- Size: 30.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d9b589aa0a7959cb2475d3754444b8154b54abd4e7977c9b0e1f602c4c5f053
|
|
| MD5 |
84b9255697a5e7bbb08f62ce34925815
|
|
| BLAKE2b-256 |
95d4f9ca5ec13e5e1f0c572301693ec0c12baedeeae99af7135bcf6e29e49c86
|