SQLite forensic analysis with local LLMs — ask questions in plain English
Project description
yourSQLfriend
Connect SQLite databases to a local LLM. Ask questions in plain English, get SQL queries and results.
Built for offline forensic analysis on a single workstation — no cloud, no telemetry, nothing leaves your machine.
yourSQLfriend is for analysts, investigators, and developers who need to interrogate SQLite databases without sending data anywhere. Load a .db, .sqlite, .csv, or .sql file, ask questions in plain English, and get parameterised read-only SQL with full results — air-gap safe, forensic-grade.
✨ Features
| 🔒 100% Offline | Runs on a local LLM via Ollama or LM Studio. Zero telemetry, air-gap safe |
| 💬 Natural Language | Ask "show me the top 5 customers" and get results + the exact SQL query |
| 🔍 Search All Tables | Find a value across your entire database (⌘K / Ctrl+K) |
| 🪟 Three-Pane Workbench | Schema browser · conversation · Row Inspector |
| 🔎 Row Inspector | Click any result row to expand it; foreign keys become clickable links |
| 🕘 Query History | Per-session panel of every question asked; click to jump back to that turn |
| 📋 Interactive Tables | Sort, filter, paginate results with dark/light theme |
| 💾 Export Sessions | Save your entire chat session as a formatted HTML file with hashes + timestamps |
| 🖥️ Install as App | PWA support — install as a standalone desktop app from Chrome/Edge/Brave |
Ask a question in plain English — the LLM writes parameterised read-only SQL, runs it, and returns results you can sort, filter, and export.
Schema browser & query history
Browse all tables, columns, types, and row counts in the left pane. Query history lives at the bottom — click any entry to jump back.
Row Inspector
Click any result row to expand it. Foreign key references become navigable links — follow relationships without writing another query.
🤖 LLM Setup
yourSQLfriend requires a local LLM running before you launch. Set one up first:
Option A: Ollama
ollama pull gemma4:26b
ollama serve
Option B: LM Studio
- Download LM Studio
- Load a model
- Start local server on port 1234
Once connected, the provider indicator in the top bar turns green.
Context window: The system prompt is token-heavy by design. A 16K context window is the minimum; 32K or more is strongly recommended for complex schemas.
LLM model sizes: Smallest → 4B | Mid → 8-9B | Large → 14B | Largest → 26-30B
Recommended LLM families: Qwen | Gemma | Mistral / Devstral
🚀 Quick Start
Prerequisite: Python 3.10+ must be installed, and your LLM must be running (see above).
Linux / macOS
curl -fsSL https://raw.githubusercontent.com/reisset/yourSQLfriend/main/install.sh | sh
Windows (PowerShell)
irm https://raw.githubusercontent.com/reisset/yourSQLfriend/main/install.ps1 | iex
Then launch from any terminal: yoursqlfriend
Options: yoursqlfriend --port 8080, --no-browser, --host 0.0.0.0
Note: The Flask server must be running for the app to work.
yoursqlfriendstarts it automatically — do not close the terminal.
Install with pipx (manual)
pipx install yoursqlfriend
From source (developers)
git clone https://github.com/reisset/yourSQLfriend.git
cd yourSQLfriend
./run.sh # Linux/macOS
run.bat # Windows
🛡️ Forensic Integrity
| Read-only guaranteed | SQL validation + SQLite mode=ro block all writes |
| Chain of custody | SHA256 hashes logged, timestamped exports |
| Audit logs | All queries logged to logs/ with daily rotation |
| Air-gap safe | Zero telemetry, works fully offline |
WAL files: The upload process excludes
.db-waland.db-shmfiles. Checkpoint your database first to ensure recent transactions are included.
⚠️ Known Limitations
- Model quality matters. Smaller models will produce incorrect or incomplete SQL on complex schemas. If results look wrong, the query is the first thing to check.
- SQLite only. No support for Postgres, MySQL, or other engines.
- Single database per session. You can replace the loaded database mid-session, but results from different databases are not cross-queryable.
- Complex queries may fail. Heavily nested subqueries, window functions, and non-standard SQLite extensions may exceed what the LLM generates reliably.
📂 Data Storage
All data lives in your home directory:
| Platform | Path |
|---|---|
| Linux / macOS | ~/.yourSQLfriend/ |
| Windows | %APPDATA%\.yourSQLfriend\ |
Contains uploads/, logs/, and sessions/.
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 yoursqlfriend-3.11.1.tar.gz.
File metadata
- Download URL: yoursqlfriend-3.11.1.tar.gz
- Upload date:
- Size: 743.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8cc4eacbc4b00b76c2b703adf9a7b92311f9831a020d58f60d4cc71eacaa8c66
|
|
| MD5 |
cdc790305de0bbee7d75b899e6ed085a
|
|
| BLAKE2b-256 |
56d1538347dd4f93ad36fbf2ab2fd0caeb43bbcae50e46aca8ffc40cd7cb6911
|
Provenance
The following attestation bundles were made for yoursqlfriend-3.11.1.tar.gz:
Publisher:
publish.yml on reisset/yourSQLfriend
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yoursqlfriend-3.11.1.tar.gz -
Subject digest:
8cc4eacbc4b00b76c2b703adf9a7b92311f9831a020d58f60d4cc71eacaa8c66 - Sigstore transparency entry: 1853649556
- Sigstore integration time:
-
Permalink:
reisset/yourSQLfriend@9b1d9757058934fb3ff58195cadf37d4394ca8d1 -
Branch / Tag:
refs/tags/v3.11.1 - Owner: https://github.com/reisset
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9b1d9757058934fb3ff58195cadf37d4394ca8d1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file yoursqlfriend-3.11.1-py3-none-any.whl.
File metadata
- Download URL: yoursqlfriend-3.11.1-py3-none-any.whl
- Upload date:
- Size: 754.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efcfe1007f99772ed514d2fd8e0124e0872b409c5ec3c63baf0fdcdd4c891956
|
|
| MD5 |
82b2e1976d4000d84a9905b14fc12ae2
|
|
| BLAKE2b-256 |
1a22acd8c46a31579fc4a73614881224c12b386427f9ca40bbaf5219c030668b
|
Provenance
The following attestation bundles were made for yoursqlfriend-3.11.1-py3-none-any.whl:
Publisher:
publish.yml on reisset/yourSQLfriend
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yoursqlfriend-3.11.1-py3-none-any.whl -
Subject digest:
efcfe1007f99772ed514d2fd8e0124e0872b409c5ec3c63baf0fdcdd4c891956 - Sigstore transparency entry: 1853649684
- Sigstore integration time:
-
Permalink:
reisset/yourSQLfriend@9b1d9757058934fb3ff58195cadf37d4394ca8d1 -
Branch / Tag:
refs/tags/v3.11.1 - Owner: https://github.com/reisset
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9b1d9757058934fb3ff58195cadf37d4394ca8d1 -
Trigger Event:
push
-
Statement type: