lllin000_PaperForge/docs/COMMANDS.md
Research Assistant efc8da0b12 docs: reset documentation IA (readme entry pages, tutorial/troubleshooting split, AGENTS agent-only, pure command ref, maintainer guide)
Separate audiences: README as navigation entry, getting-started as canonical tutorial,
troubleshooting as failure recovery, AGENTS as agent-only operating contract,
COMMANDS as pure reference, maintainer-guide for release/versioning/architecture.
2026-05-16 22:47:00 +08:00

104 lines
2.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# PaperForge 命令参考
> 所有 CLI 命令和 Agent 命令速查。
---
## 命令矩阵
| Agent 命令 | CLI 命令 | 用途 | 前置条件 |
|-----------|---------|------|---------|
| `/pf-sync` | `paperforge sync` | 同步 Zotero生成正式笔记 | BBT JSON 导出 |
| `/pf-ocr` | `paperforge ocr` | PDF OCR 文本与图表提取 | `do_ocr: true` |
| `/pf-status` | `paperforge status` | 查看系统状态 | 配置完成 |
| `/pf-deep <key>` | `paperforge deep-reading` | 三阶段精读 | OCR done + `analyze: true` |
| `/pf-paper <key>` | — | 文献问答 | 正式笔记存在 |
---
## CLI 命令
### `paperforge sync`
```bash
paperforge sync # 完整同步
paperforge sync --dry-run # 预览
paperforge sync --rebuild-index # 强制重建索引
paperforge sync --json # JSON 输出
```
### `paperforge ocr`
```bash
paperforge ocr # 处理队列
paperforge ocr --key ABCDEFG # 处理指定文献
paperforge ocr --diagnose # 诊断模式
paperforge ocr --json # JSON 输出
```
### `paperforge status`
```bash
paperforge status # 完整状态
paperforge status --json # JSON 输出
```
### `paperforge doctor`
```bash
paperforge doctor # 验证安装配置
paperforge doctor --json # JSON 输出
```
### `paperforge repair`
```bash
paperforge repair # 扫描分歧dry-run
paperforge repair --fix # 修复
paperforge repair --fix-paths # 修复 PDF 路径
paperforge repair --json # JSON 输出
```
### `paperforge deep-reading`
```bash
paperforge deep-reading # 查看精读队列
paperforge deep-reading --verbose # 含修复指令
```
### `paperforge embed`
```bash
paperforge embed build # 构建向量索引
paperforge embed build --resume # 续建
paperforge embed status # 查看状态
paperforge embed stop # 停止构建
```
### `paperforge memory`
```bash
paperforge memory build # 构建 memory DB
paperforge memory status # 查看状态
```
### `paperforge search`
```bash
paperforge search "<query>" --json
paperforge search "PEMF" --domain 骨科 --ocr done --year-from 2020
```
### `paperforge runtime-health`
```bash
paperforge runtime-health --json
```
---
## 相关文档
- [使用教程](getting-started.md)
- [故障排除](troubleshooting.md)
- [更新指南](update-upgrade.md)