Metadata-Version: 2.5
Name: groundly
Version: 1.1.0
Summary: Local-first course knowledge bases for AI agents: index your materials, study grounded, share the index.
License: MIT License
        
        Copyright (c) 2026 Paul Hondola
        
        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.
License-File: LICENSE
Requires-Python: <3.15,>=3.11
Requires-Dist: docling==2.115.0
Requires-Dist: fastmcp>=2.0
Requires-Dist: flagembedding==1.4.2
Requires-Dist: onnxruntime>=1.31
Requires-Dist: pydantic-settings>=2.3
Requires-Dist: pydantic>=2.7
Requires-Dist: rapidocr==3.10.0
Requires-Dist: rich>=13
Requires-Dist: sentence-transformers==6.2.0
Requires-Dist: sqlite-vec>=0.1
Requires-Dist: starlette>=1.0
Requires-Dist: transformers>=5
Requires-Dist: typer>=0.12
Requires-Dist: uvicorn>=0.30
Provides-Extra: dev
Requires-Dist: import-linter>=2.15; extra == 'dev'
Requires-Dist: memray>=1.14; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Description-Content-Type: text/markdown

# Groundly

**Study your course with the AI you already pay for.** Index your course materials once; then any MCP-capable agent (Claude Code, Claude Desktop, Codex) searches the actual course content with page-level citations. A topic map of the course is available now, and verified quizzes with mastery tracking are on the way. Everything runs on your machine, and nothing needs an API key.

Bachelor thesis project, Universitatea Politehnica Timișoara.

```
$ groundly index <SUBJECT> ./slides/
  ✓ 12 PDFs → 384 chunks → embedded (bge-m3, local) → indexed
$ claude mcp add groundly -- groundly mcp   # wire into Claude Code
$ groundly skill install                     # then: "map my course"
```

Then, inside your agent: *"What did lecture 4 say about deadlock prevention?"* It searches the course's own slides and answers citing **lecture-04.pdf, page 12, "Deadlocks › Prevention"**.

## How it works

**index → search → topic tree → verified quizzes → progress.** Groundly holds the course and checks the work; your agent does the thinking. A study session stays in your agent and Groundly's local page. Nothing sends you off to another app.

- **Grounded search** (available now): bge-m3 dense + learned sparse + BM25, cross-encoder reranked, via MCP or `groundly search`. Every chunk carries a `groundly://<subject>/<file>#page=N` URI; `get_page` opens the exact page.
- **Sharing** (available now): `groundly export <SUBJECT>` writes one file; a coursemate imports it and their agent uses it directly. One person pays the indexing cost.
- **Topic tree** (available now, Claude Code): a roadmap-style map of each subject. Your agent writes it from the course's own structure, Groundly picks each node's slides and rejects any topic the course does not cover, and `groundly serve` shows it on a local page. It is read-only for now: progress arrives with quizzes.
- **Verified quizzes** (planned): your agent writes the questions, and Groundly re-retrieves every one and rejects any whose cited slides don't support it. Your answers build mastery per topic.

## Install

```
uv tool install groundly
```

The first run downloads the embedding models (~2.7GB total). No API key, no account, no upload.

**Setup guide:** [connect Claude Code / Codex to the MCP server](docs/guides/mcp-hosts.md)
