Skip to main content

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.

Version License Python Flask

yourSQLfriend


✨ 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 in one click
📊 Chart Visualization One-click bar, line, pie, or scatter charts on any query result
🗺️ Schema Diagram Interactive ER diagram with drag, zoom, pan, and click-to-highlight
📋 Interactive Tables Sort, filter, paginate results with dark/light theme
💾 Export Sessions Save your entire chat session as a formatted HTML file
🖥️ 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.sh to 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

  1. Download LM Studio
  2. Load a model
  3. 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)


Apache 2.0 — see LICENSE and NOTICE

Built by Reisset

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

yoursqlfriend-3.8.3.tar.gz (807.4 kB view details)

Uploaded Source

Built Distribution

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

yoursqlfriend-3.8.3-py3-none-any.whl (819.6 kB view details)

Uploaded Python 3

File details

Details for the file yoursqlfriend-3.8.3.tar.gz.

File metadata

  • Download URL: yoursqlfriend-3.8.3.tar.gz
  • Upload date:
  • Size: 807.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for yoursqlfriend-3.8.3.tar.gz
Algorithm Hash digest
SHA256 3562e10f5c6353fea5e22ad923fa46cee16027c5a2aafdfd9da4e37badcfa5ac
MD5 e990308e5f73beb9aa352def7b274202
BLAKE2b-256 f09a4a168619a287aaa141b41842f37a25b279ff518c7fe0b4e11167ebf8ea8d

See more details on using hashes here.

Provenance

The following attestation bundles were made for yoursqlfriend-3.8.3.tar.gz:

Publisher: publish.yml on reisset/yourSQLfriend

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file yoursqlfriend-3.8.3-py3-none-any.whl.

File metadata

  • Download URL: yoursqlfriend-3.8.3-py3-none-any.whl
  • Upload date:
  • Size: 819.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for yoursqlfriend-3.8.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5e027330858151215fa16ec80c6a8b237349a99400db32048416f2346f5520ad
MD5 c452ae2e5e4a52136c71eb49e1c0fe1c
BLAKE2b-256 adeb2319eee924306761b586f2e4038f0a61996cf2da7112dfed19e6e658e6a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for yoursqlfriend-3.8.3-py3-none-any.whl:

Publisher: publish.yml on reisset/yourSQLfriend

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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