Skip to content
officialdadPublic

About

Claude Code usage monitor on ESP32 CYD 2.8" with pixel art animations

Resources

Stars

32 stars

Watchers

0 watching

Forks

Latest commit

 

History

92 Commits

Folders and files

Repository files navigation

 ██████  ██   ██     ███    ███ ██    ██
██    ██ ██   ██     ████  ████  ██  ██
██    ██ ███████     ██ ████ ██   ████
██    ██ ██   ██     ██  ██  ██    ██
 ██████  ██   ██     ██      ██    ██

 ██████ ██       █████  ██     ██ ██████
██      ██      ██   ██ ██     ██ ██   ██
██      ██      ███████ ██  █  ██ ██   ██
██      ██      ██   ██ ██ ███ ██ ██   ██
 ██████ ███████ ██   ██  ███ ███  ██████

Claude Code usage monitor on ESP32-2432S028R (CYD 2.8") with pixel art animations.

Real-time session + weekly usage. Animated pixel sprites. Digital clock.

Features

  • Usage bars — session + weekly utilization at a glance
  • 13 pixel sprites — changes based on activity state
  • Tmux detection — knows when Claude waiting for input
  • OTA updates — checks GitHub releases on boot
  • Captive portal config — no code changes for WiFi/daemon setup
  • Pixel clock — retro digital clock + second-progress bar
  • On-device settings — brightness, quiet hours, auto-cycle, sprite mode, orientation, factory reset
  • Page nav — indicator dots + < > tap buttons
  • Offline indicator — pixel X + colour-drain when unreachable

Hardware

Board ESP32-2432S028R (CYD 2.8")
Display 2.8" ILI9341 320x240 TFT
Touch XPT2046 resistive
Connectivity WiFi 2.4 GHz

Quick Start

One display, one hub, many machines. The hub probes Anthropic and serves the usage JSON. Every other machine runs an agent that reports its tmux panes to the hub. The display always points at the hub.

1. Install the hub

Runs on one machine. Polls Anthropic rate-limit headers and serves usage JSON. The installer prints the URL to enter in the display portal, as <hostname>.local.

# basic, no token
curl -fsSL https://raw.githubusercontent.com/opariffazman/ohmyclawd/master/install.sh | sudo bash

# with a token (recommended: /report needs one to accept machine reports)
curl -fsSL https://raw.githubusercontent.com/opariffazman/ohmyclawd/master/install.sh \
  | OHMYCLAWD_TOKEN=yourpassphrase sudo -E bash

The hub listens on the LAN (:8787) by default. The installer writes its config to /etc/ohmyclawd/ohmyclawd.env with mode 600, so the token is not world-readable.

2. Install an agent on every other machine

An agent needs no Anthropic credentials and makes no probe call. It watches tmux and pushes its pane counts to the hub every 10 seconds. Pass the hub URL and the same token.

curl -fsSL https://raw.githubusercontent.com/opariffazman/ohmyclawd/master/install.sh \
  | OHMYCLAWD_ROLE=agent OHMYCLAWD_HUB=http://<hub-host>.local:8787 \
    OHMYCLAWD_TOKEN=yourpassphrase sudo -E bash

On macOS, drop sudo:

curl -fsSL https://raw.githubusercontent.com/opariffazman/ohmyclawd/master/install.sh \
  | OHMYCLAWD_ROLE=agent OHMYCLAWD_HUB=http://<hub-host>.local:8787 \
    OHMYCLAWD_TOKEN=yourpassphrase bash

A machine that leaves the LAN stops pushing and drops out of the totals after 60 seconds. It rejoins when its pushes resume. Nothing else to do.

The usage bars stay correct with any number of machines: Anthropic rate-limit headers are per account, so the hub reports them alone and never sums them. Only the tmux "sessions" and "needs input" counts are summed across machines.

Other platforms — Releases:

Platform Binary
Linux x64 ohmyclawd-daemon-linux-amd64
Linux ARM64 ohmyclawd-daemon-linux-arm64
macOS x64 ohmyclawd-daemon-darwin-amd64
macOS ARM ohmyclawd-daemon-darwin-arm64
Windows x64 ohmyclawd-daemon-windows-amd64.exe
# Linux/macOS
chmod +x ohmyclawd-daemon-*
OHMYCLAWD_ROLE=hub OHMYCLAWD_TOKEN=yourpassphrase ./ohmyclawd-daemon-linux-amd64

# Windows
set OHMYCLAWD_TOKEN=yourpassphrase
ohmyclawd-daemon-windows-amd64.exe

3. Flash firmware

Browser (easiest): Web Flasher — USB connect, click install.

PlatformIO:

git clone https://github.com/opariffazman/ohmyclawd.git && cd ohmyclawd
pio run -e cyd -t upload

esptool: download ohmyclawd-firmware.bin from Releases:

esptool.py write_flash 0x10000 ohmyclawd-firmware.bin

4. Configure CYD

First boot creates WiFi AP:

  1. Connect to OhMyClawd on phone
  2. Captive portal opens (or 192.168.4.1)
  3. Enter WiFi SSID + password
  4. Set Daemon URL to the hub URL the installer printed (portal default: http://ohmyclawd.local:8787)
  5. Set Daemon Token (must match OHMYCLAWD_TOKEN on the hub)
  6. Set Timezone (POSIX TZ format)
  7. Save — reboots and connects

Settings persist. Hold 5s to reset, or use RESET row in settings (3s hold).

5. Done

Tap = cycle sprites. < > = switch modes.

Sprite States

Requires Claude Code in tmux:

State Sprite Trigger
Needs input expression-surprise, expression-wink Session idle >30s
Rate limited expression-sleep, idle-breathe Usage ≥ 80%
Heavy work-think, idle-look-around Usage 50–79%
Moderate work-coding, dance-djmix Usage 25–49%
Light dance-bounce, dance-sway, bounce-dj, sway-dj, idle-blink Usage < 25%

Settings

Reach via swipe or nav buttons (auto-cycle skips settings).

* rows = hold-drag sliders: hold 0.5s → orange bar → drag. Tap SAVE to persist.

Row Input What
BRIGHTNESS * hold-drag 10–100% PWM, live preview
QUIET START * hold-drag Hour 0–23
QUIET END * hold-drag Hour 0–23, cross-midnight OK (22→07)
QUIET MODE tap OFF / DIM / SLEEP
AUTO-CYCLE * hold-drag 5–250s interval, 0 = OFF
SPRITE MODE tap DYNAMIC / FREE
ORIENTATION tap NORMAL / FLIPPED
RESET hold 3s Clears WiFi + settings, reboots
SAVE tap Persist to NVS

SLEEP mode: screen dark. Tap = wake 10s.

Offline: bars + sprite drain grey, pulsing red X top-right. Auto-recovers.

Updates

Firmware: OTA on boot — checks GitHub, prompts to update.

Daemon: re-run the install script on each machine. It keeps the existing role, hub URL and token. On macOS, drop sudo:

curl -fsSL https://raw.githubusercontent.com/opariffazman/ohmyclawd/master/install.sh | sudo bash

Further Docs

How It Works

The hub daemon reads Claude Code OAuth credentials. It uses ~/.claude/.credentials.json where present and, on macOS, falls back to the Claude Code-credentials login Keychain item. It makes lightweight API requests and reads rate-limit response headers for session and weekly usage %. No messages are sent or read: headers only.

Each extra machine runs an agent. It reads only the local tmux panes and pushes their counts to the hub over the LAN. The hub sums those counts across live machines and serves one JSON payload in the same shape the display already reads.

Credits

Disclaimer

Unofficial. Not affiliated with Anthropic. Relies on undocumented rate-limit headers — may change without notice. Read-only access to local credentials file. Tokens never transmitted or exposed over network. Use at own risk.

License

MIT

About

Claude Code usage monitor on ESP32 CYD 2.8" with pixel art animations

Resources

Stars

32 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages