An open API service indexing awesome lists of open source software.

https://github.com/jltk/briefgeist

Privacy-first desktop app for scanning, understanding and replying to letters.
https://github.com/jltk/briefgeist

automation document-analysis local-llm ocr python tesseract

Last synced: 5 months ago
JSON representation

Privacy-first desktop app for scanning, understanding and replying to letters.

Awesome Lists containing this project

README

          

# Briefgeist

[![license: GPL](https://img.shields.io/badge/license-GPLv3-blue.svg)](LICENSE)
[![python: 3.9+](https://img.shields.io/badge/python-3.9%2B-important.svg)](https://www.python.org/)

*v0.1.0-preview*

**Briefgeist** is a privacy-first, local desktop assistant for automating the reading, analysis, and response of scanned physical letters.

1. **Watcher service** (Watchdog) for real-time monitoring of incoming scans
2. **OCR module** (Tesseract) for text extraction from PDF scans
3. **Analysis Engine** (local LLM via Ollama โ€œgemma:7bโ€)

## ๐Ÿ“ฆ Installation

```bash
git clone https://github.com/jltk/briefgeist.git
cd briefgeist
python -m venv venv
source venv/bin/activate # bzw. venv\Scripts\activate on Windows
pip install -r requirements.txt
```
---

## โœ… Features

- ๐Ÿ–จ๏ธ Scan letters (via NAPS2)
- ๐Ÿง  Analyze content with a local LLM (Gemma 7B via Ollama)
- ๐Ÿ—ฃ Text-to-speech playback (Coqui TTS)
- ๐Ÿ“„ Suggest replies or fill forms
- ๐Ÿ–ฅ๏ธ Simple GUI (NiceGUI)
- ๐Ÿ’ป 100% offline, no cloud or telemetry

| Feature | Status |
|--------------------|--------|
| OCR (ocrmypdf) | โœ… |
| Text extraction | โœ… |
| Local LLM (Ollama) | โœ… |
| TTS voice output | โœ… |
| GUI (NiceGUI) | โœ… |
| Multi-page scan | โœ… |

---

## ๐Ÿ›  Setup (Windows 10+)

### 1. Install System Dependencies

- [Python 3.11](https://www.python.org/downloads/release/python-3119/)
- [Visual Studio Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/)
โ†’ Select: "Desktop development with C++"
- [Tesseract OCR (UB Mannheim)](https://github.com/UB-Mannheim/tesseract/wiki)
- [SumatraPDF](https://www.sumatrapdfreader.org/download-free-pdf-viewer.html)
- [NAPS2 (scanner frontend)](https://www.naps2.com)
- [Ollama (LLM runtime)](https://ollama.com)

### 2. Clone This Repo

```bash
git clone https://github.com/yourname/briefgeist.git
cd briefgeist
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
```

### 3. Start Ollama

```bash
ollama run gemma:7b
```

---

## ๐Ÿš€ Usage

### 1. Scan

Use NAPS2 to scan a letter as PDF into the `input/` folder.

### 2. Process with Watcher

```bash
python watcher/watcher.py
```

This will:

* OCR the scanned PDF
* Extract text
* Save `.txt` in `output/`
* Archive the original in `processed/`

### 3. Open GUI

```bash
python ui/app.py
```

* Upload the `.txt`
* Click "Analyze"
* Click "Read Aloud"

---

## ๐Ÿงช Testing

| Test Step | Expected Result |
| -------------------- | ----------------------------------- |
| Drop PDF in `input/` | Processed + `.txt` created |
| Run GUI | Interface appears with input fields |
| Analyze | LLM provides meaningful summary |
| Read Aloud | Voice plays locally |
| Print PDF (optional) | Sent to default printer |

---

## ๐Ÿ—‚ Project Structure

```
briefgeist/
โ”œโ”€โ”€ core/
โ”œโ”€โ”€ ui/
โ”œโ”€โ”€ watcher/
โ”œโ”€โ”€ input/ โ† Drop PDFs here
โ”œโ”€โ”€ output/ โ† Get your results here
โ”œโ”€โ”€ processed/ โ† Archived input
```

---

## ๐Ÿ” Security & Privacy

Briefgeist runs fully offline. No cloud calls. No telemetry. No account required.

---

## ๐Ÿ“ฆ Next Milestones

* [ ] Improve UI/UX
* [ ] Form field detection (insurance, invoices, etc.)
* [ ] Auto-response generation as PDF
* [ ] One-click print & archive
* [ ] Portable GUI build (PyInstaller)

---

## ๐Ÿ’ฌ License

GPLv3