Skip to main content

📚 Lemma - Local-First Research Paper Manager

A privacy-first research paper manager with local semantic search and optional AI-powered insights.

Python 3.10+ License: MIT

✨ Features

  • 🔒 Privacy-First: All papers stored locally, no cloud uploads
  • 🚀 Fast Semantic Search: Local vector search across all papers
  • 🤖 AI Q&A (Optional): Ask questions using cloud LLMs
  • 📊 Auto-Processing: One command to scan, rename, and embed
  • 🔄 Incremental Updates: 70-90% faster re-embedding
  • 📂 Smart Cleanup: Automatically removes deleted papers from database
  • 👀 Watch Mode: Auto-process new papers as they're added

🚀 Quick Start

1. Installation

pip install -r requirements.txt

2. Set Your Papers Folder (One-Time Setup)

# Set default papers directory and process all papers
lemma sync ~/Papers --set-default

# That's it! Your papers are now:
# ✓ Scanned and indexed
# ✓ Renamed with metadata
# ✓ Embedded for semantic search
# ✓ Ready for questions

3. Add New Papers (Automatic)

Option A: Manual Sync

# Just drop PDFs into ~/Papers, then run:
lemma sync

Option B: Auto-Sync (Watch Mode)

# Start watching (leave running in terminal)
lemma sync --watch

# Now just drop PDFs into ~/Papers
# They're automatically processed in seconds!

4. Query Your Papers

lemma ask "What are the main findings?"

📖 Common Workflows

First-Time Setup

# 1. Set your papers folder and sync everything
lemma sync ~/Papers --set-default

# 2. Query your papers
lemma ask "What is the main contribution?"

Daily Use

# Download new papers to ~/Papers, then:
lemma sync

# Or enable auto-processing:
lemma sync --watch  # Leave running

Browse Your Library

lemma list                    # List all papers
lemma search "transformers"   # Search by keyword
lemma show 5                  # Show paper details

🔧 Advanced Usage

Sync Options

lemma sync                    # Use default directory
lemma sync ~/Papers           # Specify directory
lemma sync --no-rename        # Skip automatic renaming
lemma sync --no-embed         # Skip embedding (faster)
lemma sync --watch            # Continuous monitoring

Manual Control (If Needed)

lemma scan ~/Papers           # Just scan (no rename/embed)
lemma organize                # Rename existing files
lemma embed                   # Generate embeddings only
lemma embed-status            # Check embedding coverage
lemma verify --remove         # Clean up missing files

🤖 AI Q&A Setup (Optional)

Set up an API key to enable question answering:

# Option 1: Environment variable
export GROQ_API_KEY="your_key_here"

# Option 2: .env file
echo "GROQ_API_KEY=your_key_here" > ~/.lemma/.env

# Then ask questions
lemma ask "What are the main approaches discussed?"

Get Free API Keys:

  • Groq - Fast and generous free tier (recommended)
  • Google Gemini - Alternative option

📋 Key Commands

Command Description
lemma sync Auto-process papers (scan + rename + embed)
lemma sync --watch Monitor folder and auto-process new papers
lemma list List all indexed papers
lemma ask <question> Ask questions across papers (requires API key)
lemma search <query> Search papers by keyword
lemma show <id> Show paper details
lemma embed-status Check embedding coverage

🔒 Privacy

  • All papers stay on your machine - never uploaded anywhere
  • Embeddings generated locally - no external API calls
  • Cloud APIs only for Q&A - and only if you configure them
  • Database stored locally at ~/.lemma/lemma.db

📦 Requirements

  • Python 3.10 or higher
  • ~500MB disk space for embedding models
  • Internet connection only for optional AI Q&A

License

MIT License - see LICENSE file for details

Support

  • Report issues: GitHub Issues
  • Questions: Open a discussion on GitHub

Metadata

Release files for lemma-ai 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lemma-ai 2.0.0
File Size Uploaded Provenance Actions
lemma_ai-2.0.0.tar.gz 68.0 kB Without provenance Details for lemma_ai-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lemma-ai 2.0.0
File Interpreter ABI Platform Actions
lemma_ai-2.0.0-py3-none-any.whl Python 3 none any Details for lemma_ai-2.0.0-py3-none-any.whl

Total release size: 142.3 kB

Release files / lemma_ai-2.0.0.tar.gz

Download URL lemma_ai-2.0.0.tar.gz
Size 68.0 kB
Tags Source
SHA-256 checksum
How to use checksums
691d77fcfc66eb1a9c8cd125c5965525922c085e0699caf3a96fd3b80bcbe786
BLAKE2b-256 checksum
How to use checksums
ab40581c686bddeac95762c927614ce024976e6dcf747c4d6a99dcf8fdccf33f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

Release files / lemma_ai-2.0.0-py3-none-any.whl

Download URL lemma_ai-2.0.0-py3-none-any.whl
Size 74.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
07bb46ceb57c9e7d03bbfbc6828c56f1498e5a0f638f912abb8ba982491ef48a
BLAKE2b-256 checksum
How to use checksums
522e5bed5a31a30db51c5b8b5f9a48b45f2d3d4bf06b72ef2960b3e98fdae968
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

Security for lemma-ai 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page