Metadata-Version: 2.4
Name: paperbrace
Version: 0.0.2
License: MIT License
        
        Copyright (c) 2026 Keyvan Rahmani
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Requires-Python: >=3.13
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer>=0.12
Requires-Dist: rich>=13.7
Requires-Dist: pymupdf>=1.24
Requires-Dist: sqlite-utils>=3.36
Provides-Extra: chroma
Requires-Dist: chromadb; extra == "chroma"
Requires-Dist: sentence-transformers; extra == "chroma"
Provides-Extra: flat
Requires-Dist: numpy; extra == "flat"
Requires-Dist: sentence-transformers; extra == "flat"
Provides-Extra: llm
Requires-Dist: torch; extra == "llm"
Requires-Dist: transformers; extra == "llm"
Dynamic: license-file

# Paperbrace

**Paperbrace** is a local-first literature navigator for a researcher’s PDF library (e.g., a Zotero attachments folder).

**Disclaimer:** Paperbrace is experimental, work in progress software. Use at your own risk. It comes with no guarantees of any kind, including correctness, security or suitability for production. See the `LICENSE` and `docs/privacy.md` for more information.

## Goals

- Index a local folder of PDFs and enable QA/navigation over the user’s library
- Ground all answers in retrieved passages with page-level citations (“cite-or-refuse”)
- Run locally by default (no uploads, no external services)

Ask things like:
- “Which paper mentions X?”
- “Which paper claims improvement over Y?”
- “Summarize paper Z’s contributions and limitations.”
- “Compare A vs B on assumptions/datasets/metrics.”

**Local-first by design:** everything runs on your machine. No uploads, no servers.

---

## Non-goals

- Running user-provided code
- Opening/executing links
- “Write my paper” mode (this is for reading/understanding/navigation)
- Hosted service operated by us

---

## Current status

**L0 (Search + Cite MVP)**.

- Index a folder of PDFs into a local SQLite DB
- List sources
- Extract per-page text into the DB

---

## Requirements

- macOS / Linux
- Python (project-local via `pyenv local` recommended)
- SQLite (bundled with Python)

---

## Quickstart (dev)

From repo root:

```bash
python3 -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install -e .

```bash
# Index PDFs:
paperbrace index --pdf-dir /path/to/pdfs --db paperbrace.db

# List:
paperbrace list --db paperbrace.db

# Extract:
paperbrace extract --paper-id 1 --db paperbrace.db
```

## License
MIT (see LICENSE)

## Attribution (Optional)
Attribution is not required. If you use Paperbrace in research or a public project and decide to give credit, you can credit it as: Keyvan Rahmani, *Paperbrace* (2026).
