Local-first citation recommendation system
Project description
inCite
Write text. Get relevant papers from your library.
Overview
inCite is a local-first citation recommendation system. It indexes your Zotero library or a folder of PDFs and suggests relevant papers as you write. Everything runs on your machine -- no cloud account, no API keys, no data leaving your laptop.
- Local-first: Your papers and writing stay on your machine
- Works with what you have: Zotero library, a folder of PDFs, or a JSONL corpus
- Editor plugins: Obsidian, VS Code, Google Docs, and Microsoft Word
- Fine-tuned models: Citation-specific sentence transformers trained on 64K academic citation contexts
Quick Start
pip install incite-app
incite setup
The setup wizard auto-detects your Zotero library (or accepts a folder of PDFs), builds a search index, and verifies everything works.
Usage
Command Line
# Get recommendations for a passage
incite recommend "The relationship between CO2 emissions and global temperature..." -k 10
# Start the API server (for editor plugins)
incite serve --embedder minilm-ft
# Start the menu bar app (macOS, manages the server for you)
pip install incite-app[tray]
incite tray
Python API
from incite.agent import InCiteAgent
# From Zotero library
agent = InCiteAgent.from_zotero(embedder_type="minilm-ft")
# From a folder of PDFs
agent = InCiteAgent.from_folder("~/Papers")
# Get recommendations
response = agent.recommend("climate change and agricultural productivity", k=10)
for rec in response.recommendations:
print(f" {rec.rank}. [{rec.score:.2f}] {rec.title} ({rec.year})")
REST API
incite serve --embedder minilm-ft
# API docs at http://localhost:8230/docs
curl -X POST http://localhost:8230/recommend \
-H "Content-Type: application/json" \
-d '{"query": "climate change impacts on crop yields", "k": 5}'
Editor Plugins
inCite integrates with your writing environment via editor plugins that connect to the local API server.
| Editor | Status | Install |
|---|---|---|
| Obsidian | Stable | Build from editor-plugins/obsidian-incite/ |
| VS Code | Stable | Build from editor-plugins/vscode-incite/ |
| Google Docs | Stable | Apps Script add-on via clasp push |
| Microsoft Word | Beta | Office.js add-in, sideload manifest.xml |
All plugins share the @incite/shared TypeScript package for API communication and context extraction.
Paper Sources
- Zotero (recommended): Auto-detects your local Zotero library and reads directly from the SQLite database
- PDF folder: Point at any directory of PDFs -- metadata is extracted automatically
- JSONL corpus: Load a pre-built corpus file with title, abstract, authors, and other metadata
How It Works
- Embed papers: Each paper is embedded as
title. authors. year. journal. abstractusing a sentence transformer - Embed your writing: Your text is embedded with the same model
- Search: FAISS finds the nearest papers by cosine similarity
- Fuse (optional): BM25 keyword matching is combined with neural results via Reciprocal Rank Fusion for improved recall
- Evidence: The best matching paragraph from each paper's full text is attached as supporting evidence
Embedder Models
| Model | Key | Dims | Notes |
|---|---|---|---|
| MiniLM fine-tuned v4 | minilm-ft |
384 | Default. Citation-specific, auto-downloads from HuggingFace |
| MiniLM | minilm |
384 | Fast, good baseline |
| SPECTER2 | specter |
768 | Scientific domain |
| Nomic v1.5 | nomic |
768 | Long context (8K tokens) |
| Granite | granite |
384 | IBM Granite, 8K context |
For even better results (MRR 0.550 vs 0.428), try the cloud service at inciteref.com which uses our best fine-tuned model.
Development
git clone https://github.com/galenphall/incite.git
pip install -e ".[dev]"
pytest
ruff check src/incite && ruff format src/incite
Optional Dependencies
inCite's core is Apache 2.0 licensed. Some optional features depend on copyleft-licensed libraries and are packaged as extras to keep the default installation permissive.
pip install incite-app[pdf] # PyMuPDF for PDF text extraction (AGPL)
pip install incite-app[zotero] # pyzotero for Zotero integration (GPL)
pip install incite-app[api] # FastAPI server
pip install incite-app[webapp] # Streamlit UI
pip install incite-app[tray] # macOS menu bar app
pip install incite-app[all] # Everything
Note: The
zoteroextras pull in AGPL and GPL dependencies respectively. If license compatibility matters for your use case, install only the extras you need.
Cloud Service
inciteref.com offers a hosted version of inCite with additional features:
- Better model: Granite-FT fine-tuned embedder (MRR 0.550 vs 0.428 for the default local model)
- Cloud PDF processing: Full-text extraction without running GROBID locally
- Reference manager: Collections, tags, notes, and citation export (BibTeX/RIS)
- Multi-device sync: Access your library from anywhere
The local CLI and cloud service are complementary -- use whichever fits your workflow.
Contributing
Contributions are welcome. See CONTRIBUTING.md for guidelines.
License
Citation
@software{incite2025,
author = {Hall, Galen},
title = {inCite: Local-First Citation Recommendation},
year = {2025},
url = {https://github.com/galenphall/incite},
license = {Apache-2.0}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file incite_app-0.1.1.tar.gz.
File metadata
- Download URL: incite_app-0.1.1.tar.gz
- Upload date:
- Size: 184.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b5098a1c85c1874d6d8beda4b2f80e8d49284a1751beb9d486f88d033d60dbb
|
|
| MD5 |
1ceac5cb086f8844d9c491de8d7dcbd9
|
|
| BLAKE2b-256 |
131534126f0a2138a5c8c59d3f567af9958bedbcba88e02786cc230d7066eebf
|
Provenance
The following attestation bundles were made for incite_app-0.1.1.tar.gz:
Publisher:
publish.yml on galenphall/incite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
incite_app-0.1.1.tar.gz -
Subject digest:
2b5098a1c85c1874d6d8beda4b2f80e8d49284a1751beb9d486f88d033d60dbb - Sigstore transparency entry: 976720511
- Sigstore integration time:
-
Permalink:
galenphall/incite@e103f9aba61fed3a857ddfbd0c26dbf1fc90f043 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/galenphall
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e103f9aba61fed3a857ddfbd0c26dbf1fc90f043 -
Trigger Event:
release
-
Statement type:
File details
Details for the file incite_app-0.1.1-py3-none-any.whl.
File metadata
- Download URL: incite_app-0.1.1-py3-none-any.whl
- Upload date:
- Size: 221.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
482b3043fdd63b1dca744e4b9f7d98b57c890f2888d1af9369a95e8db2500709
|
|
| MD5 |
ad023a4ae8889e9ab85109644d663f9b
|
|
| BLAKE2b-256 |
07a385740a1a7d8f1a36443617165d37527d557f311ad495e95f0778e7b5e7c5
|
Provenance
The following attestation bundles were made for incite_app-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on galenphall/incite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
incite_app-0.1.1-py3-none-any.whl -
Subject digest:
482b3043fdd63b1dca744e4b9f7d98b57c890f2888d1af9369a95e8db2500709 - Sigstore transparency entry: 976720515
- Sigstore integration time:
-
Permalink:
galenphall/incite@e103f9aba61fed3a857ddfbd0c26dbf1fc90f043 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/galenphall
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e103f9aba61fed3a857ddfbd0c26dbf1fc90f043 -
Trigger Event:
release
-
Statement type: