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 analysis on a single workstation.
✨ 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 — the forensic atelier layout |
| 🔎 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 |
The Flask server must be running for the app to work. Use
./run.shto start it.
🚀 Quick Start
Prerequisite: Python 3.10+ must be installed.
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
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
🤖 LLM Setup
yourSQLfriend requires a local LLM. Set one up before you start:
Option A: Ollama (Recommended)
ollama pull llama3.2
ollama serve
Option B: LM Studio
- Download LM Studio
- Load a model
- Start local server on port 1234
Fair Warning: The system prompt required to get better SQL query results is token-heavy. For optimal usage, a ~16 000 tokens context window is MINIMUM, and ~32 000 or more is highly recommended.
Recommended models: Smallest => Qwen3:4B | Mid-Size => Qwen3:8B | Large => Ministral-3:14B OR Qwen3:14B | Largest => Qwen3-coder:30B
🛡️ 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 |
Note: The upload process excludes WAL files (
.db-wal,.db-shm). Checkpoint your database first to include recent transactions.
📂 Data Storage
All data lives in your home directory:
| Platform | Path |
|---|---|
| Linux / macOS | ~/.yourSQLfriend/ |
| Windows | %APPDATA%\.yourSQLfriend\ |
Contains uploads/, logs/, and sessions/.
🧰 Tech Stack
Flask, Vanilla JS, CSS, HTML, SQLite, PWA, local LLM (OpenAI-compatible API)
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 yoursqlfriend-3.9.0.tar.gz.
File metadata
- Download URL: yoursqlfriend-3.9.0.tar.gz
- Upload date:
- Size: 738.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
945b2c4177176032866e78b1c144718e7a7c11fe8803f169620c309d8a2ba77d
|
|
| MD5 |
a99281f11bf70695b1226d14c5269f63
|
|
| BLAKE2b-256 |
f83813d4c9ff318a1e0b22a6269bf2412729964d431f6cb0cde5a8fafe94c1c0
|
Provenance
The following attestation bundles were made for yoursqlfriend-3.9.0.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.9.0.tar.gz -
Subject digest:
945b2c4177176032866e78b1c144718e7a7c11fe8803f169620c309d8a2ba77d - Sigstore transparency entry: 1363059198
- Sigstore integration time:
-
Permalink:
reisset/yourSQLfriend@a5c0af0a8b0f819cca09f635a4418fe543d3f12b -
Branch / Tag:
refs/tags/v3.9.0 - Owner: https://github.com/reisset
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a5c0af0a8b0f819cca09f635a4418fe543d3f12b -
Trigger Event:
push
-
Statement type:
File details
Details for the file yoursqlfriend-3.9.0-py3-none-any.whl.
File metadata
- Download URL: yoursqlfriend-3.9.0-py3-none-any.whl
- Upload date:
- Size: 749.6 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 |
0bfceef6e4cc3021db12312047b67cc75db3d4a411429c547f682e04bc6dc4f5
|
|
| MD5 |
553d69f0be5ae2f538b377dd6e9746f8
|
|
| BLAKE2b-256 |
3f63306aa6372d14e659c417e707c013a7f811adbd7a43136940c6323ae42c80
|
Provenance
The following attestation bundles were made for yoursqlfriend-3.9.0-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.9.0-py3-none-any.whl -
Subject digest:
0bfceef6e4cc3021db12312047b67cc75db3d4a411429c547f682e04bc6dc4f5 - Sigstore transparency entry: 1363059290
- Sigstore integration time:
-
Permalink:
reisset/yourSQLfriend@a5c0af0a8b0f819cca09f635a4418fe543d3f12b -
Branch / Tag:
refs/tags/v3.9.0 - Owner: https://github.com/reisset
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a5c0af0a8b0f819cca09f635a4418fe543d3f12b -
Trigger Event:
push
-
Statement type: