pdfpin
GitHub

Claude Code · Codex · anything with a shellClaude Code · Codex · 셸을 쓰는 무엇이든

A PDF viewer your agent can highlight in.에이전트가 PDF에 근거를 표시합니다

You ask a question. The agent marks the passages that answer it and writes a short note on each one. Any PDF with a text layer works, not only papers, and you get there from the agent you are already using. 질문을 던지면 답이 되는 문장에 표시가 붙고, 표시마다 짧은 설명이 달립니다. 텍스트가 들어 있는 PDF면 됩니다. 작업 중인 로컬 에이전트에서 근거 확인까지 바로 할 수 있습니다.

  • MIT
  • Node 22.13+
  • macOS · Windows · Linux
  • 127.0.0.1 only

Install설치

Node 22.13 or newer, on macOS, Windows or Linux. No native build step. Node 22.13 이상이면 macOS, Windows, Linux 어디서든 됩니다. 빌드 과정은 없습니다.

npm install -g @taeng0204/pdfpin
pdfpin open paper.pdf

Installing globally also hands the skill to Claude Code and Codex, whichever of the two you have, with nothing to configure. Then you just ask: "find the evidence in this paper for X and highlight it." 설치하면 Claude Code와 Codex 중 쓰고 계신 쪽에 스킬이 같이 들어갑니다. 따로 설정할 건 없습니다. 이제 이렇게 시키면 됩니다. "이 논문에서 X의 근거를 찾아서 하이라이팅해줘."

What an agent does에이전트가 하는 일

It never sees a picture of the page. It reads the text layer, quotes from it, and the viewer turns each quote back into glyph boxes on the rendered page. 에이전트는 페이지 이미지를 보지 않습니다. 텍스트만 읽고 한 구절을 인용하면, 뷰어가 지면 어디에 있는 문장인지 찾아 표시합니다.

pdfpin text -p 1-2                     # the page text, to quote from
pdfpin find "bias momentum"              # or go straight to a phrase

pdfpin mark --json '{
  "title": "What is the central finding?",
  "flow":  "One phenomenon, measured three ways.",
  "highlights": [
    {"text": "each agent exhibits an attack-selection bias",
     "note": "It keeps returning to a few attack families.", "tag": "bias"},
    {"text": "a bias momentum effect, where agents resist explicit steering",
     "note": "Push it away and it drags the old distribution along.", "tag": "momentum"}
  ]}'

One question makes one session. Matching forgives case, whitespace, end-of-line hyphenation and small typos; a quote it cannot place comes back with the nearest candidates and their page numbers, so the agent can correct itself. Colour is left to the viewer: one per tag, or one per session, whichever the reader picked. 질문 하나가 세션 하나입니다. 대소문자, 공백, 줄바꿈 하이픈, 사소한 오타는 알아서 맞춥니다. 못 찾은 구절은 비슷한 후보와 페이지 번호를 돌려주니 에이전트가 스스로 고칩니다. 색은 지정하지 않아도 됩니다. 태그별로 한 색씩, 원하면 세션별로 한 색씩 붙습니다.

Under it동작 방식

  • anchoringNormalise, exact match, then a bounded fuzzy search; the hit becomes an item/char anchor and the DOM gives the exact glyph boxes.정규화한 뒤 정확히 맞춰보고, 안 되면 편집거리를 제한해 근사 탐색합니다. 찾은 위치는 앵커로 저장하고, 실제 글자 영역은 DOM에서 그때그때 가져옵니다.
  • storagePlain JSON under ~/.pdfpin, one file per document. Nothing is uploaded.문서 하나당 JSON 파일 하나가 ~/.pdfpin에 남습니다. 서버로 올라가는 건 없습니다.
  • transportA daemon bound to 127.0.0.1 with Host and Origin guards, pushing live updates over server-sent events.데몬은 127.0.0.1에만 열리고 Host·Origin을 확인합니다. 바뀐 내용은 SSE로 화면에 바로 반영됩니다.
  • exportAn annotated PDF with real /Highlight annotations, or a Markdown report grouped by session.실제 /Highlight 주석이 들어간 PDF, 또는 세션별로 묶은 마크다운으로 내보냅니다.
  • limitsA scanned PDF has no text to quote, and a quote that spans two pages does not resolve — split it.스캔한 PDF에는 인용할 텍스트가 없습니다. 두 페이지에 걸친 구절도 찾지 못하니 나눠서 보내야 합니다.