Installation
Requirements
- Python 3.11 or newer
From PyPI
pipx (recommended)
pipx is the standard way to install Python CLI tools. It creates an isolated environment automatically and puts mosaic on your PATH — no manual virtualenv needed:
pipx install mosaic-searchInstall pipx itself with apt install pipx (Debian/Ubuntu), brew install pipx (macOS), or pip install pipx.
uv (fastest)
uv is a modern, significantly faster alternative to pipx for installing tools:
uv tool install mosaic-searchpip (inside a virtualenv)
Modern Linux and macOS systems protect the system Python from pip (PEP 668). Always install into a virtual environment:
python -m venv ~/.venvs/mosaic
source ~/.venvs/mosaic/bin/activate # Windows: .venvs\mosaic\Scripts\activate
pip install mosaic-searchFrom source
git clone https://github.com/szaghi/mosaic
cd mosaic
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e .Optional: Web UI
MOSAIC includes a browser-based graphical interface. Install the ui extra:
pipx inject mosaic-search "flask>=3.0" "waitress>=3.0" # pipx
uv tool inject mosaic-search "flask>=3.0" "waitress>=3.0" # uv
pip install 'mosaic-search[ui]' # pip / venvThen launch with mosaic ui. See the Web UI guide for details.
Optional: NotebookLM integration
To use mosaic notebook create you need notebooklm-py, an unofficial Python client for Google NotebookLM.
Step 1 — inject notebooklm-py into MOSAIC (--include-apps exposes the notebooklm CLI; [browser] pulls in Playwright for the one-time sign-in):
pipx inject --include-apps mosaic-search "notebooklm-py[browser]" # pipx
uv tool inject --include-apps mosaic-search "notebooklm-py[browser]" # uv
pip install 'mosaic-search[notebooklm]' # pip / venvStep 2 — install the Chromium browser (pipx/uv bury playwright inside the tool venv so call it with its full path):
~/.local/share/pipx/venvs/mosaic-search/bin/playwright install chromium # pipx
~/.local/share/uv/tools/mosaic-search/bin/playwright install chromium # uv
playwright install chromium # pip / venvStep 3 — authenticate once:
notebooklm loginA browser window opens for Google sign-in. After that, mosaic notebook create works without a browser.
Optional: browser sessions
To use mosaic auth login for downloading PDFs from sites that require a login (institutional repositories, publisher portals, etc.) you need Playwright installed.
Step 1 — install the extra:
pipx inject mosaic-search "playwright>=1.40" # pipx
uv tool inject mosaic-search "playwright>=1.40" # uv
pip install 'mosaic-search[browser]' # pip / venvStep 2 — install at least one browser (Chromium is recommended):
# pipx / uv — call playwright inside the tool venv
~/.local/share/pipx/venvs/mosaic-search/bin/playwright install chromium
~/.local/share/uv/tools/mosaic-search/bin/playwright install chromium
# pip / venv
playwright install chromiumFirefox and WebKit are also supported — MOSAIC auto-detects which browser is available and uses the first one found (Chromium → Firefox → WebKit).
Step 3 — log in to a site once:
mosaic auth login elsevier --url https://www.sciencedirect.com/user/loginSee Authenticated Access for the full guide.
Verify
mosaic --helpYou should see the available commands: search, get, config, and notebook.
Shell completion
mosaic --install-completion # bash / zsh / fishUpgrading
pipx upgrade mosaic-search # if installed with pipx
uv tool upgrade mosaic-search # if installed with uv
pip install --upgrade mosaic-search # if installed with pip in a venv
