Skip to content

Turn a ~$5 AliExpress clock into a physical AI usage dashboard (Claude, Codex, multi-account). No firmware flashing.

7.5 KB
Raw Blame
<!doctype html>
<html lang="en" data-theme="digital">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="color-scheme" content="dark light">
<title>TokenTV · AI usage</title>
<link rel="icon" href="data:,">
<link rel="stylesheet" href="/assets/style.css">
<script src="/assets/app.js" defer></script>
</head>
<body>
<a class="skip" href="#providers">Skip to usage</a>
<div class="backdrop" aria-hidden="true">
  <div class="atmosphere"></div>
  <div class="glow glow-a"></div><div class="glow glow-b"></div><div class="glow glow-c"></div>
  <div class="starfield" id="starfield"></div>
  <div class="sweep"></div>
</div>
<div class="shell">
  <header class="topbar">
    <a class="brand" href="/" aria-label="TokenTV home"><span class="brandmark" aria-hidden="true"></span><span class="brand-word">TOKEN<b>TV</b></span></a>
    <div class="connection"><span class="status-dot" aria-hidden="true"></span><span id="connection">Connecting</span></div>
    <a class="control gallery-link" href="#gallery">Gallery</a>
    <button id="clock-toggle" class="control clock-toggle" type="button" aria-expanded="false" aria-controls="clock-panel">Clock display</button>
  </header>
  <nav class="theme-section" aria-label="Dashboard appearance">
    <span class="section-label">Appearance</span>
    <div id="themes" class="themes" role="group" aria-label="Web theme"></div>
  </nav>
  <div class="workspace">
    <aside id="clock-panel" class="clock-panel" aria-label="Physical clock" hidden>
      <div class="aside-head"><div><p class="eyebrow">Physical display</p><h2>Your clock</h2></div><button class="control icon-control" id="close-clock" type="button" aria-label="Close clock panel">×</button></div>
      <div class="device"><div class="lcd"><img id="frame" width="240" height="240" alt="Live clock preview"></div></div>
      <label for="clock-style">Clock style</label>
      <select id="clock-style" class="control"></select>
      <button class="control primary" id="apply" type="button" disabled>Apply to clock</button>
      <p id="display-state" role="status">Loading clock status</p>
      <p class="quiet">240 × 240 · The web appearance is separate from your clock style.</p>
      <section id="get-it" class="get-it" aria-label="Put it on your clock" hidden>
        <fieldset class="get-services"><legend>Your AI tools</legend>
          <label><input type="checkbox" value="claude" checked> Claude</label>
          <label><input type="checkbox" value="codex" checked> Codex</label>
          <label><input type="checkbox" value="grok" checked> Grok</label>
        </fieldset>
        <p class="quiet">On a computer that stays on, where Claude Code, Codex or the Grok CLI is signed in (a browser login is not enough; on a Mac, <a href="https://github.com/click6067-ship-it/token-tv/blob/main/docs/codexbar.md#claude-in-the-browser-only-on-a-mac-experimental">CodexBar can read one</a>), paste into a terminal:</p>
        <div class="get-command"><code id="get-command" aria-live="polite">npx token-tv start</code><button id="get-copy" class="control primary" type="button">Copy</button></div>
        <p id="get-status" class="get-status" role="status" aria-live="polite"></p>
        <label for="get-address">Clock address · optional</label>
        <input id="get-address" class="control" placeholder="found on your Wi-Fi" autocomplete="off" spellcheck="false" aria-describedby="get-status">
        <p class="quiet" id="get-note">It finds your signed-in tools and the clock, asks once to keep running when the computer starts, and opens your dashboard. <button id="get-runner" class="link-button" type="button">No Node? Use uvx instead</button></p>
        <p class="quiet">The clock: a GeekMagic SmallTV (SD_PRO or Ultra), <a href="https://github.com/click6067-ship-it/token-tv/blob/main/docs/hardware-compatibility.md">which ones work</a>.</p>
      </section>
    </aside>
    <main class="screen" id="dashboard">
      <header class="screen-head">
        <div class="title-block">
          <p class="eyebrow" id="eyebrow" hidden></p>
          <h1 id="page-title">AI USAGE DASHBOARD</h1>
          <p class="intro-note" id="intro-note" hidden></p>
        </div>
        <div class="mascot" id="mascot" aria-hidden="true"></div>
        <dl class="summary">
          <div class="summary-accounts"><dt>Accounts</dt><dd id="account-count">—</dd></div>
          <div class="summary-reporting"><dt>Reporting</dt><dd id="reporting-count">—</dd></div>
          <div class="summary-providers"><dt>Providers</dt><dd>3</dd></div>
          <div class="summary-clock"><dt>Today</dt><dd id="local-time"><span class="zone" id="clock-zone">Local</span><span class="date-iso"></span><span class="date-long"></span><span class="time"></span></dd></div>
        </dl>
      </header>
      <div id="notice" class="notice" role="status" hidden></div>
      <section class="provider-list" id="providers" aria-label="Provider usage"><p class="loading">Loading your accounts…</p></section>
      <footer class="screen-foot">
        <div class="footer-meta">
          <span id="foot-reporting">— reporting</span>
          <span id="updated">Waiting for data</span>
          <span id="update-note" class="update-note" hidden></span>
          <span>Refreshes every 5 min</span>
          <span class="signal" id="signal" data-strength="0" aria-hidden="true"><i></i><i></i><i></i></span>
        </div>
        <div class="legend" aria-label="Used quota levels"><span class="section-label">Used quota</span><span><i data-level="low"></i>0–49%</span><span><i data-level="medium"></i>50–79%</span><span><i data-level="high"></i>80–89%</span><span><i data-level="critical"></i>90–100%</span></div>
      </footer>
    </main>
  </div>
  <section class="gallery" id="gallery" aria-labelledby="gallery-title">
    <div class="themes-head"><h2 id="gallery-title">Gallery</h2><div class="theme-sort" role="group" aria-label="Sort clock faces"><button type="button" class="control" data-sort="popular" aria-pressed="true">Popular</button><button type="button" class="control" data-sort="new" aria-pressed="false">New</button></div></div>
    <p class="quiet" id="likes-as-of">Loading clock faces</p>
    <ul id="theme-list" class="theme-list"></ul>
    <p class="gallery-links"><a href="https://github.com/click6067-ship-it/token-tv/blob/main/docs/clock-faces.md">Make a face</a> · <a href="https://github.com/click6067-ship-it/token-tv/issues/new?template=share_a_face.md">Share a face</a></p>
    <p class="quiet">No clock needed to make one: it renders from sample data. With a clock, your own face shows up here as Local and can be applied.</p>
  </section>
  <section class="collection" id="collection" aria-labelledby="collection-title" hidden>
    <div class="themes-head"><h2 id="collection-title">Collection</h2><p class="quiet" id="collection-count"></p></div>
    <p class="quiet">Hidden scenes your clock has caught. The rest stay locked until their moment comes; missed one? Play it again on the clock.</p>
    <ul id="collection-list" class="collection-list"></ul>
  </section>
  <details class="help"><summary>How to read this display</summary><p>Percentages show <strong>used quota</strong>. The main gauge shows the selected account’s highest reported window; other windows open below it. Timers belong to that same window. A previous value is marked OLD and is not a current reading.</p><p>Grok CLI budget is a billing limit, not the Grok web conversation limit. If a provider does not report quota, it stays unknown. Laptop-linked accounts need the laptop online.</p></details>
</div>
</body>
</html>