PaperPilot README

项目的 README,来自 github.com/KrushnaVardhanReddy/PaperPilot。合并为一个 markdown 文件:README.md。

PaperPilot

PDF tools for your AI agent — and for you. Pure Rust. Runs locally. Files never leave your machine.

CI OpenSSF Scorecard Security Policy License: Apache 2.0 Rust 1.75+ MCP Compatible PRs Welcome

PaperPilot demo

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.


Self-Healing System Diagnostics

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.


Quick start

1. Use it with your coding agent (MCP)

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."

2. Use the CLI

# 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

3. Use it in the browser & extension

4. Build from source

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.


What it can do (92 Tools Across 5 Interfaces)


Why another PDF tool?

Benchmarks

Run cargo bench --workspace to reproduce. Methodology and results: SYSTEM_BENCHMARK_REPORT.md.


Architecture

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

Embed in your own site

<script src="https://usepaperpilot.com/embed.js" data-tools="merge,compress,ocr"></script>
<div id="paperpilot-widget"></div>

Local REST API & Document Ingestion

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.

Security & Supply Chain Integrity

PaperPilot processes sensitive, proprietary, and personal documents on-device without cloud dependencies. We maintain rigorous software supply chain and security compliance:


Contributing & Community

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.

License

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.

PaperPilot (KrushnaVardhanReddy/PaperPilot)

正在搜索数据库…

这是什么?PaperPilot 是一个用纯 Rust 编写的 PDF 与文档工具包,可以在你自己的电脑上完成 PDF 的合并、拆分、OCR 识别、压缩等各种处理,全程不联网。
这是单一应用,还是几个不同的工具?同一套 Rust 引擎提供五种使用形式:面向 AI 智能体的 MCP 服务器、面向脚本的命令行工具(CLI)、可在浏览器中运行的 WASM 版本、基于 Tauri+Svelte 的桌面应用,以及本地 REST API。
我该如何开始使用?你可以无需安装,直接在浏览器中访问 usepaperpilot.com 试用这些工具;也可以从 Releases 页面下载桌面应用或 MCP 服务器二进制文件;或者用 Cargo 从源代码构建 CLI 和 REST API。
目前还有哪些功能做不到?加密、解密、签名、涂黑(编辑遮盖)、表单、批注、渲染、修复、比较、PDF/A 以及 Bates 编号目前都还没有实现,计划在 v0.9 和 v1.0 中推出,当前的 v0.6 版本中暂不包含这些功能。
哪些编程智能体可以通过 MCP 使用它?它以本地 stdio MCP 服务器的方式运行,Codex、Claude Code、Kimi Code、Pi、Claude Desktop、Cursor 以及其他兼容 MCP 的客户端都可以连接使用。
我使用它时,文档会传到哪里去?哪里都不会去。Rust 核心和 WASM 版本只在你的电脑或浏览器内存中处理文件,不会上传,也不会调用任何云服务。
社区版和企业版有什么区别?本仓库中的社区版(包括 CLI、MCP 服务器、REST 网关、WASM 引擎和桌面应用)免费开源,采用 Apache 2.0 许可证;另有单独开发的企业版,面向组织机构,额外提供 SSO、RBAC、审计日志和 DLP 功能。
目前支持哪些文档操作?v0.6 支持 PDF 整理(合并、拆分、旋转、重新排序、提取、小册子排版、N-up 多页合一)、压缩、纯文本与 OCR 文字提取、添加水印、签名验证与移除、个人信息(PII)扫描、深度清理,以及 Excel 转 JSON/CSV。
作者为什么要再做一个 PDF 工具?目标是默认保护隐私,把 AI 智能体(MCP)作为一等使用场景,而不是事后补充;并且让 CLI、MCP、REST、WASM 和桌面端共用同一套 Rust 引擎,确保各处的行为保持一致。
没有任何云服务,OCR 是如何工作的?它使用通过 rten crate 实现的纯 Rust 版 PaddleOCR,因此扫描页面的文字提取完全在本地运行,无需任何外部 API。
大小
84.4 MB
星标
787
时长
1个月
提交 · 90 天