Launched January 6, 2026
TESH-Query

TESH-Query

Passionate about democratizing data access and building intelligent developer tools.

Free440 impressions#1670 of its week

TESH-Query (teshq) is a CLI tool that transforms natural language queries into SQL and returns relevant tables using natural language responses. It's designed to bridge the gap between human language and database queries, making data easily accessible for teams without requiring SQL expertise. --- Key Features - Natural Language to SQL: No need to write complex queries—just ask questions like you would in conversation. - AI-Powered Translation: Uses Google Gemini AI (via Langchain) for intelligent SQL generation. - Direct Database Interaction: Works with PostgreSQL, MySQL, and SQLite. - Schema-Aware Queries: Understands your database structure for relevant responses. - Formatted Results: Displays query output in a clean, readable table in your terminal. - Secure Configuration: Supports credential management and database setup. --- Example Usage Instead of writing a lengthy SQL query: SELECT products.name, categories.category_name, orders.order_date FROM products JOIN order_items ON products.id = order_items.product_id JOIN orders ON order_items.order_id = orders.id JOIN categories ON products.category_id = categories.id WHERE categories.category_name = 'electronics' AND orders.order_date >= current_date - interval '1 month' ORDER BY orders.order_date DESC; You can just type: teshq query "Show me all high-value electronics orders from last month" And get the formatted results instantly! --- Installation & Setup 1. Install via pip: pip install teshq 2. Configure database & AI API key: teshq config --config-db teshq config --config-gemini 3. Start querying: teshq query "Show me the total sales amount for each product category in the last quarter." --- Why Use It? ✅ Faster insights without SQL expertise ✅ More productive teams accessing data effortlessly ✅ Less room for errors in manual SQL writing ✅ Supports various databases ✅ Secure storage of credentials

TESH-Query is a CLI and Python SDK that converts natural language questions into safe SQL queries and returns results.

for
Developers and data teams who need SQL insights without writing SQL code.
pricing
open source
license
AGPL-3.0
theshashank1/TESH-Query 40 2Pythonupdated 18 days ago
works withSQLAlchemyGoogle GeminiAzure OpenAI

Key features

6 features of TESH-Query
  • Natural Language Querying — Ask questions in plain English and get SQL plus results instantly.
  • Multi-LLM Support — Choose Google Gemini or Azure OpenAI as the underlying model.
  • Broad Database Compatibility — Works with PostgreSQL, MySQL, SQLite, MSSQL, MariaDB, Oracle via SQLAlchemy.
  • Safe Execution — Generated SQL is AST-validated and destructive commands are blocked by default.
  • Export Options — Save query results to CSV, Excel, or SQLite with a single flag.
  • Dry-Run & Explain Modes — Preview generated SQL and execution plan without affecting the database.

Use cases

  • Generate a sales report for the last quarter without writing SQL
  • Find inventory items low in stock using conversational prompts
  • Export query results to CSV for downstream analysis
  • Validate complex joins by previewing generated SQL first

TESH-Query FAQ

How do I install TESH-Query?+

Run `pip install teshq` or include extras like `teshq[postgres]` for specific drivers.

Which databases are supported?+

PostgreSQL, MySQL, SQLite, MSSQL, MariaDB, Oracle, and any DB supported by SQLAlchemy.

Can I see the generated SQL before it runs?+

Yes, use the `--dry-run` or `--explain` flags to preview and explain the query.

How are credentials stored?+

All configuration, including DB and LLM credentials, are saved securely in `~/.teshq/`.

Is the tool free to use?+

TESH-Query is open-source under the MIT License and can be installed via pip at no cost.

Can I integrate TESH-Query into my own Python app?+

Yes, the Python SDK provides a `TeshQuery` class for programmatic NL-to-SQL queries.

Summarized by DevHunt from pypi.org · Oct 8, 2026. Details may change; check the official site.