top | item 46692671 Show HN: JQ-Synth – Generate jq filters from input/output examples 1 points| nulone | 1 month ago |github.com 1 comment order hn newest nulone|1 month ago I can never remember jq syntax.Whenever I need to transform JSON, I spend 20 minutes guessing filters until something works.So I built a CLI tool: give it input JSON and desired output, it generates the jq filter.Example: Input: [{"name": "Alice", "email": "alice@example.com"}, {"name": "Bob"}, {"name": "Charlie", "email": "charlie@example.com"}] Wanted: ["alice@example.com", "charlie@example.com"] Generated: [.[] | select(.email != null) | .email] How it works:1. Takes your input/output examples2. Generates a filter, runs jq, verifies the output matches3. If wrong, retries automaticallyWorks with local models (Ollama) or cloud (OpenAI/Anthropic).~450 tests, MIT licensed.Curious what edge cases break it.
nulone|1 month ago I can never remember jq syntax.Whenever I need to transform JSON, I spend 20 minutes guessing filters until something works.So I built a CLI tool: give it input JSON and desired output, it generates the jq filter.Example: Input: [{"name": "Alice", "email": "alice@example.com"}, {"name": "Bob"}, {"name": "Charlie", "email": "charlie@example.com"}] Wanted: ["alice@example.com", "charlie@example.com"] Generated: [.[] | select(.email != null) | .email] How it works:1. Takes your input/output examples2. Generates a filter, runs jq, verifies the output matches3. If wrong, retries automaticallyWorks with local models (Ollama) or cloud (OpenAI/Anthropic).~450 tests, MIT licensed.Curious what edge cases break it.
nulone|1 month ago
Whenever I need to transform JSON, I spend 20 minutes guessing filters until something works.
So I built a CLI tool: give it input JSON and desired output, it generates the jq filter.
Example:
How it works:1. Takes your input/output examples
2. Generates a filter, runs jq, verifies the output matches
3. If wrong, retries automatically
Works with local models (Ollama) or cloud (OpenAI/Anthropic).
~450 tests, MIT licensed.
Curious what edge cases break it.