{"slug": "show-hn-claude-code-and-codex-usage-screen-for-trmnl-x-e-ink", "title": "Show HN: Claude Code and Codex usage screen for TRMNL X e-ink", "summary": "Piotr Migdał released an e-ink dashboard plugin for TRMNL X that displays Claude Code and Codex usage, including rate limits, API-equivalent cost per day per agent, and top projects, pushed from a Mac every 10 minutes. The plugin reads local state via unofficial endpoints and ccusage, with no servers involved. It requires a TRMNL private plugin webhook, configuration, and a LaunchAgent schedule.", "body_md": "An e-ink dashboard for a [TRMNL](https://trmnl.com) private plugin: rate\nlimits for Claude Code and Codex, API-equivalent $ per day per agent, and\nyour top projects — pushed from your Mac every 10 minutes.\n\nData sources (no servers, everything reads local state):\n\n**Claude limits + plan**— undocumented`api.anthropic.com/api/oauth/usage`\n\nendpoint, OAuth token from the macOS Keychain. Unofficial; rate-limited, so don't poll faster than ~10 min.**Codex limits**—`codex app-server`\n\nJSON-RPC; the CLI handles auth.**$ / day and top projects**—[ccusage](https://ccusage.com)via`pnpm dlx`\n\n, plus`~/.claude/projects/`\n\nJSONLs for project names and per-day sparklines.\n\n-\nOn trmnl.com create a\n\n**Private Plugin** with strategy**Webhook**; copy its URL. -\n`cp config.json.example config.json`\n\n, paste the URL (`config.json`\n\nis gitignored — the UUID lets anyone push to your screen). -\nPaste\n\n`template.liquid`\n\ninto the plugin's Markup editor. -\nTest:\n\n`uv run --no-project push_usage.py --dry-run`\n\n, then without the flag. -\nInstall the schedule (edit paths in the plist to match your machine):\n\n```\ncp com.pmigdal.trmnl-usage.plist ~/Library/LaunchAgents/\nlaunchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.pmigdal.trmnl-usage.plist\n```\n\nLogs: `/tmp/trmnl-usage.log`\n\n. Fetch failures also render as a warning strip\non the device and exit non-zero.\n\n| key | default | |\n|---|---|---|\n`webhook_url` |\n— | required (or `TRMNL_WEBHOOK_URL` env var) |\n`cost_days` |\n7 | days in the cost chart and sparklines |\n`top_projects` |\n6 | project rows |\n`chart_max_px` |\n230 | tallest chart bar, px |\n\n- The template targets TRMNL X's logical viewport (~936×702 @ 2× density); tiles at ≥90% usage invert to black.\n- TRMNL webhook caps: 12 pushes/hour, 2 KB payload.\n- The screen goes stale while the Mac sleeps — see the \"updated\" stamp.\n\nMIT © Piotr Migdał", "url": "https://wpnews.pro/news/show-hn-claude-code-and-codex-usage-screen-for-trmnl-x-e-ink", "canonical_source": "https://github.com/stared/trmnl-x-claude-codex", "published_at": "2026-08-11 09:44:03+00:00", "updated_at": "2026-08-11 10:11:54.819156+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools"], "entities": ["Piotr Migdał", "TRMNL", "Claude Code", "Codex", "ccusage", "Anthropic"], "alternates": {"html": "https://wpnews.pro/news/show-hn-claude-code-and-codex-usage-screen-for-trmnl-x-e-ink", "markdown": "https://wpnews.pro/news/show-hn-claude-code-and-codex-usage-screen-for-trmnl-x-e-ink.md", "text": "https://wpnews.pro/news/show-hn-claude-code-and-codex-usage-screen-for-trmnl-x-e-ink.txt", "jsonld": "https://wpnews.pro/news/show-hn-claude-code-and-codex-usage-screen-for-trmnl-x-e-ink.jsonld"}}