LiveRecall
repository·main·Indexed 41 days ago
https://github.com/vedankpurohit/liverecallAn open-source screen recall application featuring semantic search, OCR, and image embeddings to find past screenshots using natural language queries. It operates as a privacy-first, local-only system with a FastAPI-based REST API and a system tray interface for macOS and Windows.
What's inside LiveRecall
- LiveRecall is designed as a privacy-first, local-only application. It operates entirely on your local machine without requiring internet access for its core functionalities. Once initial dependencies are downloaded, all processing occurs offline, ensuring no data is transmitted to remote servers or accessed by the developers.
How image encryption and security works in LiveRecall
mainLiveRecall secures captured screenshots using a local encryption mechanism:
- Encryption: Screenshots are encrypted using a password provided by the user.
- Password Management: The password is not stored by the application; you must remember it to access your data.
- Decryption: Images are only decrypted temporarily during retrieval for viewing.
- Secure Deletion: Decrypted images are promptly deleted after use to prevent unauthorized access.
Understand LiveRecall search modes
mainLiveRecall uses a multi-modal approach to find screenshots. You can specify the following search modes:
- Auto (Hybrid): The default mode. It combines all search methods using Reciprocal Rank Fusion (RRF) for the best results.
- Image: Performs visual similarity search (e.g., searching for "cat on a keyboard").
- Text Fuzzy: Performs fast text matching with typo tolerance using trigram search.
- Text Semantic: Uses embeddings to find screenshots containing text with similar meaning to your query.
Build LiveRecall distributable packages
mainUse the provided build scripts to create
.dmg(macOS) or.exe(Windows) installers. The output is placed in thedist/directory.# One-command build (installs deps, builds web, creates package) uv run python scripts/build_release.py # Quick build (skip web rebuild if exists) uv run python scripts/build_release.py --quick# One-command build (installs deps, builds web, creates package) uv run python scripts/build_release.py # Quick build (skip web rebuild if exists) uv run python scripts/build_release.py --quickSet up LiveRecall for Development
mainTo run LiveRecall from source, ensure you have Python 3.10+, Node.js 18+, and uv installed. Follow these steps:
- Clone the repository and enter the directory.
- Use
uv syncto install Python dependencies and create a virtual environment (.venv). - Navigate to the
webdirectory and runnpm installto set up the web UI.
# Clone the repository git clone https://github.com/VedankPurohit/LiveRecall.git cd LiveRecall # Install Python dependencies (creates .venv automatically) uv sync # Install web UI dependencies cd web && npm install && cd ..# Clone the repository git clone https://github.com/VedankPurohit/LiveRecall.git cd LiveRecall # Install Python dependencies (creates .venv automatically) uv sync # Install web UI dependencies cd web && npm install && cd ..Run LiveRecall in different modes
mainDepending on your needs, you can run the application in three different modes:
- System Tray App (Recommended): Launches the full menu bar application.
- API Server Only: Runs only the backend service.
- Web UI Development: Runs the API in one terminal and the Next.js web interface in another.
# Option 1: System Tray App uv run python main.py # Option 2: API Server Only uv run python main.py --api-only # Option 3: Web UI Development # Terminal 1: Start API uv run python main.py --api-only # Terminal 2: Start web UI cd web && npm run devIf running in development mode, the web UI is accessible at
http://localhost:3000.# Option 1: System Tray App uv run python main.py # Option 2: API Server Only uv run python main.py --api-only # Option 3: Web UI Development # Terminal 1: Start API uv run python main.py --api-only # Terminal 2: Start web UI cd web && npm run devInstall LiveRecall on macOS (Apple Silicon)
mainTo use the pre-built application on macOS:
- Download the latest DMG from the Releases page.
- Open the DMG and drag LiveRecall to your Applications folder.
- Launch the app from your Applications.
- Important: You must grant Screen Recording permission in System Settings > Privacy & Security > Screen Recording.
Note: On the first launch, the app will automatically download approximately 530MB of AI models (Image embedding ~400MB and Text embedding ~130MB).
Configure LiveRecall settings
mainSettings can be adjusted via the Web UI or through the API. Available configuration keys include:
- Capture Mode:
normal,games,fast,coding,video,presentation - Capture Interval: 1-10 seconds
- Quality: 50-100%
- Safe Mode: Filter sensitive content from search
- Auto-compress: Compress old screenshots
- OCR Enabled: Enable/disable text extraction (enabled by default)
- Search Mode:
auto(hybrid),image,text_fuzzy,text_semantic
- Capture Mode:
How TrayApp manages setup and migrations
mainUpon startup,
TrayAppperforms an enhanced setup check by querying the/setup/enhanced-statusendpoint. It automatically opens the web UI setup page ({WEB_UI_URL}/setup) if any of the following conditions are met:- Version Change: The
needs_setupflag is true, indicating a version change was detected (e.g.,last_seen_version!=current_version). - Missing CLIP Model: The
clip_statusis reported asnot_downloaded, which is required for search functionality. - OCR Migration: The
migration_statusindicatesneeds_migrationis true (e.g., there are screenshots without OCR that need processing).
- Version Change: The
Understand the LiveRecall API workflow
mainThe LiveRecall API manages screen recording, semantic synchronization, and natural language search. The typical developer/user workflow follows these steps:
- Start Recording: Use
POST /api/v1/recording/startto begin capturing screenshots automatically when the screen changes. Note that screenshots are saved but not immediately processed to keep the recording lightweight. - Sync Data: When you are ready to enable semantic search, run
POST /api/v1/sync/start. This generates CLIP embeddings for the captured screenshots. - Search: Use
POST /api/v1/searchto find screenshots using natural language queries.
Model Management: The CLIP model is loaded lazily upon the first sync or search operation and automatically unloads after 5 minutes of inactivity to conserve system memory.
# Typical Workflow Summary # 1. POST /api/v1/recording/start # 2. POST /api/v1/sync/start # 3. POST /api/v1/search- Start Recording: Use
Run the LiveRecall API in development
mainYou can run the FastAPI application directly using
uvicorn. By default, it runs on127.0.0.1:8742with reload enabled and warning-level logging to reduce noise.uvicorn api.main:app --reload --port 8742Reference the LiveRecall API endpoints
mainThe backend provides a FastAPI-based REST API. The full interactive documentation is available at
http://localhost:8742/docswhen the server is running.Endpoint Method Description /api/v1/statusGET System status /api/v1/recording/startPOST Start capture /api/v1/recording/stopPOST Stop capture /api/v1/sync/startPOST Start embedding/OCR sync /api/v1/searchPOST Hybrid search (supports search_modeparameter)/api/v1/screenshotsGET List screenshots /api/v1/screenshots/{id}/ocrGET Get OCR text for a screenshot