Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

transqlate-0.1.1.tar.gz (25.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

transqlate-0.1.1-py3-none-any.whl (25.8 kB view details)

Uploaded Python 3

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

Hashes for transqlate-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ba9b6e0c1bfe2cd59b569f57cbbc82fe5438899d34c13be98a935e8afc6f4ce8
MD5 f9e46d6ce75b9cbb03214af9b9f9c526
BLAKE2b-256 c2b4dd85cf6df62839cbbef2ca8694414297a088fa226fdfb62003a7ec4a42fc

See more details on using hashes here.

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

Hashes for transqlate-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 78dfdf102150ec2f41224f2e71531827fdc68a0cee125018d710f444d8581d87
MD5 2b40518c12a6152a22addaae976c1acb
BLAKE2b-256 2c64a6e2e37f8c5a0a46cffb84443ac04f8fe0341127df20ac3d314f61e066a2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page