Metadata-Version: 2.4
Name: doctrail
Version: 0.4.0
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Rust
Classifier: Topic :: Database
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Text Processing
Requires-Dist: click>=8.0
Requires-Dist: typer
Requires-Dist: loguru
Requires-Dist: rich
Requires-Dist: pyzotero
Requires-Dist: sqlite-utils
Requires-Dist: sqlite-fts4
Requires-Dist: tiktoken
Requires-Dist: aiohttp
Requires-Dist: httpx>=0.27
Requires-Dist: pyyaml
Requires-Dist: openai>=1.76,<2
Requires-Dist: anthropic>=0.40
Requires-Dist: jinja2
Requires-Dist: google-genai>=1.0.0
Requires-Dist: pypinyin>=0.54.0
Requires-Dist: pyalex>=0.18
Requires-Dist: questionary>=2.0
Requires-Dist: tqdm>=4.0
Requires-Dist: pydantic>=2.0
Requires-Dist: pillow>=10.0
Requires-Dist: claude-agent-sdk>=0.1.45
Requires-Dist: prompt-toolkit<3.0.52
Requires-Dist: krippendorff>=0.7
Requires-Dist: ocrmypdf>=16.0 ; extra == 'ocr'
Requires-Dist: fastapi>=0.115.0 ; extra == 'server'
Requires-Dist: uvicorn[standard]>=0.32.0 ; extra == 'server'
Requires-Dist: fastapi>=0.115.0 ; extra == 'test'
Requires-Dist: openpyxl>=3.1.5 ; extra == 'test'
Requires-Dist: pytest ; extra == 'test'
Requires-Dist: pytest-asyncio ; extra == 'test'
Requires-Dist: pytest-mock ; extra == 'test'
Requires-Dist: python-docx>=1.0 ; extra == 'test'
Requires-Dist: python-pptx>=1.0.2 ; extra == 'test'
Requires-Dist: respx ; extra == 'test'
Requires-Dist: uvicorn[standard]>=0.32.0 ; extra == 'test'
Provides-Extra: icr
Provides-Extra: ocr
Provides-Extra: server
Provides-Extra: test
License-File: LICENSE
License-File: THIRD_PARTY_NOTICES.txt
Summary: SQLite database enrichment tool using LLMs
Author: Doctrail contributors
Maintainer: Doctrail contributors
License-Expression: AGPL-3.0-or-later
Requires-Python: >=3.12
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Changelog, https://github.com/mpr1255/doctrail/blob/master/CHANGELOG.md
Project-URL: Documentation, https://doctrail.org/llms.txt
Project-URL: Homepage, https://doctrail.org
Project-URL: Issues, https://github.com/mpr1255/doctrail/issues
Project-URL: Source, https://github.com/mpr1255/doctrail

# Doctrail

<table align="right" border="0" cellspacing="0" cellpadding="0">
<tr><td><img src="docs/assets/mascot.png" alt="A doctrail mascot, courtesy of DALL-E 3" width="150"></td></tr>
<tr><td align="center"><sub>A doctrail mascot,<br>courtesy of DALL-E 3</sub></td></tr>
</table>

Doctrail turns document collections into auditable, structured research data with LLMs.

It ingests files into an SQLite database, applies structured codebooks and prompts to selected rows, runs them through an LLM (OpenAI, Gemini, Anthropic, OpenRouter, or a self-hosted OpenAI-compatible server), and returns ordinary tables and views for iteration and analysis.

Doctrail is meant to be driven by both researchers and coding agents.

## Start here

For researchers and users, the documentation is at <https://doctrail.org>.

For LLMs and coding agents, the complete operating manual is at <https://doctrail.org/llms.txt>.

## Install

Install the command line tool:

```bash
uv tool install doctrail
doctrail --help
```

Or run directly:

```bash
uvx doctrail
```

From source:

```bash
git clone https://github.com/mpr1255/doctrail
cd doctrail
uv run doctrail --help
```

## Documentation

The full documentation is at [https://doctrail.org](https://doctrail.org).

Inside the package, `doctrail docs` prints the reference documentation offline.

## License

GNU AGPL-3.0-or-later (see [LICENSE](LICENSE) and [THIRD_PARTY_NOTICES.txt](THIRD_PARTY_NOTICES.txt)). Doctrail bundles MuPDF for PDF extraction; corresponding source for every release is published in the matching PyPI source distribution and this repository.

