- Автор
- KrushnaVardhanReddy
- Размер
- 84.4 MB
- Звёзды
- 787
- Обновлён
- КоммитNov 17Релизv0.7.0Nov 17
- Возраст
- 1 мес
- Коммиты · 90 дней
README проекта с github.com/KrushnaVardhanReddy/PaperPilot. Одним файлом markdown: README.md.
PDF tools for your AI agent — and for you. Pure Rust. Runs locally. Files never leave your machine.

Try it in your browser → · Download · Contributing · Roadmap
PaperPilot is a PDF and document toolkit written in Rust. The same engine runs as:
| Surface | Use it for |
|---|---|
| MCP server | Give Codex, Claude Code, Gemini CLI, Cursor, Claude Desktop, or any MCP client instant document superpowers |
| CLI | High-speed batch workflows and automated terminal pipelines |
| Browser Extension | In-tab right-click actions on web/arXiv PDFs, clean article capture, and WASM toolkit |
| Browser (WASM) | Zero-install web tools; files are processed in browser memory, nothing is uploaded |
| Desktop app | Tauri + Svelte 5 GUI with interactive canvas, viewer, and pipeline builder |
| Local REST API | Call it from Python, Node.js, n8n, LangChain, or LlamaIndex at localhost:7823 |
No Chromium, no C++ runtime, no cloud calls.
Verify your environment, gateway port, temp storage, and OCR models with one command:
paperpilot doctor
# PaperPilot System Diagnostics (v0.7.0)
# ==================================================
# Status: Healthy
# [✓] Temp Directory: /tmp (writable & ephemeral cleanup verified)
# [✓] Gateway Port: 7823 available
# [✓] OCR Models: models/ocr/ppocrv4 (det.onnx, rec.onnx found)
# [✓] Disk Space: > 5 GB available
Open-WebUI integration (source builds): use the local gateway as a PDF-only Tika-compatible extraction server. See the Open-WebUI setup guide.
Codex, Claude Code, Kimi Code, and current Pi releases connect to the same local stdio server. See the coding agent setup guide for each client's configuration and verification steps. Builds from this source can also print ready-to-merge configuration:
paperpilot-mcp --client-config codex
# Also: claude-code, kimi-code, pi, claude-desktop, cursor
Download paperpilot-mcp from Releases, then add it to claude_desktop_config.json:
{
"mcpServers": {
"paperpilot": {
"command": "/path/to/paperpilot-mcp"
}
}
}
Restart Claude and try: "Merge these two PDFs and compress the result."
# Semantic Chunking for AI Agents & RAG (Spec 159)
paperpilot pdf-chunk --input contract.pdf --target-tokens 500 --overlap 50 --json
# Merge multiple documents
paperpilot merge --inputs doc1.pdf doc2.pdf --output merged.pdf
# High-efficiency compression
paperpilot compress --input in.pdf --quality 75 --output compressed.pdf
# Search pattern or keywords across document pages
paperpilot search --input in.pdf --query "Invoice" --json
# Rotate pages 1, 3–5 by 90°
paperpilot rotate --input in.pdf --pages 1,3-5 --angle 90 --output out.pdf
apps/extension for in-tab context menus, right-click PDF actions, and clean web article capture.git clone https://github.com/KrushnaVardhanReddy/PaperPilot.git
cd PaperPilot
cargo build --release -p paperpilot-cli -p paperpilot-mcp -p paperpilot-gateway
Desktop app:
cd apps/desktop && pnpm install && pnpm tauri dev
Requires Rust 1.75+, Node.js, and pnpm.
document_workflow & recipe_run: Declarative .ppflow DAG workflows with step dependencies, conditions, and cryptographic audit receipts.workspace_search & semantic_search: Multi-format recursive workspace search (.pdf, .docx, .xlsx, .md, .txt, .csv, .json) and normalized vector chunk retrieval.cli_ask: Natural language intent planner and instant execution agent.pdf_chunk & pdf_rag_chunks: Structure-aware semantic chunker respecting #/## headings, \n\n paragraphs, and keeping Markdown tables atomic.pdf_search & pdf_extract_patterns: High-precision regex and pattern extraction for invoices, order IDs, and legal identifiers.pdf_classify_type: Automatic document categorization (invoices, receipts, legal briefs, tax filings, research papers).pdf_bates: Standard legal discovery Bates numbering across 6 customizable anchor positions.pdf_posterize).pdf_read_form), fill (pdf_fill_form, batch_fill), create form fields (pdf_create_form_field), and flatten (pdf_flatten).pdf_sign, pdf_validate_signatures, pdf_timestamp), bookmarks (pdf_bookmarks), and crop/scale (pdf_crop, pdf_scale_pages).pdf_to_docx, pdf_convert_markdown).pdf_to_xlsx, pdf_convert_excel, excel_to_csv, excel_to_json).pdf_to_epub), PowerPoint slides (pdf_to_pptx), HTML (pdf_to_html, pdf_convert_html), and JSON ASTs (pdf_to_json, json_to_pdf).office_modernize_legacy, office_extract_text, office_to_markdown).rten and ocrs (det.onnx + rec.onnx).pdf_auto_rotate), page rendering (pdf_render), and blank page removal (pdf_remove_blank).document_pii_scan) detecting SSNs, credit cards, emails, phone numbers, and IBANs.pdf_redact) via coordinates, keywords, regex, or structured JSON datasets.pdf_validate, pdf_hash), encryption/decryption (pdf_encrypt, pdf_decrypt), permissions bitmask (pdf_change_permissions), and sanitization (pdf_sanitize).DocumentSource via memmap2) for files $\ge 10\text{ MB}$, keeping resident memory flat (< 100 MB) during search, chunking, and PII scanning of 500+ page documents.PageBatchIterator) to prevent OOM errors.lopdf, pdf_oxide, rten, and friends.Run cargo bench --workspace to reproduce. Methodology and results: SYSTEM_BENCHMARK_REPORT.md.
Desktop (Tauri) · CLI · REST (Axum) · MCP (stdio) · WASM (browser / edge)
│
Rust core workspace
paperpilot-core · paperpilot-pdf · paperpilot-nlp · paperpilot-gateway
paperpilot-mcp · paperpilot-wasm · paperpilot-storage
<script src="https://usepaperpilot.com/embed.js" data-tools="merge,compress,ocr"></script>
<div id="paperpilot-widget"></div>
paperpilot serve --port 7823
# Standard PDF Operations (JSON & multipart)
curl -X POST http://localhost:7823/api/v1/pdf/merge \
-H "Content-Type: application/json" \
-d '{"inputs": ["a.pdf", "b.pdf"], "output": "out.pdf"}'
# Open-WebUI & Tika In-Memory Ingestion (sub-5ms)
curl -X PUT http://localhost:7823/tika/text \
-H "Content-Type: application/pdf" \
--data-binary @sample.pdf
Interactive Swagger OpenAPI docs at http://localhost:7823/swagger-ui.
PaperPilot processes sensitive, proprietary, and personal documents on-device without cloud dependencies. We maintain rigorous software supply chain and security compliance:
permissions: read-all (principle of least privilege).SECURITY.md for our vulnerability disclosure policy and 48-hour response SLA.Issues and PRs are welcome. Good first contributions: bug reports with a sample PDF, new tool requests, and docs fixes.
Special thanks to all community members and contributors recognized in CONTRIBUTORS.md.
Community Edition (this repo): Apache 2.0. It includes the CLI, MCP server, REST gateway, WASM engine, and desktop app.
An Enterprise Edition (SSO, RBAC, audit logs, DLP) is developed separately.