Metadata-Version: 2.4
Name: jq-by-example
Version: 0.2.1
Summary: AI-Powered JQ Filter Synthesis Tool - synthesizes jq filters from input/output JSON examples using LLM generation with iterative refinement
Author: JQ-By-Example Contributors
License: MIT
Project-URL: Homepage, https://github.com/nulone/jq-by-example
Project-URL: Repository, https://github.com/nulone/jq-by-example
Project-URL: Issues, https://github.com/nulone/jq-by-example/issues
Keywords: jq,json,llm,synthesis,cli
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Text Processing :: Filters
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx>=0.25.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: ruff>=0.14.0; extra == "dev"
Requires-Dist: mypy>=1.0; extra == "dev"
Dynamic: license-file

# JQ-By-Example

[![PyPI](https://img.shields.io/pypi/v/jq-by-example)](https://pypi.org/project/jq-by-example/)
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

**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
```bash
pip install jq-by-example
```

Requires `jq` binary: `brew install jq` (macOS) or `apt install jq` (Linux)

## Quick Start
```bash
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](https://github.com/nulone/jq-by-example)**
