AI-powered database query optimization CLI
Project description
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:
pip install optiquery
Or clone locally:
git clone https://github.com/mich-gurevitz/opti-query
cd optiquery
make install-dev
💡 Usage
To launch the interactive CLI:
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:
make install-dev
Lint with pre-commit:
make lint
Run tests:
make tests
📄 License
This project is licensed under the MIT License.
👨💻 Author
Michael Gurevitz
GitHub: @mich-gurevitz
⭐️ Support the Project
If you find OptiQuery helpful, give it a ⭐ on GitHub and share it with your dev friends!
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 optiquery-0.1.4.tar.gz.
File metadata
- Download URL: optiquery-0.1.4.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
203031a39941d3f309d6300214f331357ad603ab3d744d0777d8aca1f5811ea1
|
|
| MD5 |
66c722ecb06ec76eb091c1676b553832
|
|
| BLAKE2b-256 |
53662d20f9eeb2d5c37865f28e17a513575e17724b92f6f98c9a848a43d62ed4
|
File details
Details for the file optiquery-0.1.4-py3-none-any.whl.
File metadata
- Download URL: optiquery-0.1.4-py3-none-any.whl
- Upload date:
- Size: 19.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e4a9aa93535636c949b98d38fd110aeff0d86aba57f8f7863d89b275386bc73
|
|
| MD5 |
c0f733a27b3c68327e17669997e6ec80
|
|
| BLAKE2b-256 |
679b06610c1fd1ab18c2ddc672d478237e46cdb15e7feee36259f8a56ceff3bb
|