Rushu-Tushu/Lens

Local AI desktop assistant that observes your active window, understands on-screen content, and provides instant contextual assistance using Electron, Python, OCR, and Ollama.

HTML

5

10 commits

updated Sep 30, 2026

See the code

See what people are saying

SourceMessageScoreDate

Tired of taking screenshots every time I need an AI assistant, so I built Lens, an assistant that understands your screen and provides help without recording everything you do. (r/SideProject)

Hi everyone, I have been working on a project called **Lens**, an open-source desktop AI assistant for Windows and Linux, and I wanted to share it here. The idea came from my own daily struggles: staring at compiler errors, trying to interpret complicated charts, or reading something I did not…

0

Oct 9, 2026

README

Lens

The Anti-Recall: On-Demand, Zero-Surveillance, 100% Local Screen Intelligence.

Lens Logo

Platform Privacy Ollama License


What is Lens?

Lens is a lightweight, privacy-first desktop overlay that understands whatever is visible on your screen without transmitting data to external servers.

When you encounter a compiler error, need complex code explained, or want a fast summary of documentation, press Alt + L. Lens captures the active application window in memory, runs inference locally using Ollama, and streams structured solutions directly over your workspace in real time.

Lens operates under three core principles:

  • No background recording: Screen capture only activates when explicitly triggered by your keyboard shortcut.
  • Zero cloud dependencies: Every token and pixel is processed on your local hardware.
  • Ephemeral memory: Captured screen frames live exclusively in RAM during model inference and are discarded immediately afterward.

Comparison: Lens vs Windows Recall vs Cloud AI

FeatureLensWindows RecallCloud AI (Copilot / ChatGPT)
Cloud Data UploadNone (100% Local)Local storageYes (Transmits to cloud)
Continuous RecordingNo (On-demand only)Yes (Logs every few seconds)No (Manual input)
Disk FootprintZero (RAM only)Heavy (Multi-gigabyte database)Negligible
Offline OperationFull (No network needed)YesNo (Internet required)
Screen Context ChatInteractive Multi-TurnSearch onlyManual screenshot attachment
Code and Error Fixes1-Click CopyableNoYes
Software LicenseOpen Source (MIT)Closed SourceClosed Source

Features

  • Global Summon (Alt + L): Analyzes the current active application window without stealing focus or switching contexts.
  • Area Snip Mode (Alt + Shift + S): Drag a rectangular bounding box across any screen region to isolate specific terminal logs, stack traces, or UI designs with automatic high-DPI scaling.
  • Direct Multimodal Vision: Native integration with local vision models such as qwen3-vl:8b, qwen2.5-vl, gemma-vl, and llama3.2-vision. Screen pixels are passed directly to Ollama without requiring optical character recognition software.
  • Ultra-Fast Fast Mode: Automatically suppresses unnecessary internal thinking loops on vision models, reducing time-to-first-token from 30 seconds down to approximately 1.2 seconds.
  • In-HUD Model Switcher: Switch between installed Ollama models directly from the title bar dropdown without restarting the application.
  • Persistent Conversation History: Ask follow-up questions regarding the current screen context with a persistent message thread.
  • Collapsible Reasoning Drawer: Inspect internal reasoning traces when using thinking models like DeepSeek R1 inside an expandable drawer before reading the final answer.
  • Optical Character Recognition Fallback: Automatically falls back to Tesseract OCR when text-only models like llama3.2:3b are selected.
  • Desktop Command HUD: Translucent glassmorphic interface with Markdown rendering, syntax highlighting for code blocks, and 1-click copy buttons.
  • Hardware Privacy Killswitch (Ctrl + Shift + P): Instantly pauses or resumes all screen capture capabilities.

Keyboard Shortcuts

ShortcutAction
Alt + LSummon Lens on the active application window
Alt + Shift + SActivate Snip mode to select a screen area
Ctrl + Shift + PToggle Privacy mode (Enable or disable capture daemon)
EscClose or dismiss the HUD overlay
EnterSubmit a follow-up query in the chat bar

Quickstart

Prerequisites

  1. Python 3.10 or later
  2. Node.js 20 or later
  3. Ollama installed and running locally

Option 1: 1-Click Automated Setup (Windows)

Clone the repository and run the automated setup script:

git clone https://github.com/RuSapkal69/Personal_AI_Assistant.git
cd Personal_AI_Assistant

# Pull your preferred vision model
ollama pull qwen3-vl:8b

# Run automated setup
setup.bat

# Launch Lens
run.bat

The run.bat launcher automatically verifies dependencies, starts the Ollama service if idle, launches the Python observer daemon, and opens the desktop HUD.

Option 2: Manual Setup (All Platforms)

  1. Set up the Python Observer daemon:
cd assistant-observer
python -m venv venv

# Windows:
venv\Scripts\activate
# macOS / Linux:
# source venv/bin/activate

pip install -r requirements.txt
cp .env.example .env
  1. Set up the Electron desktop client:
cd ../assistant-electron
npm install
cp .env.example .env
  1. Launch Lens:
npm start

The Electron client automatically starts and manages the background Python observer daemon.


Architecture

Lens uses a modular, three-tier local architecture:

+-----------------------------------------------------------+
|                 Electron Desktop Client                   |
|   - Global Shortcuts (Alt+L, Alt+Shift+S)                 |
|   - Glassmorphic Streaming HUD (popup.html)               |
|   - Interactive Area Snip Selector (snip.html)            |
+-----------------------------+-----------------------------+
                              | Server-Sent Events (SSE)
                              v
+-----------------------------------------------------------+
|              Flask Observer Daemon (Port 5050)            |
|   - Active Window Discovery (win32gui / pygetwindow)      |
|   - Pixel Capture (mss, auto-scaled to 1920px max)        |
|   - Dual-Engine Router (Multimodal Base64 / OCR Fallback) |
|   - Multi-Turn Session Memory                             |
+-----------------------------+-----------------------------+
                              | HTTP Streaming (/api/chat)
                              v
+-----------------------------------------------------------+
|                    Ollama Local Server                    |
|   - Multimodal Vision: qwen3-vl, qwen2.5-vl, gemma-vl     |
|   - Text Reasoning: deepseek-r1, llama3.2                 |
+-----------------------------------------------------------+

Privacy and Security Commitments

  1. Loopback Binding: All client-daemon communication is strictly bound to 127.0.0.1.
  2. In-Memory Processing: Screenshots and extracted text exist only in RAM during model inference and are discarded immediately. No image files are written to disk unless explicitly enabled in configuration.
  3. Token Authentication: The desktop client and background daemon authenticate every HTTP and SSE request using a shared local token (x-assistant-token).
  4. Zero Telemetry: Lens contains no tracking SDKs, analytical collectors, or external network calls.

Configuration

Both components can be configured through environment variables:

assistant-observer/.env

ASSISTANT_TOKEN=local_secret_token
OLLAMA_BASE_URL=http://127.0.0.1:11434
OLLAMA_MODEL=qwen3-vl:8b
PORT=5050

assistant-electron/.env

ASSISTANT_TOKEN=local_secret_token
ASSISTANT_OBSERVER=http://127.0.0.1:5050

License

Distributed under the MIT License. See LICENSE for details.

artificial-intelligence
automation
computer-vision
desktop-assistant
electron-app
flask
llm
ocr
ollama
python
tesseract

Rushu-Tushu/Lens

Local AI desktop assistant that observes your active window, understands on-screen content, and provides instant contextual assistance using Electron, Python, OCR, and Ollama.

HTML

5

10 commits

updated Sep 30, 2026

See the code

See what people are saying

SourceMessageScoreDate

Tired of taking screenshots every time I need an AI assistant, so I built Lens, an assistant that understands your screen and provides help without recording everything you do. (r/SideProject)

Hi everyone, I have been working on a project called **Lens**, an open-source desktop AI assistant for Windows and Linux, and I wanted to share it here. The idea came from my own daily struggles: staring at compiler errors, trying to interpret complicated charts, or reading something I did not…

0

Oct 9, 2026

README

Lens

The Anti-Recall: On-Demand, Zero-Surveillance, 100% Local Screen Intelligence.

Lens Logo

Platform Privacy Ollama License


What is Lens?

Lens is a lightweight, privacy-first desktop overlay that understands whatever is visible on your screen without transmitting data to external servers.

When you encounter a compiler error, need complex code explained, or want a fast summary of documentation, press Alt + L. Lens captures the active application window in memory, runs inference locally using Ollama, and streams structured solutions directly over your workspace in real time.

Lens operates under three core principles:

  • No background recording: Screen capture only activates when explicitly triggered by your keyboard shortcut.
  • Zero cloud dependencies: Every token and pixel is processed on your local hardware.
  • Ephemeral memory: Captured screen frames live exclusively in RAM during model inference and are discarded immediately afterward.

Comparison: Lens vs Windows Recall vs Cloud AI

FeatureLensWindows RecallCloud AI (Copilot / ChatGPT)
Cloud Data UploadNone (100% Local)Local storageYes (Transmits to cloud)
Continuous RecordingNo (On-demand only)Yes (Logs every few seconds)No (Manual input)
Disk FootprintZero (RAM only)Heavy (Multi-gigabyte database)Negligible
Offline OperationFull (No network needed)YesNo (Internet required)
Screen Context ChatInteractive Multi-TurnSearch onlyManual screenshot attachment
Code and Error Fixes1-Click CopyableNoYes
Software LicenseOpen Source (MIT)Closed SourceClosed Source

Features

  • Global Summon (Alt + L): Analyzes the current active application window without stealing focus or switching contexts.
  • Area Snip Mode (Alt + Shift + S): Drag a rectangular bounding box across any screen region to isolate specific terminal logs, stack traces, or UI designs with automatic high-DPI scaling.
  • Direct Multimodal Vision: Native integration with local vision models such as qwen3-vl:8b, qwen2.5-vl, gemma-vl, and llama3.2-vision. Screen pixels are passed directly to Ollama without requiring optical character recognition software.
  • Ultra-Fast Fast Mode: Automatically suppresses unnecessary internal thinking loops on vision models, reducing time-to-first-token from 30 seconds down to approximately 1.2 seconds.
  • In-HUD Model Switcher: Switch between installed Ollama models directly from the title bar dropdown without restarting the application.
  • Persistent Conversation History: Ask follow-up questions regarding the current screen context with a persistent message thread.
  • Collapsible Reasoning Drawer: Inspect internal reasoning traces when using thinking models like DeepSeek R1 inside an expandable drawer before reading the final answer.
  • Optical Character Recognition Fallback: Automatically falls back to Tesseract OCR when text-only models like llama3.2:3b are selected.
  • Desktop Command HUD: Translucent glassmorphic interface with Markdown rendering, syntax highlighting for code blocks, and 1-click copy buttons.
  • Hardware Privacy Killswitch (Ctrl + Shift + P): Instantly pauses or resumes all screen capture capabilities.

Keyboard Shortcuts

ShortcutAction
Alt + LSummon Lens on the active application window
Alt + Shift + SActivate Snip mode to select a screen area
Ctrl + Shift + PToggle Privacy mode (Enable or disable capture daemon)
EscClose or dismiss the HUD overlay
EnterSubmit a follow-up query in the chat bar

Quickstart

Prerequisites

  1. Python 3.10 or later
  2. Node.js 20 or later
  3. Ollama installed and running locally

Option 1: 1-Click Automated Setup (Windows)

Clone the repository and run the automated setup script:

git clone https://github.com/RuSapkal69/Personal_AI_Assistant.git
cd Personal_AI_Assistant

# Pull your preferred vision model
ollama pull qwen3-vl:8b

# Run automated setup
setup.bat

# Launch Lens
run.bat

The run.bat launcher automatically verifies dependencies, starts the Ollama service if idle, launches the Python observer daemon, and opens the desktop HUD.

Option 2: Manual Setup (All Platforms)

  1. Set up the Python Observer daemon:
cd assistant-observer
python -m venv venv

# Windows:
venv\Scripts\activate
# macOS / Linux:
# source venv/bin/activate

pip install -r requirements.txt
cp .env.example .env
  1. Set up the Electron desktop client:
cd ../assistant-electron
npm install
cp .env.example .env
  1. Launch Lens:
npm start

The Electron client automatically starts and manages the background Python observer daemon.


Architecture

Lens uses a modular, three-tier local architecture:

+-----------------------------------------------------------+
|                 Electron Desktop Client                   |
|   - Global Shortcuts (Alt+L, Alt+Shift+S)                 |
|   - Glassmorphic Streaming HUD (popup.html)               |
|   - Interactive Area Snip Selector (snip.html)            |
+-----------------------------+-----------------------------+
                              | Server-Sent Events (SSE)
                              v
+-----------------------------------------------------------+
|              Flask Observer Daemon (Port 5050)            |
|   - Active Window Discovery (win32gui / pygetwindow)      |
|   - Pixel Capture (mss, auto-scaled to 1920px max)        |
|   - Dual-Engine Router (Multimodal Base64 / OCR Fallback) |
|   - Multi-Turn Session Memory                             |
+-----------------------------+-----------------------------+
                              | HTTP Streaming (/api/chat)
                              v
+-----------------------------------------------------------+
|                    Ollama Local Server                    |
|   - Multimodal Vision: qwen3-vl, qwen2.5-vl, gemma-vl     |
|   - Text Reasoning: deepseek-r1, llama3.2                 |
+-----------------------------------------------------------+

Privacy and Security Commitments

  1. Loopback Binding: All client-daemon communication is strictly bound to 127.0.0.1.
  2. In-Memory Processing: Screenshots and extracted text exist only in RAM during model inference and are discarded immediately. No image files are written to disk unless explicitly enabled in configuration.
  3. Token Authentication: The desktop client and background daemon authenticate every HTTP and SSE request using a shared local token (x-assistant-token).
  4. Zero Telemetry: Lens contains no tracking SDKs, analytical collectors, or external network calls.

Configuration

Both components can be configured through environment variables:

assistant-observer/.env

ASSISTANT_TOKEN=local_secret_token
OLLAMA_BASE_URL=http://127.0.0.1:11434
OLLAMA_MODEL=qwen3-vl:8b
PORT=5050

assistant-electron/.env

ASSISTANT_TOKEN=local_secret_token
ASSISTANT_OBSERVER=http://127.0.0.1:5050

License

Distributed under the MIT License. See LICENSE for details.

artificial-intelligence
automation
computer-vision
desktop-assistant
electron-app
flask
llm
ocr
ollama
python
tesseract

Significant stargazers

Avinash Kumar Deepak

0 followers · starred Sep 2026