Skip to content

MOSAICMulti-source Scientific Article Indexer and Collector

a vivid mosaic of open scientific literature, assembled in seconds

MOSAIC logoMOSAIC logo

Quick start โ€‹

bash
pipx install mosaic-search   # or: uv tool install mosaic-search
mosaic config --unpaywall-email you@example.com
mosaic search "attention is all you need" --oa-only --download

AI features โ€‹

Local RAG โ€” mosaic index / ask / chat โ€‹

Index your cached papers once and interrogate your library in natural language. Four structured analysis modes produce cited, grounded answers:

ModeWhat it produces
synthesisComprehensive state-of-the-art summary
gapsOpen problems, contradictions, methodological limitations
compareSide-by-side comparison of methods, datasets, metrics, results
extractPer-paper structured extraction: Task ยท Method ยท Dataset ยท Metric ยท Result
bash
pipx inject mosaic-search sqlite-vec          # install vector extension once

mosaic index                                  # embed all cached papers
mosaic ask "What are the main approaches to graph neural networks?" --show-sources
mosaic ask "What open problems remain in protein structure prediction?" --mode gaps
mosaic chat                                   # interactive multi-turn session

Runs entirely on your machine via Ollama or any OpenAI-compatible server. โ†’ RAG guide


Relevance ranking โ€” --sort relevance โ€‹

Re-rank any result set by semantic similarity to the query. BM25 by default (no model, no network, instant). Configure your LLM for higher-quality scores.

bash
mosaic search "diffusion models" --sort relevance          # live, ranked
mosaic search "diffusion models" --cached --sort relevance # offline, from local cache

โ†’ Relevance ranking guide


NotebookLM โ€” mosaic notebook โ€‹

Turn any search into a Google NotebookLM notebook in one command. Podcast, video overview, slides, quiz, flashcards, mind map, briefing doc โ€” all queued automatically.

bash
mosaic notebook create "Transformers" --query "attention mechanism" --oa-only --podcast --briefing

โ†’ NotebookLM guide


Claude Code Skill & AI agent mode โ€” mosaic skill install โ€‹

MOSAIC ships a bundled Claude Code skill. Install it once and the /mosaic slash command gives Claude Code expert knowledge of every command, source shorthand, filter, export format, and scripting pattern โ€” so you can describe your bibliography goal in plain English and let Claude Code build and run the right commands for you.

bash
# Install into the current project's .claude/skills/ directory
mosaic skill install

# Or globally, for all your projects
mosaic skill install --global

All search and similar commands support --json for structured stdout โ€” a clean {status, query, count, papers[], errors[]} envelope designed for piping, agent scripts, and CI:

bash
# Pipe directly to jq
mosaic search "attention mechanism" --max 30 --oa-only --json \
  | jq -r '.papers[] | "\(.year)  \(.doi)  \(.title)"'

# Combine file export and stdout JSON in one run
mosaic search "FDTD methods" --json --output refs.bib

โ†’ Agent Workflows guide


Architecture โ€‹

Authors โ€‹

Stefano Zaghi ยท stefano.zaghi@gmail.com

Chief Yak Shaver & Accidental Package Maintainer โ€” Fortran programmer who needed one paper, opened 21 browser tabs, and six months later found himself maintaining a Python library

Andrea Giulianini

Grand Pixel Overlord & Architect of the Sacred Button โ€” world-class web UI designer, responsible for making MOSAIC actually look good

Claude (Anthropic)

Omniscient Code Oracle & Tireless Rubber Duck โ€” AI pair programmer, responsible for writing the boring parts so humans don't have to

Contributions are welcome.

License โ€‹

MOSAIC is available under your choice of license: GPL-3.0-or-later, BSD-2-Clause, BSD-3-Clause, or MIT. See LICENSE.gpl3.md, LICENSE.bsd-2.md, LICENSE.bsd-3.md, LICENSE.mit.md.

ยฉ Stefano Zaghi