[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81435":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":11,"contributorsCount":11,"subscribersCount":11,"size":11,"stars1d":13,"stars7d":13,"stars30d":14,"stars90d":11,"forks30d":11,"starsTrendScore":15,"compositeScore":16,"rankGlobal":8,"rankLanguage":8,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":8,"pushedAt":8,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":11,"starSnapshotCount":11,"syncStatus":14,"lastSyncTime":25,"discoverSource":26},81435,"paper-lens-codex","nekoneko0831\u002Fpaper-lens-codex","nekoneko0831",null,"TypeScript",35,0,33,1,2,3,39.7,"MIT License",false,"main",true,[],"2026-06-12 04:01:33","# Paper Lens · Codex Edition\n\nA Codex CLI port of [paper-lens](https:\u002F\u002Fgithub.com\u002Fnekoneko0831\u002Fpaper-lens) — same Web UI, codex-driven backend.\n\n一个用 OpenAI Codex CLI 驱动的论文阅读 \u002F 学习 \u002F 展示 Web UI（基于 [paper-lens](https:\u002F\u002Fgithub.com\u002Fnekoneko0831\u002Fpaper-lens) 移植）。\n\n> Looking for the Claude Code original? → [nekoneko0831\u002Fpaper-lens](https:\u002F\u002Fgithub.com\u002Fnekoneko0831\u002Fpaper-lens)\n\n---\n\n## Features \u002F 功能概览\n\n| Mode \u002F 模式 | Purpose \u002F 用途 | Time \u002F 耗时 | Interaction \u002F 交互 |\n|---|---|---|---|\n| **Speed Read \u002F 速览** | Quick digest | ~5 min | One-shot |\n| **Deep Learn \u002F 学习** | In-depth study, save-as-you-go | 20–40 min | Multi-turn |\n| **Present \u002F 展示** | Slide content prep | 15–30 min | Page-by-page |\n| **Batch Search \u002F 批量检索** | Search papers by topic | 3–5 min | Table + select |\n| **Batch Download \u002F 批量下载** | Download from arXiv links | 1–3 min | Auto-dedup |\n\nThe skill prompts live under `.codex\u002Fskills\u002Fpaper-lens\u002F` (codex skill convention). The Web UI lives under `paper-lens-web\u002F` (Next.js) and `paper-lens-backend\u002F` (FastAPI driving `codex app-server` via JSON-RPC).\n\n---\n\n## Architecture \u002F 架构\n\n```\n┌──────────────────────────────────────────────────────────────────┐\n│                                                                  │\n│   Browser  ◀──HTTP\u002FSSE──▶  paper-lens-backend ─spawn▶ codex      │\n│   (3001)                   (FastAPI, 8766)            app-server │\n│                                  │                       (ws)    │\n│                                  │                       │       │\n│                                  └──── JSON-RPC 2.0 ─────┘       │\n│                                                                  │\n└──────────────────────────────────────────────────────────────────┘\n```\n\nThe backend spawns `codex app-server --listen ws:\u002F\u002F127.0.0.1:\u003Crandom-port>` per session, then connects to it as a JSON-RPC client. AskUserQuestion-style prompts surface as `item\u002Ftool\u002FrequestUserInput` server-requests; tool-call approvals are auto-accepted so paper-reading work isn't interrupted by per-command confirmations.\n\n---\n\n## Quick Start \u002F 快速开始\n\n### Prerequisites \u002F 先决条件\n\n- **Codex CLI**: `brew install --cask codex` or `npm i -g @openai\u002Fcodex`\n- **Codex login**: run `codex login` once (ChatGPT subscription) or set `OPENAI_API_KEY`\n- **Node.js 18+** and **Python 3.9+**\n\n> ⚠️ **Do not run the backend with `sudo`.** It spawns `codex app-server`, which inherits the invoking user's credentials. A sudo-spawned subprocess can't read `~\u002F.codex` and every chat will fail. Same footgun as paper-lens; same fix (don't sudo).\n>\n> ⚠️ **不要用 `sudo` 启动后端**：它会 spawn `codex app-server` 子进程，sudo 会丢登录态，每次对话都会失败。\n\n### Install \u002F 安装\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fnekoneko0831\u002Fpaper-lens-codex.git\ncd paper-lens-codex\n\n# Backend\ncd paper-lens-backend\npip install -r requirements.txt\n\n# Frontend\ncd ..\u002Fpaper-lens-web\ncp .env.local.example .env.local   # adjust NEXT_PUBLIC_BACKEND_URL if needed\nnpm install\n```\n\n### Run \u002F 启动\n\nOne terminal:\n\n```bash\ncd paper-lens-web\nnpm run dev\n```\n\nThen open http:\u002F\u002Flocalhost:3001 in your browser.\n\n`npm run dev` starts the FastAPI backend behind the frontend, points Next.js at it, and restarts that backend if it exits while the frontend dev server is still running. Users should not need to start or think about port 8766 in normal use.\n\n### Skill install (optional CLI mode) \u002F Skill 安装（可选 CLI 模式）\n\nIf you also want codex CLI to recognize the `paper-lens` skill (CLI mode without Web UI), copy the skill folder into your codex runtime skills directory:\n\n```bash\ncp -R .codex\u002Fskills\u002Fpaper-lens ~\u002F.codex\u002Fskills\u002Fcodex-primary-runtime\u002F\n```\n\nThen in any directory, ask codex things like \"帮我读这篇论文：https:\u002F\u002Farxiv.org\u002Fpdf\u002F2506.07982\" and the skill will dispatch.\n\n---\n\n## Usage \u002F 使用\n\nIn the Web UI: drop a PDF or paste an arXiv URL on the left panel, pick a paper, then choose **速览 \u002F 精读 \u002F 学习 \u002F 展示** above the chat. The agent runs in `codex app-server`, streams output via SSE, and uses structured question cards for multi-choice questions during deep-learn \u002F present modes.\n\nSession state is intentionally long-lived: the backend keeps Codex sessions until backend shutdown or an explicit stop, while the browser stores conversation history in localStorage. A refresh should not expire an idle paper-reading session.\n\nIf you'd rather use codex CLI directly (no Web UI), invoke the skill the same way you would in Claude Code: drop a PDF path or arXiv URL into the conversation.\n\n---\n\n## Why a separate repo? \u002F 为什么单独发一个仓库\n\nThe Web UI is identical between paper-lens (Claude) and paper-lens-codex, but the backend adapter is fundamentally different (Claude's `--sdk-url` reverse-WS pattern vs. codex's `app-server` JSON-RPC pattern). Splitting keeps each repo's adapter, default ports, and skill folder coherent without runtime branching. If you want both, install both — they're designed to coexist (different ports, different skill names).\n\n---\n\n## Caveats \u002F 注意事项\n\n- `codex app-server` is **experimental** upstream. Bumping the codex CLI may break the adapter; if so, run `codex app-server generate-json-schema --out \u002Ftmp\u002Fschema` and reconcile method\u002Ffield names in `paper-lens-backend\u002Fadapters\u002Fcodex_app_server.py`.\n- The backend starts Codex with `approvalPolicy: \"on-request\"` and answers paper-reading approvals itself, so the browser UI is not interrupted by command\u002Ffile prompts while network and note-writing requests can still be granted.\n- v0.1 ships the same skill content as paper-lens, with surface-level adaptations (AskUserQuestion → 结构化提问, `\u002Ffrontend-slides` references rewritten). The prompt has not been re-tuned for codex's strengths\u002Fweaknesses — there's headroom for codex-specific iteration.\n\n---\n\n## License\n\n[MIT](LICENSE)\n","Paper Lens · Codex Edition 是一个基于 OpenAI Codex CLI 的论文阅读、学习和展示的 Web UI 工具。该项目提供了速览、深度学习、展示、批量检索和批量下载五种模式，每种模式针对不同的使用场景设计，如快速了解论文概要、深入研究特定主题、准备演示文稿等。项目采用 TypeScript 编写，前端基于 Next.js 构建，后端则使用 FastAPI 通过 JSON-RPC 与 Codex 应用服务器通信。这种架构使得用户可以通过简单的命令行操作启动服务，并在浏览器中进行高效且直观的交互。适用于需要频繁处理学术文献的研究人员、学生或讲师，在保证工作效率的同时提供良好的用户体验。","2026-06-11 04:05:03","CREATED_QUERY"]