AI-powered SQL answer engine - ask questions about your databases
Project description
SQL Answer Engine
Ask natural-language questions about SQLite databases and CSV files using AI.
Prerequisites
- Python >= 3.11.6
- uv package manager
- A Google API key (Gemini)
Installation
git clone <repo-url>
cd sql_answer_engine
uv sync
Create a .env file in the project root:
GOOGLE_API_KEY=your-google-api-key
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
GOOGLE_API_KEY |
Yes | — | Google Gemini API key |
MODEL_NAME |
No | gemini-2.5-flash |
Model to use for AI queries |
METADATA_DB_PATH |
No | ./metadata.db |
Path to the internal metadata database |
DEFAULT_SAMPLE_ROWS |
No | 5 |
Number of sample rows extracted per table during init/sync |
CLI Commands
sql-engine init <path>
Register a SQLite database or CSV file.
sql-engine init ./my_database.db
sql-engine init ./data.csv --name my_data --table-name sales --delimiter "," --encoding utf-8
| Option | Description |
|---|---|
--name |
Custom name for the database (default: filename) |
--table-name |
Table name for CSV import (default: LLM-suggested) |
--delimiter |
CSV delimiter character (default: ,) |
--encoding |
CSV file encoding (default: utf-8) |
CSV files are automatically converted to SQLite with LLM-powered schema inference.
sql-engine list
List all registered databases.
sql-engine list
sql-engine chat <db_name>
Start an interactive chat session with a registered database.
sql-engine chat my_database
sql-engine sync <db_name>
Re-sync schema metadata for a registered database. Useful after the source data changes.
sql-engine sync my_database
sql-engine config
View or modify settings.
sql-engine config --show
sql-engine config --sample-rows 10
| Option | Description |
|---|---|
--show |
Show current settings |
--sample-rows |
Set number of sample rows extracted per table |
Quick Start
# Register a database
sql-engine init ./chinook.db
# Start chatting
sql-engine chat chinook
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
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 urimai-0.1.0.tar.gz.
File metadata
- Download URL: urimai-0.1.0.tar.gz
- Upload date:
- Size: 82.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4398217d361f0a9777d7dd98173caecf44552845f26f4d8a7b7e9b51dcf1e337
|
|
| MD5 |
530c3a56e18ba6ee4026b34034ab16ac
|
|
| BLAKE2b-256 |
6dd6a5199ec2a2beb8f2406b72be4f2c7a207944cbe714d045bdeb8d0173b55b
|
File details
Details for the file urimai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: urimai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 98.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ef309217a958904ae4a9aaeb32555069a4551f9d8af82f9c01db6d17d7d24ac
|
|
| MD5 |
07ba8b308fc1d8403af573803018b33f
|
|
| BLAKE2b-256 |
54cf1cad2bd77965f3254813aafb29a3060c70dded27ff53c40d6ba0e7d41c50
|