Turn a ~$5 AliExpress clock into a physical AI usage dashboard (Claude, Codex, multi-account). No firmware flashing.
Release 0.2.0: PyPI and npm packages, Apple Watch JSON
click6067-ship-ita5a053c9f79c
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlnew file mode 100644index 0000000..102d792--- /dev/null+++ b/.github/workflows/release.yml@@ -0,0 +1,35 @@+name: Release++# Publishing a GitHub release uploads that tag to PyPI through Trusted Publishing (no stored token).+# PyPI side: project token-tv, owner click6067-ship-it, repository token-tv, workflow release.yml,+# environment pypi.++on:+ release:+ types: [published]++permissions:+ contents: read++jobs:+ pypi:+ name: Test, build and publish to PyPI+ runs-on: ubuntu-latest+ environment: pypi+ permissions:+ id-token: write+ steps:+ - uses: actions/checkout@v4+ - uses: actions/setup-python@v5+ with:+ python-version: "3.12"+ - run: sudo apt-get install -y -q fonts-dejavu-core+ - run: python -m pip install -q build Pillow+ - run: python -B -m unittest discover -s tests+ - run: python -m build+ - name: Install the wheel in a clean venv and render the demo faces+ run: |+ python -m venv /tmp/smoke+ /tmp/smoke/bin/pip install -q dist/*.whl+ cd /tmp && /tmp/smoke/bin/token-tv demo+ - uses: pypa/gh-action-pypi-publish@release/v1diff --git a/AGENTS.md b/AGENTS.mdindex 3e84b11..5f373cd 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -15,7 +15,7 @@ python3 -B -m unittest discover -s testsWhen the user says "Set up TokenTV for me":1. Install: `python3 -m venv .venv && .venv/bin/pip install -e .` (Windows: `.venv\Scripts\pip install -e .`),- or with Node only: `npx github:click6067-ship-it/token-tv demo`.+ or with Node only: `npx token-tv demo`.2. Ask the user for the clock's IP address (shown on the clock's screen).3. Run `.venv/bin/token-tv start --device-url <ip>`. It finds the Claude, Codex and Grok CLIs that are alreadysigned in, reads each account's email through the official login, asks the user to confirm, saves thediff --git a/README.ko.md b/README.ko.mdindex 79a1846..fe806d7 100644--- a/README.ko.md+++ b/README.ko.md@@ -10,7 +10,7 @@<p align="center"><img src="docs/images/clock-faces.png" alt="시계 화면 6종(샘플 데이터)"></p>약 5달러 Wi-Fi 책상 시계에 Claude·Codex 사용 한도를 띄웁니다. 펌웨어는 그대로예요.-**구경하기:** [라이브 데모](https://token-tv.vercel.app) 또는 `npx github:click6067-ship-it/token-tv demo`, 시계·로그인 없이 바로.+**구경하기:** [라이브 데모](https://token-tv.vercel.app), `npx token-tv demo` 또는 `uvx token-tv demo`, 시계·로그인 없이 바로.**설치하기:** 이 저장소를 AI에게 주고 *"TokenTV 설정해줘"* 라고 하세요. AI는 [AGENTS.md](AGENTS.md)를 따릅니다.**내 화면 만들기:** 시계 없이 [Game Boy 예제](examples/gameboy)에서 시작해 AI에게 바꿔 달라고 하세요. [가이드](docs/clock-faces.md) · [공유하기](https://github.com/click6067-ship-it/token-tv/issues/new?template=share_a_face.md)자세히: [설정](docs/setup.ko.md) · [호환 시계](docs/hardware-compatibility.md) · [CodexBar 연동](docs/codexbar.md) · [애플워치](docs/apple-watch.md) · [English](README.md)diff --git a/README.md b/README.mdindex 245266b..b8c7ef9 100644--- a/README.md+++ b/README.md@@ -1,18 +1,18 @@<h1 align="center">TokenTV</h1><p align="center"><a href="https://github.com/click6067-ship-it/token-tv/releases/latest"><img alt="Release" src="https://img.shields.io/github/v/release/click6067-ship-it/token-tv"></a>- <a href="LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-blue"></a>+ <a href="https://github.com/click6067-ship-it/token-tv/blob/main/LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-blue"></a><a href="https://hackaday.com/2026/10/06/smalltv-hacking-with-surprisingly-little-fuss/"><img alt="Featured on Hackaday" src="https://img.shields.io/badge/featured%20on-Hackaday-1a1a1a"></a><a href="https://github.com/steipete/CodexBar#desk-display"><img alt="Listed in CodexBar" src="https://img.shields.io/badge/listed%20in-CodexBar-555555"></a></p>-<p align="center"><img src="docs/images/real-clock.jpg" alt="TokenTV on a real tiny desk clock"></p>-<p align="center"><img src="docs/images/clock-faces.png" alt="Six clock faces (sample data)"></p>+<p align="center"><img src="https://raw.githubusercontent.com/click6067-ship-it/token-tv/main/docs/images/real-clock.jpg" alt="TokenTV on a real tiny desk clock"></p>+<p align="center"><img src="https://raw.githubusercontent.com/click6067-ship-it/token-tv/main/docs/images/clock-faces.png" alt="Six clock faces (sample data)"></p>Your Claude and Codex usage limits on a ~$5 Wi-Fi desk clock. No firmware flashing.-**Try it:** [live demo](https://token-tv.vercel.app) or `npx github:click6067-ship-it/token-tv demo`, no clock or login needed.-**Set it up:** give this repo to your AI and say *"Set up TokenTV for me."* It follows [AGENTS.md](AGENTS.md).-**Make your own face:** no clock needed, start from the [Game Boy example](examples/gameboy) and ask your AI to change it. [Guide](docs/clock-faces.md) · [Share it](https://github.com/click6067-ship-it/token-tv/issues/new?template=share_a_face.md)-Details: [how it works](docs/stock-photo-display.md) · [setup](docs/setup.md) · [compatible clocks](docs/hardware-compatibility.md) · [CodexBar input](docs/codexbar.md) · [Apple Watch](docs/apple-watch.md) · [한국어](README.ko.md)+**Try it:** [live demo](https://token-tv.vercel.app), `npx token-tv demo` or `uvx token-tv demo`, no clock or login needed.+**Set it up:** give this repo to your AI and say *"Set up TokenTV for me."* It follows [AGENTS.md](https://github.com/click6067-ship-it/token-tv/blob/main/AGENTS.md).+**Make your own face:** no clock needed, start from the [Game Boy example](https://github.com/click6067-ship-it/token-tv/tree/main/examples/gameboy) and ask your AI to change it. [Guide](https://github.com/click6067-ship-it/token-tv/blob/main/docs/clock-faces.md) · [Share it](https://github.com/click6067-ship-it/token-tv/issues/new?template=share_a_face.md)+Details: [how it works](https://github.com/click6067-ship-it/token-tv/blob/main/docs/stock-photo-display.md) · [setup](https://github.com/click6067-ship-it/token-tv/blob/main/docs/setup.md) · [compatible clocks](https://github.com/click6067-ship-it/token-tv/blob/main/docs/hardware-compatibility.md) · [CodexBar input](https://github.com/click6067-ship-it/token-tv/blob/main/docs/codexbar.md) · [Apple Watch](https://github.com/click6067-ship-it/token-tv/blob/main/docs/apple-watch.md) · [한국어](https://github.com/click6067-ship-it/token-tv/blob/main/README.ko.md)-<p align="center"><a href="examples/gameboy"><img src="examples/gameboy/comparison.png" width="640" alt="Change a face: original pixel style and a four-colour Game Boy example, rendered from the same sample readings"></a></p>+<p align="center"><a href="https://github.com/click6067-ship-it/token-tv/tree/main/examples/gameboy"><img src="https://raw.githubusercontent.com/click6067-ship-it/token-tv/main/examples/gameboy/comparison.png" width="640" alt="Change a face: original pixel style and a four-colour Game Boy example, rendered from the same sample readings"></a></p>diff --git a/bin/token-tv.js b/bin/token-tv.jsindex b03bef4..579f92a 100755--- a/bin/token-tv.js+++ b/bin/token-tv.js@@ -1,5 +1,5 @@#!/usr/bin/env node-// One-line launcher: `npx github:click6067-ship-it/token-tv demo`.+// One-line launcher: `npx token-tv demo`.// Runs the Python package from this checkout with uv if present, otherwise with a private venv.const { spawnSync } = require('node:child_process');const fs = require('node:fs');@@ -31,7 +31,7 @@ const source = `${root}@${version}`;if (!fs.existsSync(stamp) || fs.readFileSync(stamp, 'utf8') !== source) {console.error('First run: preparing TokenTV (about a minute)...');if (run(python, ['-m', 'venv', venv]) || run(path.join(bin, 'python'), ['-m', 'pip', 'install', '-q', root])) {- console.error('Could not install TokenTV. Try: pip install git+https://github.com/click6067-ship-it/token-tv');+ console.error('Could not install TokenTV. Try: pipx install token-tv');process.exit(1);}fs.writeFileSync(stamp, source);diff --git a/docs/setup.ko.md b/docs/setup.ko.mdindex af7c3b5..60595c3 100644--- a/docs/setup.ko.md+++ b/docs/setup.ko.md@@ -18,7 +18,7 @@ Grok은 CLI 예산 정보를 보여주는 실험적 기능입니다. 제작자Python 3.10+와 사용할 공급자의 공식 CLI(`claude`, `codex`, `grok`)가 필요합니다.```bash-pipx install git+https://github.com/click6067-ship-it/token-tv+pipx install token-tvtoken-tv demo # 로그인 없이 샘플 데이터로 모든 시계 화면을 렌더token-tv setup # 공급자당 최대 3계정 이메일과 시계 IP만 묻고, 기존 설정은 덮어쓰지 않음token-tv doctor --live # 지금 각 공급자에 조회해 빠진 CLI·로그인과 해결 명령을 안내@@ -32,8 +32,7 @@ A 계정은 평소 쓰던 로그인(`~/.claude` 등)을 재사용할 수 있고,`doctor`는 로그인 파일 존재만 보고, `doctor --live`는 실제 조회(만료 시 CLI 갱신 가능)를 하되계정별 상태만 출력합니다. 기여 방법은 [CONTRIBUTING.md](../CONTRIBUTING.md)와[시계 화면 만들기](clock-faces.md)를 봅니다.-아직 PyPI에 올리지 않았으므로 `uvx token-tv`는 동작하지 않습니다. 설치 없이 실행하려면-`uvx --from git+https://github.com/click6067-ship-it/token-tv token-tv demo`를 씁니다.+설치 없이 실행하려면 `uvx token-tv demo`(uv) 또는 `npx token-tv demo`(Node)를 씁니다.클론에서는 `pip install .`로 같은 명령을 설치합니다.macOS(실기기 미검증): Claude Code가 로그인을 Keychain에 두므로, CLI 홈에diff --git a/docs/setup.md b/docs/setup.mdindex 73d65d6..a82a9d8 100644--- a/docs/setup.md+++ b/docs/setup.md@@ -7,16 +7,15 @@ Everything that used to be in the README. Written for people and for AI coding aNeeds Python 3.10+ and the official CLI (`claude`, `codex` or `grok`) for each provider you use.```bash-pipx install git+https://github.com/click6067-ship-it/token-tv # or: pip install --user git+...+pipx install token-tv # or: pip install --user token-tvtoken-tv demo # every clock face with sample data, no logintoken-tv setup # asks for emails (up to 3 per provider) and the clock IPtoken-tv doctor --live # asks each provider now; says what is missing and the fixtoken-tv run # dashboard at http://127.0.0.1:8787, drives the clock```-`uvx --from git+https://github.com/click6067-ship-it/token-tv token-tv demo` runs it without installing.-TokenTV is not on PyPI yet, so plain `uvx token-tv` does not work. From a clone, `pip install .`-gives the same `token-tv` command.+`uvx token-tv demo` (uv) or `npx token-tv demo` (Node) runs it without installing. From a clone,+`pip install .` gives the same `token-tv` command.<p align="center"><img src="images/usage-examples.png" alt="Digital face at low, busy and near-limit usage (sample data)"></p>diff --git a/package.json b/package.jsonindex 8aded76..60ac134 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "token-tv",- "version": "0.1.0",+ "version": "0.2.0","description": "Your Claude and Codex usage limits on a tiny Wi-Fi desk clock (launcher for the Python package)","license": "MIT","repository": "github:click6067-ship-it/token-tv",diff --git a/pyproject.toml b/pyproject.tomlindex 72400d9..6dd77b9 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"[project]name = "token-tv"-version = "0.1.0"+version = "0.2.0"description = "Your AI usage limits on a $5 desk clock: Claude, Codex and Grok on a 240x240 Wi-Fi clock"readme = "README.md"license = "MIT"@@ -19,7 +19,8 @@ Demo = "https://token-tv.vercel.app"token-tv = "token_tv.cli:main"[tool.setuptools]-packages = ["token_tv", "token_tv.providers"]+packages = ["token_tv", "token_tv.providers", "token_tv.web", "token_tv.assets"][tool.setuptools.package-data]-token_tv = ["web/*", "assets/*.png", "assets/*.json"]+"token_tv.web" = ["*"]+"token_tv.assets" = ["*.png", "*.json"]diff --git a/token_tv/__init__.py b/token_tv/__init__.pyindex 8a007fd..b3928e0 100644--- a/token_tv/__init__.py+++ b/token_tv/__init__.py@@ -1,2 +1,2 @@"""TokenTV: AI usage limits on a tiny desk clock."""-__version__ = "0.1.0"+__version__ = "0.2.0"diff --git a/token_tv/sources.py b/token_tv/sources.pyindex 323b4ae..b7a71ce 100644--- a/token_tv/sources.py+++ b/token_tv/sources.py@@ -11,6 +11,8 @@ import threadingimport timeimport unicodedatafrom pathlib import Path++from token_tv import __version__from urllib.error import HTTPErrorfrom urllib.parse import parse_qs, urlparsefrom urllib.request import Request, urlopen@@ -232,7 +234,7 @@ def codex_payload(account):env = scoped_env("codex", Path(account["source_home"]).expanduser())rpc = RPC([exe("codex"), "app-server"], env)try:- rpc.call("initialize", {"clientInfo": {"name": "token_tv", "title": "TokenTV", "version": "0.1.0"}, "capabilities": {}})+ rpc.call("initialize", {"clientInfo": {"name": "token_tv", "title": "TokenTV", "version": __version__}, "capabilities": {}})rpc.process.stdin.write('{"method":"initialized","params":{}}\n')rpc.process.stdin.flush()identity = rpc.call("account/read", {"refreshToken": True}).get("account") or {}@@ -332,7 +334,7 @@ def logged_in_email(provider, home):return Nonerpc = RPC([exe("codex"), "app-server"], scoped_env("codex", root))try:- rpc.call("initialize", {"clientInfo": {"name": "token_tv", "title": "TokenTV", "version": "0.1.0"},+ rpc.call("initialize", {"clientInfo": {"name": "token_tv", "title": "TokenTV", "version": __version__},"capabilities": {}})rpc.process.stdin.write('{"method":"initialized","params":{}}\n')rpc.process.stdin.flush()