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.1.tar.gz (518.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.1-py3-none-any.whl (531.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yoursqlfriend-3.8.1.tar.gz
  • Upload date:
  • Size: 518.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.1.tar.gz
Algorithm Hash digest
SHA256 3b2fa512d7253654ae92acddcf42fad582f4fb18af04e93c05ce2d158f0d7fe4
MD5 814a2dc3aeb878cbf55d76477024dc2f
BLAKE2b-256 9af3397534f85c1d38a943f6b684d1e6992020a889de16a59816851fcbe77f14

See more details on using hashes here.

Provenance

The following attestation bundles were made for yoursqlfriend-3.8.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: yoursqlfriend-3.8.1-py3-none-any.whl
  • Upload date:
  • Size: 531.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4f54194e64e03c056d2da9d85990e32ee764c7e13271f4f3aa053b171c6f2626
MD5 e7d5939c0b1ad0578b4cd877d1dc57fc
BLAKE2b-256 497371ea4803e75ca5eb9ea8f0b096c80002cf1028cff0115f0de46dbdb6d5b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for yoursqlfriend-3.8.1-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