跳到正文
原文
Hacker News· abdullahalharir·· 3 小时前精选AI 评分60

Penmentor 开源发布,把 Claude 等模型接入 xournal++ 批改手写数学作业

Show HN: Penmentor – Claude marks up your handwritten math like a teacher

AI 导读

作者 Abdullah Alhariri 开源发布 Penmentor,把 Claude、GPT、Gemini 等模型接入 xournal++ 手写数学笔记,让 AI 按提示而非答案在原页做老师式批改。

推荐理由

作者在 Claude Code、Codex、Antigravity 等 CLI 代理之上搭出了一个 xournal++ 插件,演示了把 LLM 接入手写数学笔记做原页批改和 Manim 动画的具体做法,适合套用到其他手写场景。

正文

penmentor

A maths mentor at the tip of your pen. Press a key while you work by hand: Claude, Gemini or GPT marks your work on the
screen like a teacher with coloured pens, gives you hints instead of answers, and shows the idea as a 3Blue1Brown-style animation.

Writing an integral in xournal++, penmentor marking the sign slip, then animating the area
Handwriting in xournal++ → one key → the slip is marked on the page → box the integral → an interactive manim animation. (video; for a repeatable recording the pen is scripted and the model's answer is a fixed example.)

Why I use it

I study calculus with a pen tablet in xournal++. I kept screenshotting my work into Claude and reading long answers back, when what I wanted was a teacher looking over my shoulder: circle the mistake, tick what's right, nudge me toward the next step, and show me why. penmentor is that, one key away, on my own Claude subscription.

How it helps you learn

  • Hints, not answers. A ladder from a nudge to naming the technique to a faint ghost of the next line: you do the thinking, which is what makes it stick.
  • Feedback on your own work. The first real mistake circled where you made it, correct lines ticked, later lines that inherit the mistake underlined. The marks stay while you keep writing; Esc clears them.
  • Practice that makes you recall. Questions on your key steps (answer by typing or by writing), find-the-error drills, "which technique fits?".
  • See it. Box what you want to understand and get an interactive animation made with 3Blue1Brown's own manim: drag the bounds, retype a value, watch Riemann sums close in.
  • Whole page aware. A small xournal++ plugin shares the page you are on, not just what fits on screen.

Works with Claude Code, Codex and Antigravity

penmentor runs on the AI command-line agent you already use, on that subscription. Pick the model in Settings; its prefix says which agent answers:

Prefix Agent For example
claude: Claude Code claude:opus, claude:sonnet, claude:haiku
codex: Codex codex:gpt-5.6-terra
agy: Antigravity CLI agy:gemini-4-argon-medium, agy:gemini-3.8-flash-medium

Settings lists the agents you have installed. How each one is run and what it sees: the guide.

Quick start

git clone https://github.com/AbdullahAlhariri/penmentor ~/src/penmentor
~/src/penmentor/bin/penmentor --selftest

Linux on X11 (best with i3), with one of those agents logged in (claude, codex or agy), plus rofi, slop, xdotool and PyQt6. Bind bin/penmentor to a key (example). Setup, keys and how it works: the guide.

License

MIT

来源:Hacker News · github.com