Natural Language to SQL CLI powered by a fine-tuned LLM.
Project description
Transqlate
Transqlate is a production-ready, schema-aware natural language to SQL command-line assistant powered by a fine-tuned Phi-4 Mini language model. It enables both technical and non-technical users to generate complex, accurate SQL queries over arbitrary relational databases—simply by typing English instructions.
Key Features
- Natural Language to SQL: Translate plain English questions into executable, context-aware SQL queries.
- Schema-Aware Retrieval (RAG): Automatically extracts and injects relevant schema information, scaling to large and complex databases.
- Interactive CLI: User-friendly terminal interface with support for query generation, schema exploration, safe execution, and dynamic database switching.
- Safe Query Execution: Built-in guardrails prevent accidental schema/data changes; all data-altering queries require explicit user confirmation.
- Plug-and-Play: Pip-installable, works on any system with Python 3.8+. No GPU required for inference.
- Database Support: Compatible with SQLite, PostgreSQL, MySQL, MSSQL, and Oracle databases.
Installation
pip install transqlate
Usage
Start the interactive CLI:
transqlate --interactive
Generate SQL for a specific question:
transqlate -q "List all customers who made purchases in March." --db-path path/to/database.db
Explore schema or change connections:
:show schema # Display current database schema
:change connection # Switch to a new database on the fly
License
MIT License
Author
Shaurya Sethi Email: shauryaswapansethi@gmail.com
For full documentation, model details, and source code, visit the GitHub repository or Hugging Face model page.
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 transqlate-0.1.1.tar.gz.
File metadata
- Download URL: transqlate-0.1.1.tar.gz
- Upload date:
- Size: 25.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba9b6e0c1bfe2cd59b569f57cbbc82fe5438899d34c13be98a935e8afc6f4ce8
|
|
| MD5 |
f9e46d6ce75b9cbb03214af9b9f9c526
|
|
| BLAKE2b-256 |
c2b4dd85cf6df62839cbbef2ca8694414297a088fa226fdfb62003a7ec4a42fc
|
File details
Details for the file transqlate-0.1.1-py3-none-any.whl.
File metadata
- Download URL: transqlate-0.1.1-py3-none-any.whl
- Upload date:
- Size: 25.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78dfdf102150ec2f41224f2e71531827fdc68a0cee125018d710f444d8581d87
|
|
| MD5 |
2b40518c12a6152a22addaae976c1acb
|
|
| BLAKE2b-256 |
2c64a6e2e37f8c5a0a46cffb84443ac04f8fe0341127df20ac3d314f61e066a2
|