Metadata-Version: 2.4
Name: optiquery
Version: 0.1.4
Summary: AI-powered database query optimization CLI
Author-email: Michael Gurevitz <gurevitz15@gmail.com>
License: MIT License
        
        Copyright (c) 2025 Michael Gurevitz
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in
        all copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
        THE SOFTWARE.
        
Project-URL: Homepage, https://github.com/mich-gurevitz/opti-query
Project-URL: Repository, https://github.com/mich-gurevitz/opti-query
Keywords: query,optimization,neo4j,ai,llm
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pydantic
Requires-Dist: google-generativeai
Requires-Dist: neo4j
Requires-Dist: questionary
Requires-Dist: openai
Provides-Extra: dev
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: pylint; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Dynamic: license-file

# OptiQuery

**OptiQuery** is an AI-powered query optimization tool that helps developers analyze and improve slow-running database queries — based on your **actual data and structure**, not just generic tips.

Currently supports **Neo4j**, with upcoming support for **SQL** and **MongoDB**. Choose your preferred LLM (ChatGPT, Gemini), plug in your API key, and let OptiQuery handle the rest.

---

## 🚀 Features

- 📊 Analyze real DB metadata, relationships, and usage patterns
- 🧠 Use ChatGPT or Gemini for smart, context-aware optimizations
- 🔄 Manage multiple databases and AI providers by friendly name
- 💻 Fully interactive CLI — no boilerplate, no memorizing tokens
- 💾 Secure, local config storage
- 🛠️ Modular codebase — easily extend to new DBs or LLMs

---

## 📦 Installation

Install from PyPI:

```bash
pip install optiquery
```

Or clone locally:

```bash
git clone https://github.com/mich-gurevitz/opti-query
cd optiquery
make install-dev
```

---

## 💡 Usage

To launch the interactive CLI:

```bash
optiquery
```

You’ll be able to:

- 🔍 Start a query optimization session
- 🧩 Configure or update database connections
- 🤖 Configure or update AI providers (e.g. ChatGPT, Gemini)
- 📈 View optimized query versions with full explanations and suggestions

---

## 🧪 Local Development

Install in dev mode:

```bash
make install-dev
```

Lint with pre-commit:

```bash
make lint
```
Run tests:

```bash
make tests
```

---

## 📄 License

This project is licensed under the [MIT License](LICENSE).

---

## 👨‍💻 Author

**Michael Gurevitz**  
GitHub: [@mich-gurevitz](https://github.com/mich-gurevitz)

---

## ⭐️ Support the Project

If you find OptiQuery helpful, give it a ⭐ on GitHub and share it with your dev friends!
