Skip to content

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

Release 0.4.1: Pillow 13 for its security fixes, and a shorter README

click6067-ship-itac2e76aabf7e
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 621830e..d42b3a0 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -76,7 +76,7 @@ jobs:
token-tv autostart status --config "$cfg" | grep -q "does not start"
no-python:
- # The npm launcher where no Python 3.10+ and no uv can be found: it fetches its pinned uv, checks the digest it
+ # The npm launcher where no Python 3.11+ and no uv can be found: it fetches its pinned uv, checks the digest it
# keeps, and runs TokenTV with the Python that uv brings. The runner has Python; PATH here hides it.
name: npx with no Python
runs-on: ubuntu-latest
diff --git a/README.ko.md b/README.ko.md
index cce4f6b..e8cd546 100644
--- a/README.ko.md
+++ b/README.ko.md
@@ -6,27 +6,25 @@
<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"><a href="https://youtube.com/shorts/FN5DLILYiI0"><img src="docs/images/real-clock-shorts.jpg" width="256" alt="실제 시계에서 도는 TokenTV: 16초 영상"></a> <img src="docs/images/arcade.gif" width="320" alt="움직이는 Arcade 화면(샘플 데이터): Clawd, Codex 구름, Grok, Copilot, Anti가 일하는 모습, 그림이 곧 게이지"></p>
-<p align="center"><img src="docs/images/real-clock.jpg" alt="작은 책상 시계에 띄운 TokenTV"></p>
-<p align="center"><img src="docs/images/clock-faces.png" alt="시계 화면 몇 가지(샘플 데이터)"></p>
+<p align="center"><b>약 5달러 Wi-Fi 책상 시계에 Claude·Codex 사용 한도를 띄웁니다. 펌웨어는 그대로예요.</b></p>
-약 5달러 Wi-Fi 책상 시계에 Claude·Codex 사용 한도(그리고 Grok, CodexBar를 거쳐 Copilot·Antigravity)를 띄웁니다. 펌웨어는 그대로예요.
-**새 화면 Arcade:** 캐릭터마다 그림이 곧 게이지인 움직이는 화면입니다. 드문 장면 몇 개는 그 순간이 실제로 찾아올 때만 열립니다. 아래 줄에는 캐릭터가 지금 하는 일, 남은 사용량 배터리, 초기화 시각이 나옵니다.
-**영상:** [실제 시계에서 16초](https://youtube.com/shorts/FN5DLILYiI0). **구경하기:** [라이브 데모](https://token-tv.vercel.app), `npx token-tv demo` 또는 `uvx token-tv demo`, 시계·로그인 없이 바로.
+<p align="center"><a href="https://youtube.com/shorts/FN5DLILYiI0"><img src="docs/images/real-clock-shorts.jpg" width="240" alt="실제 시계에서 도는 TokenTV: 16초 영상"></a> <img src="docs/images/arcade.gif" width="240" alt="움직이는 Arcade 화면(샘플 데이터): Clawd, Codex 구름, Grok, Copilot, Anti가 일하는 모습, 그림이 곧 게이지"></p>
+
+**새 화면 Arcade:** 캐릭터마다 그림이 곧 게이지이고, 아래 줄에 지금 하는 일, 남은 사용량 배터리, 초기화 시각이 나옵니다.
+
+**구경하기:** [라이브 데모](https://token-tv.vercel.app) 또는 `npx token-tv demo`, 시계·로그인 없이 바로.
+**설치하기:** 계속 켜 두는 컴퓨터에서 `npx token-tv start`(또는 `uvx token-tv start`). 로그인된 도구와 같은 와이파이의 시계를 찾고, 백그라운드에서 계속 돌며, 대시보드를 엽니다. AI에게 *"TokenTV 설정해줘"* 라고 해도 됩니다([AGENTS.md](AGENTS.md)).
**필요한 것:**
-- 컴퓨터와 같은 와이파이에 연결된 GeekMagic SmallTV 시계(SD_PRO 또는 Ultra, [호환 시계](docs/hardware-compatibility.md)).
-- Claude Code, Codex, Grok CLI 중 하나를 설치하고 로그인해 둔, 계속 켜 두는 컴퓨터. 브라우저에서 claude.ai나 chatgpt.com에 로그인한 것만으로는 안 됩니다. [Claude Code](https://code.claude.com/docs/ko/quickstart)나 Codex(`npm install -g @openai/codex`)를 설치해 같은 계정으로 로그인하세요. Mac이라면 브라우저의 Claude 로그인도 [CodexBar](docs/codexbar.md#claude-in-the-browser-only-on-a-mac-experimental)를 거쳐 쓸 수 있습니다(실험 단계).
-- `npx`를 쓸 [Node](https://nodejs.org/). 다른 것은 필요 없습니다. Python이 필요하면 런처가 알아서 받아 옵니다.
+- GeekMagic SmallTV 시계, SD_PRO 또는 Ultra([호환 시계](docs/hardware-compatibility.md)).
+- 그 컴퓨터에 로그인해 둔 Claude Code, Codex, Grok CLI 중 하나. 브라우저 로그인만으로는 안 됩니다([설정](docs/setup.ko.md)).
+- `npx`를 쓸 [Node](https://nodejs.org/). Python이 필요하면 런처가 알아서 받아 옵니다.
-Windows에서는 claude·codex가 로그인된 쪽(Windows 또는 WSL)에서 실행하세요. Node를 설치한 Windows에서 바로 돌리는 게 가장 간단하고, WSL은 마지막 터미널을 닫으면 곧 꺼집니다.
-컴퓨터가 잠자기 상태일 때는 시계가 마지막 그림을 그대로 보여 줍니다. 로그인 정보는 내 컴퓨터에만 있습니다:
-TokenTV는 각 서비스의 CLI가 저장한 로그인으로 사용량만 묻고, 시계는 그림만 받습니다.
+로그인 정보는 내 컴퓨터에만 있습니다: TokenTV는 각 서비스의 CLI가 저장한 로그인으로 사용량만 묻고, 시계는 그림만 받습니다.
-**설치하기:** Claude·Codex·Grok을 쓰는 컴퓨터에서 `npx token-tv start`(또는 `uvx token-tv start`) 한 줄이면 됩니다. 로그인된 도구와 같은 와이파이의 시계를 스스로 찾고, 원하면 터미널을 닫아도 컴퓨터를 다시 켜도 계속 돌게 해 주며, 대시보드를 엽니다. [라이브 데모](https://token-tv.vercel.app)에서 화면과 도구를 고르면 명령을 만들어 줍니다. AI에게 이 저장소를 주고 *"TokenTV 설정해줘"* 라고 해도 됩니다([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)
-**새 소식:** 새 화면과 지원 시계는 [릴리스](https://github.com/click6067-ship-it/token-tv/releases)로 나옵니다. 받아 보려면 Watch → Custom → Releases.
-**업데이트:** `npx token-tv update`(또는 `uvx token-tv update`)가 백그라운드로 도는 TokenTV를 최신 릴리스로 바꿔 다시 켭니다. 설정과 로그인은 그대로입니다. 새 릴리스가 나오면 대시보드에 작게 알려 줍니다(PyPI를 하루 한 번 확인, 설정에 `"update_check": false`면 끔).
+<p align="center"><img src="docs/images/real-clock.jpg" alt="실제 시계의 Digital, Pixel Retro, Sci-Fi HUD 화면"></p>
+<p align="center"><img src="docs/images/four-faces.png" alt="화면 네 가지: Digital, Neon, Pixel Retro, Sci-Fi HUD(샘플 데이터)"></p>
-<p align="center"><a href="examples/gameboy"><img src="examples/gameboy/comparison.png" width="640" alt="내 화면 만들기: 같은 샘플 사용량으로 그린 원래 픽셀 화면과 4색 Game Boy 예제"></a></p>
+**업데이트:** `npx token-tv update`(또는 `uvx token-tv update`), 설정과 로그인은 그대로입니다.
+**내 화면 만들기:** [Game Boy 예제](examples/gameboy)에서 시작해 AI에게 바꿔 달라고 하세요([가이드](docs/clock-faces.md)).
+자세히: [설정과 옵션](docs/setup.ko.md) · [CodexBar(Copilot, Antigravity)](docs/codexbar.md) · [애플워치](docs/apple-watch.md) · [English](README.md)
diff --git a/README.md b/README.md
index f014e1d..a97e34d 100644
--- a/README.md
+++ b/README.md
@@ -6,27 +6,25 @@
<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"><a href="https://youtube.com/shorts/FN5DLILYiI0"><img src="https://raw.githubusercontent.com/click6067-ship-it/token-tv/main/docs/images/real-clock-shorts.jpg" width="256" alt="TokenTV on a real clock: a 16-second video"></a> <img src="https://raw.githubusercontent.com/click6067-ship-it/token-tv/main/docs/images/arcade.gif" width="320" alt="The animated Arcade face (sample data): Clawd, the Codex cloud, Grok, Copilot and Anti at work, each picture also a gauge"></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="Some of the clock faces (sample data)"></p>
-
-Your Claude and Codex usage limits (plus Grok, and Copilot or Antigravity through CodexBar) on a ~$5 Wi-Fi desk clock. No firmware flashing.
-**New: Arcade**, an animated face where each character's picture is also its gauge, with a few rare scenes that open only when their moment comes on your clock. Under it, what the character is doing, a battery of what is left and the reset time.
-**Watch it:** [16 seconds on a real clock](https://youtube.com/shorts/FN5DLILYiI0). **Try it:** [live demo](https://token-tv.vercel.app), `npx token-tv demo` or `uvx token-tv demo`, no clock or login needed.
-
-**What you need:**
-- A GeekMagic SmallTV (SD_PRO or Ultra) on your Wi-Fi ([which ones work](https://github.com/click6067-ship-it/token-tv/blob/main/docs/hardware-compatibility.md)).
-- A computer that stays on, where Claude Code, Codex or the Grok CLI is installed and signed in. A claude.ai or chatgpt.com login in the browser is not enough: install [Claude Code](https://code.claude.com/docs/en/quickstart) or Codex (`npm install -g @openai/codex`) and sign in with the same account. On a Mac, Claude in the browser can do through [CodexBar](https://github.com/click6067-ship-it/token-tv/blob/main/docs/codexbar.md#claude-in-the-browser-only-on-a-mac-experimental) (experimental).
-- [Node](https://nodejs.org/), for `npx`. Nothing else: the launcher brings its own Python if it needs one.
-
-On Windows, run it on the side where your claude or codex is signed in: Windows itself with Node is simplest, and WSL stops soon after its last terminal closes.
-While the computer sleeps, the clock keeps its last picture. Your logins stay on your computer: TokenTV asks each
-service for your usage with the login its own CLI saved, and the clock only ever receives a picture.
-
-**Set it up:** run `npx token-tv start` (or `uvx token-tv start`) on the computer where you use Claude, Codex or Grok. It finds your signed-in tools and the clock on your Wi-Fi, offers to keep running after you close the terminal and after a restart, and opens your dashboard. Pick a face and tools on the [live demo](https://token-tv.vercel.app) and it writes the command for you. Or give this repo to your AI and say *"Set up TokenTV for me."* ([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)
-**Updates:** new faces and supported clocks ship as [releases](https://github.com/click6067-ship-it/token-tv/releases). To get them, use Watch → Custom → Releases.
-**Update:** `npx token-tv update` (or `uvx token-tv update`) puts the newest release in the background copy's place and keeps your config and logins; the dashboard notes a new release (one PyPI check a day; `"update_check": false` in the config turns it off).
-
-<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>
+<p align="center"><b>Your Claude and Codex usage limits on a ~$5 Wi-Fi desk clock. No firmware flashing.</b></p>
+
+<p align="center"><a href="https://youtube.com/shorts/FN5DLILYiI0"><img src="https://raw.githubusercontent.com/click6067-ship-it/token-tv/main/docs/images/real-clock-shorts.jpg" width="240" alt="TokenTV on a real clock: a 16-second video"></a> <img src="https://raw.githubusercontent.com/click6067-ship-it/token-tv/main/docs/images/arcade.gif" width="240" alt="The animated Arcade face (sample data): Clawd, the Codex cloud, Grok, Copilot and Anti at work, each picture also a gauge"></p>
+
+**New: Arcade.** Each character's picture is its gauge; under it, what it is doing, a battery of what is left and the reset time.
+
+**Try it:** [live demo](https://token-tv.vercel.app) or `npx token-tv demo`, no clock or login needed.
+**Set it up:** run `npx token-tv start` (or `uvx token-tv start`) on a computer that stays on. It finds your signed-in tools and the clock on your Wi-Fi, keeps running in the background and opens your dashboard. Or tell your AI *"Set up TokenTV for me"* ([AGENTS.md](https://github.com/click6067-ship-it/token-tv/blob/main/AGENTS.md)).
+
+**You need:**
+- A GeekMagic SmallTV, SD_PRO or Ultra ([which ones work](https://github.com/click6067-ship-it/token-tv/blob/main/docs/hardware-compatibility.md)).
+- Claude Code, Codex or the Grok CLI, signed in on that computer. A browser login alone is not enough ([setup](https://github.com/click6067-ship-it/token-tv/blob/main/docs/setup.md)).
+- [Node](https://nodejs.org/), for `npx`. It brings its own Python if it needs one.
+
+Your logins stay on your computer: TokenTV asks each service with the login its own CLI saved, and the clock only ever receives a picture.
+
+<p align="center"><img src="https://raw.githubusercontent.com/click6067-ship-it/token-tv/main/docs/images/real-clock.jpg" alt="Digital, Pixel Retro and Sci-Fi HUD on the real clock"></p>
+<p align="center"><img src="https://raw.githubusercontent.com/click6067-ship-it/token-tv/main/docs/images/four-faces.png" alt="Four of the faces: Digital, Neon, Pixel Retro and Sci-Fi HUD (sample data)"></p>
+
+**Update:** `npx token-tv update` (or `uvx token-tv update`) keeps your config and logins.
+**Make your own face** from the [Game Boy example](https://github.com/click6067-ship-it/token-tv/tree/main/examples/gameboy) with your AI ([guide](https://github.com/click6067-ship-it/token-tv/blob/main/docs/clock-faces.md)).
+More: [setup and options](https://github.com/click6067-ship-it/token-tv/blob/main/docs/setup.md) · [how it works](https://github.com/click6067-ship-it/token-tv/blob/main/docs/stock-photo-display.md) · [CodexBar (Copilot, Antigravity)](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)
diff --git a/bin/token-tv.js b/bin/token-tv.js
index 326685e..df4c38b 100755
--- a/bin/token-tv.js
+++ b/bin/token-tv.js
@@ -1,6 +1,6 @@
#!/usr/bin/env node
// One-line launcher: `npx token-tv start`.
-// Runs the Python package in this folder: with uv if it is on PATH; else with a Python 3.10+ in a private venv; else
+// Runs the Python package in this folder: with uv if it is on PATH; else with a Python 3.11+ in a private venv; else
// with a private uv, one pinned release fetched once from Astral's GitHub releases and checked against the SHA-256
// kept below, which brings its own Python. Node is the only thing to have installed.
const { spawnSync } = require('node:child_process');
@@ -112,15 +112,15 @@ async function privateUvx(python) {
const exe = path.join(dir, win ? 'uvx.exe' : 'uvx');
if (fs.existsSync(exe)) return exe;
const asset = uvAsset(process.platform, process.arch);
- if (!asset) fail('TokenTV needs Python 3.10 or newer on this computer: https://www.python.org/downloads/');
+ if (!asset) fail('TokenTV needs Python 3.11 or newer on this computer: https://www.python.org/downloads/');
const { name, url, target } = asset;
console.error(python ? `First run: TokenTV could not prepare itself with ${python}, so it fetches uv ${UV_VERSION}, which brings its own Python (about a minute)...`
- : `First run: no Python 3.10+ here, so TokenTV fetches uv ${UV_VERSION}, which brings its own (about a minute)...`);
+ : `First run: no Python 3.11+ here, so TokenTV fetches uv ${UV_VERSION}, which brings its own (about a minute)...`);
let archive;
try {
archive = await download(url);
} catch (error) {
- fail(`Could not download uv (${error.message}). Install Python 3.10+ or uv (https://docs.astral.sh/uv/) and run this again.`);
+ fail(`Could not download uv (${error.message}). Install Python 3.11+ or uv (https://docs.astral.sh/uv/) and run this again.`);
}
if (!checkUv(archive, target)) {
fail(`The uv download did not match the checksum TokenTV keeps for uv ${UV_VERSION}; nothing was installed. Try again later.`);
@@ -141,7 +141,7 @@ function main() {
// A Python new enough (macOS ships 3.9; Windows may have only the Microsoft Store's python stub, which fails here).
const python = ['python3', 'python', 'py'].map(which)
- .find((p) => p && spawnSync(p, ['-c', 'import sys; sys.exit(sys.version_info < (3, 10))']).status === 0);
+ .find((p) => p && spawnSync(p, ['-c', 'import sys; sys.exit(sys.version_info < (3, 11))']).status === 0);
if (python && preparedVenv(python)) process.exit(run(path.join(cache, 'venv', win ? 'Scripts' : 'bin', 'token-tv'), args));
privateUvx(python).then((exe) => {
diff --git a/docs/images/arcade.gif b/docs/images/arcade.gif
index e699eca..95d1e88 100644
Binary files a/docs/images/arcade.gif and b/docs/images/arcade.gif differ
diff --git a/docs/images/four-faces.png b/docs/images/four-faces.png
new file mode 100644
index 0000000..41ff473
Binary files /dev/null and b/docs/images/four-faces.png differ
diff --git a/docs/setup.ko.md b/docs/setup.ko.md
index 0c015a1..ee69c1c 100644
--- a/docs/setup.ko.md
+++ b/docs/setup.ko.md
@@ -43,6 +43,12 @@ token-tv run # 대시보드 http://127.0.0.1:8787, 시계 구
클론에서는 `python3 -m venv .venv && .venv/bin/pip install .`로 같은 명령을 `.venv/bin/token-tv`로 쓸 수 있습니다.
+**업데이트:** `npx token-tv update`(또는 `uvx token-tv update`)가 백그라운드로 도는 TokenTV를 최신 릴리스로 바꿔
+다시 켭니다. 설정과 로그인은 그대로입니다. 새 릴리스가 나오면 대시보드에 작게 알려 줍니다(PyPI를 하루 한 번 확인,
+설정에 `"update_check": false`면 끔). 새 화면과 지원 시계는 [릴리스](https://github.com/click6067-ship-it/token-tv/releases)로
+나옵니다. 받아 보려면 Watch → Custom → Releases. 로그인 정보는 내 컴퓨터에만 있습니다: TokenTV는 각 서비스의 CLI가
+저장한 로그인으로 사용량만 묻고, 시계는 그림만 받습니다.
+
<p align="center"><img src="images/usage-examples.png" alt="사용량이 적을 때, 바쁠 때, 한도에 가까울 때의 Digital 화면(샘플 데이터)"></p>
<details>
@@ -96,7 +102,7 @@ AI에게 바꿔 달라고 하면 됩니다. 시계 화면은 240×240 픽셀을
- 순정 펌웨어에 사진 앨범 페이지가 있는 GeekMagic **SmallTV** 240×240 Wi-Fi 시계: **SD_PRO**(제작자의 영수증은
5,650원, 한국 알리익스프레스 할인가이며 가격은 지역마다 다릅니다) 또는 **SmallTV-Ultra**(기여자들이 확인).
다른 기기는 확인하지 않았습니다.
-- 같은 네트워크에서 계속 켜 두는 컴퓨터. 쓰는 공식 CLI가 로그인돼 있고, Node(또는 Python 3.10+)가 있어야
+- 같은 네트워크에서 계속 켜 두는 컴퓨터. 쓰는 공식 CLI가 로그인돼 있고, Node(또는 Python 3.11+)가 있어야
합니다.
SD_PRO의 사진 API(`/theme/list`, `/photo/list`, `/photo/upload`)는 제작자의 시계에서 확인했습니다. 다른 펌웨어를
diff --git a/docs/setup.md b/docs/setup.md
index f552b89..b3ccdb1 100644
--- a/docs/setup.md
+++ b/docs/setup.md
@@ -44,6 +44,13 @@ token-tv run # dashboard at http://127.0.0.1:8787, drives the c
From a clone, `python3 -m venv .venv && .venv/bin/pip install .` gives the same command as `.venv/bin/token-tv`.
+**Updating:** `npx token-tv update` (or `uvx token-tv update`) puts the newest release in the background copy's
+place and keeps your config and logins. The dashboard notes a new release after one PyPI check a day
+(`"update_check": false` in the config turns it off). New faces and supported clocks ship as
+[releases](https://github.com/click6067-ship-it/token-tv/releases); to hear of them, use Watch → Custom → Releases.
+Your logins stay on your computer: TokenTV asks each service with the login its own CLI saved, and the clock only
+ever receives a picture.
+
<p align="center"><img src="images/usage-examples.png" alt="Digital face at low, busy and near-limit usage (sample data)"></p>
<details>
@@ -101,7 +108,7 @@ or **New**. Likes are counted by hand before releases, so the list says when the
(the author's receipt shows ₩5,650, a Korean AliExpress discount; prices vary by region) or the
**SmallTV-Ultra** (checked by contributors). No other device has been checked.
- Any always-on machine on the same network with the official CLIs you use, signed in, and Node
- (or Python 3.10+).
+ (or Python 3.11+).
The SD_PRO photo API (`/theme/list`, `/photo/list`, `/photo/upload`) is verified on the author's
clock. Clones with other firmware are untested.
diff --git a/examples/gameboy/README.md b/examples/gameboy/README.md
index 044e0ea..61d5c71 100644
--- a/examples/gameboy/README.md
+++ b/examples/gameboy/README.md
@@ -14,7 +14,7 @@ The third image marks Codex as an old reading and gives Grok no data.
## Run it (no clock, no login, no fork)
-Checked on Linux (2026-10-04). Python 3.10+.
+Checked on Linux (2026-10-04). Python 3.11+.
```bash
git clone https://github.com/click6067-ship-it/token-tv && cd token-tv
diff --git a/package.json b/package.json
index 1f7a3ec..50109dd 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "token-tv",
- "version": "0.4.0",
+ "version": "0.4.1",
"description": "Your Claude, Codex, Grok, Copilot and Antigravity usage limits on a tiny Wi-Fi desk clock (launcher for the Python package)",
"license": "MIT",
"repository": {
diff --git a/pyproject.toml b/pyproject.toml
index 6f235f9..6d6d779 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,12 +4,12 @@ build-backend = "setuptools.build_meta"
[project]
name = "token-tv"
-version = "0.4.0"
+version = "0.4.1"
description = "Your AI usage limits on a $5 desk clock: Claude, Codex, Grok, Copilot and Antigravity on a 240x240 Wi-Fi clock"
readme = "README.md"
license = "MIT"
-requires-python = ">=3.10"
-dependencies = ["Pillow>=10.2,<13"]
+requires-python = ">=3.11"
+dependencies = ["Pillow>=13,<14"]
[project.urls]
Homepage = "https://github.com/click6067-ship-it/token-tv"
diff --git a/requirements.txt b/requirements.txt
index 145dde9..da734e1 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1 +1 @@
-Pillow>=10.2,<13
+Pillow>=13,<14
diff --git a/scripts/render_arcade_demo.py b/scripts/render_arcade_demo.py
index 8dd5bab..ac8a919 100644
--- a/scripts/render_arcade_demo.py
+++ b/scripts/render_arcade_demo.py
@@ -18,7 +18,8 @@ from token_tv.sample import D, H, snapshot # noqa: E402
CAST = [('claude', 'CLAUDE A', [('5H', 38, 3 * H), ('WEEK', 61, 3 * D)]), ('codex', 'CODEX A', [('WEEK', 47, 4 * D)]),
('grok', 'GROK A', [('BUDGET', 52, 12 * D)]), ('copilot', 'COPILOT A', [('MONTH', 46, 9 * D)]),
('antigravity', 'ANTI A', [('5H', 30, 2 * H)])]
-SHOWN = 48 # frames of each, a little over three seconds
+SHOWN = 21 # pictures of each: three seconds at the clock's pace
+CLOCK_MS = 140 # how long a SmallTV shows each picture (filmed 2026-10-31), so the page moves as the clock does
SCALE = 2
@@ -43,7 +44,7 @@ def main():
palette = sheet.quantize(colors=256, method=Image.Quantize.MEDIANCUT)
indexed = [f.quantize(palette=palette, dither=Image.Dither.NONE) for f in frames]
out = ROOT / 'docs' / 'images' / 'arcade.gif'
- indexed[0].save(out, save_all=True, append_images=indexed[1:], duration=arcade.FRAME_MS, loop=0, disposal=1,
+ indexed[0].save(out, save_all=True, append_images=indexed[1:], duration=CLOCK_MS, loop=0, disposal=1,
optimize=False)
print(f'{out} {out.stat().st_size // 1024} KB, {len(frames)} frames')
diff --git a/scripts/render_clock_faces.py b/scripts/render_clock_faces.py
index 2c4e30e..3dab558 100644
--- a/scripts/render_clock_faces.py
+++ b/scripts/render_clock_faces.py
@@ -1,4 +1,5 @@
-"""Render docs/images/clock-faces.png: all six clock faces from the real renderers.
+"""Render docs/images/clock-faces.png (six clock faces, for the setup guide) and docs/images/four-faces.png (the
+four the README shows, in a row) from the real renderers.
Every face shows the same synthetic accounts (25 / 72 / 94 %) so they compare at a glance:
python3 scripts/render_clock_faces.py
@@ -26,24 +27,33 @@ SAMPLE_ROWS = rows(('A', '5H', 25, 3 * H + 41 * 60), ('A', 'WEEK', 72, 2 * D + 6
FACES = [(style, title, SAMPLE_ROWS) for style, title in (
('digital', 'Digital'), ('neon', 'Neon'), ('retro', 'Pixel Retro'),
('hud', 'Sci-Fi HUD'), ('pixel', 'Pixel'), ('space', 'Space (animated)'))]
+README_FACES = ('digital', 'neon', 'retro', 'hud') # the README keeps four; Pixel and Space stay in the guide
TILE, GAP, MARGIN, CAPTION = 480, 36, 38, 62
-def main():
- out = ROOT / 'docs' / 'images' / 'clock-faces.png'
- width = 2 * MARGIN + 3 * TILE + 2 * GAP
- sheet = Image.new('RGB', (width, 2 * MARGIN + 2 * (TILE + CAPTION)), '#0b0e12')
+def sheet_of(faces, columns, tile):
+ rows = -(-len(faces) // columns)
+ gap, margin, caption = round(GAP * tile / TILE), round(MARGIN * tile / TILE), round(CAPTION * tile / TILE)
+ sheet = Image.new('RGB', (2 * margin + columns * tile + (columns - 1) * gap, 2 * margin + rows * (tile + caption)),
+ '#0b0e12')
draw = ImageDraw.Draw(sheet)
- font = ImageFont.truetype(str(ROOT / 'token_tv' / 'web' / 'manrope.ttf'), 22)
+ font = ImageFont.truetype(str(ROOT / 'token_tv' / 'web' / 'manrope.ttf'), round(22 * tile / TILE))
now = time.time()
- for index, (style, title, sample) in enumerate(FACES):
+ for index, (style, title, sample) in enumerate(faces):
frame = Image.open(io.BytesIO(render_page(snapshot(now, sample), style=style))).convert('RGB')
- x = MARGIN + index % 3 * (TILE + GAP)
- y = MARGIN + index // 3 * (TILE + CAPTION)
- sheet.paste(frame.resize((TILE, TILE), Image.Resampling.NEAREST), (x, y))
- draw.text((x + TILE / 2, y + TILE + 30), title, font=font, fill='#c9d1d9', anchor='mm')
- sheet.save(out, optimize=True)
- print(out)
+ x = margin + index % columns * (tile + gap)
+ y = margin + index // columns * (tile + caption)
+ sheet.paste(frame.resize((tile, tile), Image.Resampling.NEAREST), (x, y))
+ draw.text((x + tile / 2, y + tile + caption / 2), title, font=font, fill='#c9d1d9', anchor='mm')
+ return sheet
+
+
+def main():
+ for name, faces, columns, tile in (('clock-faces.png', FACES, 3, TILE),
+ ('four-faces.png', [f for f in FACES if f[0] in README_FACES], 4, 240)):
+ out = ROOT / 'docs' / 'images' / name
+ sheet_of(faces, columns, tile).save(out, optimize=True)
+ print(out, f'{out.stat().st_size // 1024} KB')
if __name__ == '__main__':
diff --git a/tests/test_update.py b/tests/test_update.py
index 52f099b..1dbba9c 100644
--- a/tests/test_update.py
+++ b/tests/test_update.py
@@ -176,6 +176,7 @@ class UpdateCommandTests(unittest.TestCase):
start = flat.index('systemctl --user enable --now token-tv.service')
return stop < got < start
+ @unittest.skipIf(sys.platform == 'win32', 'a systemd unit with POSIX paths, Linux only (Windows gets a Startup entry, tested below)')
def test_uvx_and_npx_with_uv_run_the_newest_release(self):
for env, how in (({}, 'uvx'), ({'TOKEN_TV_LAUNCHER': 'npx', 'TOKEN_TV_UVX': '/c/token-tv/uv/uvx'}, 'npx')):
with self.subTest(how=how):
@@ -200,6 +201,7 @@ class UpdateCommandTests(unittest.TestCase):
self.assertIn('--spec token-tv==99.0.0 token-tv start', self.unit.read_text(encoding='utf-8'))
self.assert_kept()
+ @unittest.skipIf(sys.platform == 'win32', 'a systemd unit with POSIX paths, Linux only (Windows gets a Startup entry, tested below)')
def test_pip_and_the_npx_venv_upgrade_in_place(self):
for prefix in ('/home/me/venvs/tt', '/home/me/.cache/token-tv/venv'):
with self.subTest(prefix=prefix):
@@ -304,7 +306,7 @@ class UpdateCommandTests(unittest.TestCase):
def test_the_command_to_type_keeps_the_config(self):
code, said = self.update('/home/me/.cache/uv/archive-v0/abc', {'uvx': '/usr/bin/uvx'}, running=True)
self.assertEqual(code, 0, said)
- self.assertIn(f"uvx token-tv@latest start --config '{self.config}'", said)
+ self.assertIn(f"uvx token-tv@latest start --config {autostart.quoted(self.config)}", said) # quoted for this shell
def test_the_newest_already_and_pypi_out_of_reach(self):
self.background(['/usr/bin/uvx', f'token-tv@{__version__}'])
diff --git a/token_tv/__init__.py b/token_tv/__init__.py
index 5f9944a..f2e9e34 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.4.0"
+__version__ = "0.4.1"