Skip to main content

Local-first paper manager with semantic search and LLM reasoning

Project description

📚 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
  • 📊 Smart Organization: Automatic metadata extraction and file naming
  • 🔄 Incremental Updates: Only processes new papers
  • 📂 Duplicate Detection: SHA256-based deduplication

Installation

# Install via pip
pip install lemma-ai

# Or with pipx (recommended for CLI tools)
pipx install lemma-ai

Quick Start

# Scan your papers directory
lemma scan ~/Documents/Papers

# List indexed papers
lemma list

# Search by keyword
lemma search "machine learning"

# Generate embeddings for semantic search (runs locally)
lemma embed

# Organize files with smart renaming
lemma organize --dry-run

# Verify database integrity
lemma verify

Optional: AI Features

For AI-powered Q&A, set up an API key (completely optional):

# Set environment variable
export GROQ_API_KEY="your_key_here"

# Or create .env file
echo "GROQ_API_KEY=your_key_here" > .env

# Ask questions across your library
lemma ask "What are the main approaches to polyp segmentation?"

Get free API keys:

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

Requirements

  • Python 3.10 or higher
  • macOS (Linux/Windows support coming soon)
  • ~500MB disk space for embedding models

Privacy

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

Commands

Command Description
lemma scan <dir> Scan directory for PDFs
lemma list List all indexed papers
lemma search <query> Search papers by keyword
lemma info <id> Show paper details
lemma embed Generate embeddings (local)
lemma ask <question> Ask questions (requires API key)
lemma organize Rename files based on metadata
lemma verify Check database integrity

License

MIT License - see LICENSE file for details

Support

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

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

lemma_ai-0.1.0.tar.gz (37.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lemma_ai-0.1.0-py3-none-any.whl (39.5 kB view details)

Uploaded Python 3

File details

Details for the file lemma_ai-0.1.0.tar.gz.

File metadata

  • Download URL: lemma_ai-0.1.0.tar.gz
  • Upload date:
  • Size: 37.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for lemma_ai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 da5acf57471c56d6dbfd8e5087fe719504c50f9101e5794d25bbfa0fe61955bd
MD5 99f4860227b94e28dd70dcf7ef9aa16d
BLAKE2b-256 884d19199cccab76f279b0fef77ac5adab51846e50c43df8fff1d629d3697d5d

See more details on using hashes here.

File details

Details for the file lemma_ai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: lemma_ai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 39.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for lemma_ai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4eec2b64ff0f05c282657115cd84e233c766541774fa3ce2bf7d5785f8e71c26
MD5 484d8c434c37f0149eba0d6351d5fccc
BLAKE2b-256 06895a7b04e469dc1aef2f52362c4d8902046ab308aeb924346acaf07a2e650a

See more details on using hashes here.

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