ESP8266 · 开源硬件 · 桌面伴侣

ESP8266 · Open-source hardware · Desk companion

桌上的一台
AI 状态小电脑
A tiny AI status computer
for your desk.

一枚可以捧在手心的复古麦金塔小屏幕,实时显示 Claude Code 与 Codex CLI 的工作状态、真实额度、网速和正在播放的音乐 —— 不需要任何官方账单 API key,数据全部来自你本机。

A palm-sized retro Macintosh that shows what Claude Code and Codex CLI are up to in real time — work status, true usage quota, network speed and now playing — no billing API key required, all data comes from your own machine.

无需 API keyNo API key needed· 支持 Windows / MacWindows & Mac· 网页一键刷机Flash from the browser· 240×240 彩屏240×240 color display· 硬件 + 软件全开源Fully open source
手心里的 AI Mac 小屏幕,屏幕上显示戴耳机的像素桌宠和 5h / 周额度百分比

它能显示什么

What it shows

一眼看清你的 AI 在忙什么。See what your AI is up to at a glance.

全屏单应用视图,谁在干活就显示谁。像素桌宠 + 一圈方形额度环,工作时动起来、空闲时静止。

Full-screen single-app view — whoever is working gets the screen. A pixel pet plus a square quota ring: animated while working, still when idle.

屏幕显示戴蓝色耳机的像素桌宠、顶部绿色额度进度条,下方 5h 24% / Weekly 3%
实时状态Live status

AI 工作状态与额度AI status & quota

working / idle / offline 一目了然。方形进度环 = 5h 与周窗口的真实用量百分比,颜色像红绿灯一样从绿到黄到红。

working / idle / offline at a glance. The square progress ring shows real usage of the 5-hour and weekly windows, shifting green → yellow → red like a traffic light.

任务管理器风格的网速曲线页,DOWN 53K/s、UP 1.2M/s,绿色面积图
网速曲线Network graph

实时网速监视器Real-time network monitor

任务管理器风格的滚动面积图,56 秒窗口、逐行写屏完全无闪烁。上下行读数取 1 秒平均,数据来自 Mac 内核网卡计数。

A Task-Manager-style scrolling area chart: 56-second window, drawn line by line with zero flicker. Up/down readings are 1-second averages from the Mac kernel's interface counters.

小屏幕显示万能青年旅店的专辑封面、歌名、歌手与播放进度条 0:23 / 5:44
音乐播放页Now playing

正在播放,一屏尽览Now playing, on one screen

专辑封面、歌名、歌手和播放进度条实时同步 Mac 上正在放的歌。封面 128×128 逐行绘制,每 2 秒刷新。

Album art, title, artist and progress bar stay in sync with whatever your Mac is playing. The 128×128 cover is drawn line by line and refreshes every 2 seconds.

屏幕显示一只黄色小河马桌宠,左上角 Codex 图标,下方 5h 1% / Weekly 22%
桌宠可换Swappable pets

3300+ 开源桌宠随便换3300+ open-source pets to pick from

内置 petdex.dev 画廊,搜索选一个动画一键上传。设备自己在板上解码缩放,重启也记得,不用重新烧录。

Built-in petdex.dev gallery — search, pick an animation, upload in one click. The board decodes and scales it on-device and remembers it across reboots. No reflashing.

🖥️ 实时镜像Live mirror

Mac 菜单栏左键弹出与设备完全同步的画面,不看设备也能确认。

Left-click the menu-bar icon for a pixel-perfect live mirror of the device — no need to look over at it.

🔴 红绿灯信号Traffic-light alerts

桥接掉线或数据过期时红色闪烁,提醒你马上看一眼。

The screen flashes red when the bridge goes offline or data turns stale, so you notice right away.

🔌 零配置配对Zero-config pairing

设备本来就在轮询本机,Mac 端记下来访 IP 即完成发现。

The device already polls your computer; the bridge records the visiting IP and discovery is done.

工作原理

How it works

两块拼图:桥接 app(Windows / Mac)+ ESP8266 固件。Two pieces: a bridge app (Windows / Mac) + ESP8266 firmware.

电脑上的桥接 app(同时支持 Windows 和 Mac)读本地会话日志、开一个局域网 HTTP 服务;小屏幕联网后每 15 秒轮询它,把状态画到屏上。

The bridge app on your computer reads local session logs and serves a LAN HTTP endpoint; the display polls it every 15 seconds over Wi-Fi and paints the status on screen.

手持小屏幕显示 working 状态:绿色进度环填满、桌宠在跑,背景 Mac 屏幕上是菜单栏 app 弹出的同款实时镜像画面
WORKING AI 干活时进度环填满亮绿、桌宠动起来 —— 背景 Mac 上就是菜单栏 app 弹出的实时镜像,与设备画面逐帧同步(5h 42% · Weekly 5%)。 While the AI works, the ring fills bright green and the pet starts running — the Mac behind shows the menu-bar app's live mirror, frame-synced with the device (5h 42% · Weekly 5%).
来源 · 你的电脑Source · Your computer

本地会话日志 + 官方用量接口Local session logs + official usage API

~/.claude / ~/.codex 会话记录判断忙闲,复用两个 CLI 已有的 OAuth 凭据取真实额度。

Reads ~/.claude / ~/.codex session records to tell busy from idle, and reuses the CLIs' existing OAuth credentials to fetch true quota.

│ localhost:8765
桥接 · Swift 菜单栏 appBridge · menu-bar app

合并数据,开局域网 HTTP 服务Merges data, serves HTTP on your LAN

菜单栏一颗小图标,左键弹出实时镜像、右键遥控设备(切换显示 / 换桌宠 / USB 刷写)。

One tiny menu-bar icon — left-click for the live mirror, right-click to control the device (switch views / change pet / flash over USB).

Wi-Fi 每 15s 轮询Wi-Fi poll every 15 s
显示 · ESP8266 小屏幕Display · ESP8266 screen

把时间 + 状态画到彩屏Paints time + status on the color screen

桌宠动画的上传、解码、缩放全部在板子上完成,换形象不再需要电脑参与。

Pet upload, decoding and scaling all happen on the board — changing pets no longer needs the computer.

  • 不需要任何账单 API key数据来自本机日志和两个 CLI 已存在的登录凭据,token 只发给各自官方 API。
  • No billing API key requiredData comes from local logs and the CLIs' existing login credentials; tokens only ever go to their own official APIs.
  • 真实额度,不是估算5h / 周窗口的已用百分比 + 重置倒计时,app 每 2 分钟拉一次官方用量接口。
  • True quota, not an estimateUsed percentage of the 5-hour / weekly windows plus reset countdowns; the app polls the official usage API every 2 minutes.
  • 毫秒级状态切换接收两个 CLI 官方 hooks 的事件推送,从"最多迟滞 20 秒"变成秒级响应。
  • Second-level status switchingListens to the two CLIs' official hook events, cutting "up to 20 s of lag" down to seconds.
  • 掉线自愈设备 DHCP 换了 IP 也能重新发现;桥接连不上时屏幕红色闪烁报警。
  • Self-healing connectionRediscovers the device after DHCP hands it a new IP; the screen flashes red when the bridge is unreachable.

🔒 隐私优先:所有数据都在你的局域网内流转,HTTP 服务只下发状态和 token 计数,不含任何 API key。

🔒 Privacy first: everything stays inside your LAN. The HTTP service only serves status and token counts — never any API key.

网页刷机

Flash from the browser

在浏览器里一键烧录,不装任何工具。One-click flashing in the browser — nothing to install.

用数据线把板子插到电脑,点一下按钮就把固件刷进去 —— 基于 Web Serial,全程在浏览器完成。

Plug the board into your computer with a data cable and click one button — powered by Web Serial, entirely in the browser.

四步搞定Four steps

无需命令行、无需 PlatformIO。适用于桌面版 Chrome / Edge。

No command line, no PlatformIO. Works in desktop Chrome / Edge.

  1. 用 USB 数据线把「WiFi 天气时钟 MG01」板子连到电脑Connect the "WiFi Weather Clock MG01" board to your computer with a USB data cable
  2. 点右侧「连接设备并烧录」,在弹窗里选中串口(CH340)—— 弹窗是空的?见下方排查Click "Connect & Flash" and pick the serial port (CH340) in the popup — empty popup? See the troubleshooting guide below
  3. 等待烧录完成,设备自动重启开机Wait for flashing to finish; the device reboots on its own
  4. 首次开机用手机连热点 AI-Clock-Setup,在中文配网页里选 Wi-Fi 输密码即可 —— 无需填 Bridge 地址,桥接 app 会自动发现设备并配对On first boot, join the AI-Clock-Setup hotspot from your phone and pick your Wi-Fi + password on the setup page — no bridge address needed, the bridge app discovers and pairs with the device automatically
当前浏览器不支持 Web Serial,请用桌面版 ChromeEdge 打开本页。This browser doesn't support Web Serial — please open this page in desktop Chrome or Edge.
需要通过 https://http://localhost 访问本页才能刷机。This page must be served over https:// or http://localhost for flashing to work.

配网后启动电脑上的桥接 app(下载 Windows / Mac 版),设备就会自动亮起来。

After Wi-Fi setup, launch the bridge app on your computer (download for Windows / Mac) and the device lights up automatically.

AI Mac 小屏幕 固件 v0.4.11AI Mac Mini Screen firmware v0.4.11
ESP8266 · 直接从这个页面刷入,约 30 秒完成ESP8266 · flashed straight from this page in about 30 s
2026-07-24 更新:Claude / Codex 额度页换上 Nothing 风格点阵字体,倒计时逐字符刷新更稳 · 建议与 v0.4.11 客户端一起升级Updated 2026-07-24: Claude / Codex quota pages now use a Nothing-style dot-matrix font, with smoother per-character countdown refresh · upgrade together with the v0.4.11 bridge app
刷不进去 / 弹窗里找不到设备?点开排查 →Can't flash / no device in the popup? Open the troubleshooting guide →

第 1 步:先换一根 USB 线(一半的问题都出在这)Step 1: try a different USB cable (half of all cases)

很多 USB 线是纯充电线,只供电、不传数据——插上后板子灯会亮,但电脑完全识别不到。请换一根确定能传数据的线(比如手机连电脑传过文件的那根)再试。

Many USB cables are charge-only — power but no data. The board's LED lights up, yet the computer never sees it. Grab a cable you know carries data (e.g. one you've used to transfer files from a phone) and try again.

Windows 用户On Windows

插上板子,打开设备管理器,展开「端口 (COM 和 LPT)」:

Plug the board in, open Device Manager and expand "Ports (COM & LPT)":

  • 没有任何新设备出现 → 是线或接口的问题,换线、换 USB 口(不要经 hub / 扩展坞,直插电脑)。
  • 有 CH340 但带黄色感叹号,提示「该设备无法启动 (代码 10)」 → 板子上的 CH340 是兼容芯片,被新版官方驱动拦截了。卸载现有驱动,改装 CH341SER 3.5 旧版驱动,然后在设备管理器里右键该设备 → 更新驱动程序 → 浏览计算机 → 选中旧版本。
  • 显示「USB-SERIAL CH340 (COMx)」一切正常,但网页弹窗里还是没有 → 换官方 Chrome 或 Edge 重试(360、QQ 等浏览器阉割了 Web Serial),并关掉 Arduino IDE 等可能占用串口的程序。
  • No new device appears → cable or port problem: try another cable / USB port (plug straight into the computer, not through a hub or dock).
  • CH340 shows a yellow warning: "This device cannot start (Code 10)" → the board's CH340 is a compatible clone blocked by the newer official driver. Uninstall the current driver, install the older CH341SER 3.5 driver, then in Device Manager right-click the device → Update driver → Browse my computer → pick the old version.
  • "USB-SERIAL CH340 (COMx)" looks fine but the browser popup is still empty → retry in official Chrome or Edge (many third-party Chromium browsers strip Web Serial), and close anything that may hold the port, such as Arduino IDE.

Mac 用户On Mac

不需要装任何驱动——macOS 系统自带 CH340 驱动,装第三方驱动反而容易出问题(内核扩展默认被系统拦截,导致设备无法识别)。

Don't install any driver — macOS ships with a CH340 driver, and a third-party one tends to make things worse (the kernel extension gets blocked by default and the device disappears).

  • 如果之前装过 CH340 驱动:打开「系统设置 → 隐私与安全性」,允许被拦截的系统扩展并重启;或者直接卸载该驱动后重启,用系统自带的即可。
  • 验证方法:打开「终端」,输入 ls /dev/cu.*,插拔一次板子对比输出——正常会新增一个 cu.usbserial-xxxcu.wchusbserial-xxx
  • If you installed a CH340 driver before: open System Settings → Privacy & Security, allow the blocked extension and reboot — or simply uninstall the driver, reboot, and use the built-in one.
  • To verify: open Terminal, run ls /dev/cu.*, unplug/replug the board and compare — a new cu.usbserial-xxx or cu.wchusbserial-xxx should appear.

还是不行?Still stuck?

  • 确认浏览器是桌面版官方 Chrome / Edge(Safari、Firefox 及大部分国产浏览器不支持 Web Serial)。
  • 看一眼板子上串口芯片的丝印:如果不是 CH340 而是 CH9102CP2102,Windows 需要装对应的驱动(Mac 依然免驱)。
  • 不要通过 USB hub、扩展坞或键盘上的 USB 口连接,直插电脑。
  • Make sure the browser is official desktop Chrome / Edge (Safari, Firefox and most third-party browsers don't support Web Serial).
  • Check the silkscreen on the serial chip: if it's a CH9102 or CP2102 rather than a CH340, Windows needs the matching driver (Mac still needs none).
  • Don't connect through a USB hub, dock, or keyboard port — plug directly into the computer.

桥接 app 下载

Bridge app download

下载桥接 app,Windows 和 Mac 都支持。Download the bridge app — Windows and Mac.

小屏幕的数据来自电脑上的桥接 app。下载对应系统的版本,打开即用。

The display gets its data from the bridge app on your computer. Grab the build for your OS and run it.

macOS

DMG 安装包,打开后把 app 拖进 Applications 即完成安装。

DMG installer — open it and drag the app into Applications. Done.

AIClockBridge-v0.4.11-macOS.dmg · 847 KB
下载 macOS 版 ↓Download for macOS ↓

Windows

自包含单文件 exe,双击直接运行,无需安装 .NET 运行时。

Self-contained single-file exe — double-click to run, no .NET runtime required.

AIClockBridge-v0.4.11-Windows-x64.exe · 75 MB
下载 Windows 版 ↓Download for Windows ↓

历史版本与完整更新日志见 Older versions and full changelogs on GitHub Releases →

完全开源

Fully open source

硬件、固件、Mac app 全部公开。Hardware, firmware and apps — all public.

拿去改、拿去做、拿去卖都行。喜欢的话给个 Star ⭐

Fork it, build it, even sell it. Leave a star if you like it ⭐

⚙️

硬件开源方案Open hardware

立创开源广场「SD2 / 小电视」原理图与 PCB。想自己打板、改外壳、批量做都从这里开始。

Schematic and PCB for the "SD2 / mini TV" on OSHWHub. Start here to fab your own boards, redesign the case, or build in volume.

oshwhub.com/q21182889/sd2
查看硬件工程 →View hardware project →

不想动手?也可以直接买成品:ESP8266 芯片的 WiFi 天气时钟都可以,拼多多可自行选购。

Don't want to solder? Any ESP8266-based "WiFi weather clock" works — ready-made units are cheap and easy to find online.

直接购买成品 →Buy a ready-made unit →
💻

软件开源仓库Software repository

ESP8266 固件(PlatformIO + Arduino,含板上 GIF 解码)与 Windows / Mac 桥接 app 的完整源码与文档。

Full source and docs for the ESP8266 firmware (PlatformIO + Arduino, with on-board GIF decoding) and the Windows / Mac bridge apps.

github.com/pengchujin/esp8266-ai
在 GitHub 打开 →Open on GitHub →