Show HN: 为 38 美元的利民 Trofeo Vision LCD 屏幕打造的 Claude 实时使用情况平视显示器 (HUD)
Show HN: Live Claude Usage HUD for a $38 Thermalright Trofeo Vision LCD

原始链接: https://github.com/christensen143/claude-trofeo-hud

该项目将售价 38 美元的利民(Thermalright)Trofeo 6.86 英寸 USB-C LCD 显示屏改装为桌面实时仪表盘,用于跟踪 Claude 的使用情况。该方案专为 macOS 设计,可实时显示会话限制、每日 Token 使用量、预估 API 成本、当前项目模型以及每小时 Token 使用趋势图。 系统通过读取本地 Claude Code 日志并从 macOS 钥匙串中获取 OAuth 凭据来运行。利用基于 Python 的工具,通过逆向工程得出的 HID 协议直接将 JPEG 帧流式传输到显示屏,并通过 `hidapi` 绕过了 libusb 的限制。 主要功能包括: * **自动更新:** 通过 `launchd` 代理确保 HUD 在登录时自动运行。 * **自定义配置:** 可通过 `config.toml` 配置帧率(FPS)、JPEG 质量以及节能的“夜间模式”。 * **稳定性:** 内置自动重连机制和详细的本地日志记录。 **要求:** Python 3.12+、`uv`、`hidapi` 以及有效的 Claude Code 登录状态。安装完成后,该 HUD 可提供低维护、直观的 AI 使用概览,且无需外部依赖或数据外泄风险。

近期一篇 Hacker News 的“Show HN”帖子展示了一个项目:用户利用价值 38 美元的利民(Thermalright)Trofeo Vision 液晶显示屏,制作了一个 Claude 实时用量显示器(HUD)。该项目凸显了高级用户对 Claude 标准网页界面缺乏集成化、实时用量监控功能的一大痛点。 讨论很快转向了各种 DIY 解决方案。有用户分享了一个脚本,通过配置设置将使用统计信息(如消费金额、上下文窗口和重置计时器)直接集成到 Claude 的状态栏中。尽管一些用户认为查看官方 `/usage` 页面已经足够,但另一些用户强烈主张进行更无缝、“一目了然”的用户体验改进,例如在提示词输入框附近添加一个持久显示的进度条。 总的来说,该讨论串强调了用户对于 Anthropic 官方界面在令牌(token)用量和计费指标方面,有着更高的透明度和易用性需求。
相关文章

原文

A desk HUD that shows live Claude usage on a Thermalright Trofeo Vision 6.86" LCD (1280×480, USB-C, ~$38), driven from macOS. Inspired by the r/ClaudeAI "$38 Claude LCD Table Display" post.

Live HUD render — session/weekly limit gauges, today's tokens and cost, current session activity, hourly burn sparkline

What it shows: Pro/Max session + weekly limit bars with reset countdowns (from Anthropic's usage endpoint), today's tokens and hypothetical API cost (via ccusage), the live session (project, model, burn rate), a clock, and an hourly token sparkline.

  • macOS, Python 3.12+, uv, Node (for npx ccusage)
  • brew install hidapi (C library behind the hidapi Python package)
  • Claude Code installed and logged in (the HUD reads its local logs and its OAuth token from the Keychain — read-only, nothing leaves your machine except the usage query to api.anthropic.com)
uv sync
uv run python -m claude_trofeo_hud preview   # render mock layout to out/preview.png
uv run python -m claude_trofeo_hud run       # live HUD on the LCD (Ctrl-C stops)
uv run python -m claude_trofeo_hud install-agent   # start at login via launchd

On the first run, macOS asks for Keychain access to "Claude Code-credentials" — choose Always Allow so the daemon can run unattended.

uninstall-agent stops and removes the launchd agent. Config lives in config.toml (fps, JPEG quality, night dim/off hours). Logs go to ~/Library/Logs/claude-trofeo-hud/.

How it drives the display

The panel is not a monitor — it's a USB HID device (VID:PID 0416:5302) that accepts JPEG frames over a reverse-engineered protocol. We use the device classes from thermalright-trcc-linux with its HidApiTransport (IOHIDManager), bypassing its CLI — trcc's default transport routes through libusb, which macOS blocks for HID devices. The firmware blanks when idle, so the HUD streams continuously (default 2 fps). See PLANNING.md for the full protocol notes.

  • "Access denied (insufficient permissions)" — something is opening the device via libusb instead of hidapi; make sure you're running our CLI, not trcc directly.
  • Panel shows boot logo / blanks — no frames arriving; check ~/Library/Logs/claude-trofeo-hud/hud.log. Unplug/replug is handled automatically with backoff.
  • Empty cost/tokensnpx ccusage must work in a terminal first; the launchd agent bakes the node path into its plist at install time, so re-run install-agent after Node upgrades.
  • Limits stale — Keychain access not granted, or you're logged out of Claude Code.
联系我们 contact @ memedata.com