-
Notifications
You must be signed in to change notification settings - Fork 0
Setup Guide
Complete walkthrough for getting CodexMeter running on your desk.
- M5Stack AtomS3 (~$15)
- USB-C data cable (not charge-only)
- Python 3.10+ (
python3 --version) - git
- macOS or Linux (Windows untested)
- Codex installed with an active session
- Xcode 16.0+ and XcodeGen for the iOS app
-
OPENAI_ADMIN_KEYfor OpenAI cost tracking fallback
git clone https://github.com/BlockedPath/CodexMeter.git
cd CodexMeter
python3 -m venv .venv
.venv/bin/pip install platformio -r requirements.txtbash doctor.shThis checks Python, virtual env, deps, PlatformIO, AtomS3 connection, Codex auth, and API keys. Fix any failures before continuing.
Connect the AtomS3 via USB-C, then:
.venv/bin/platformio device list
# Find VID:PID=303A:1001 → e.g. /dev/cu.usbmodem101
.venv/bin/platformio run -d firmware -e m5stack_atoms3_smoke -t upload --upload-port /dev/cu.usbmodem101The screen should cycle red → green → blue, then show "AtomS3 CodexMeter" in white.
.venv/bin/platformio run -d firmware -e m5stack_atoms3 -t upload --upload-port /dev/cu.usbmodem101Or use the helper:
bash flash.sh /dev/cu.usbmodem101 m5stack_atoms3The screen shows "waiting for host" on a dark background when ready.
Note: The port name may change after flashing (device re-enumerates). Run
platformio device listagain.
# Test with a single update
.venv/bin/python daemon/codex-usage-daemon.py --transport serial --once
# Run continuously (refreshes every 60s)
.venv/bin/python daemon/codex-usage-daemon.py --transport serialThe AtomS3 display should update from "waiting for host" to live usage data.
bash install.sh| OS | Mechanism | Logs |
|---|---|---|
| macOS | LaunchAgent | ~/Library/Logs/codexmeter.log |
| Linux | systemd user | journalctl --user -u codex-usage-daemon |
cd ios/CodexMeterApp
brew install xcodegen # if not installed
xcodegen generate
open CodexMeterApp.xcodeprojSelect your iOS 17+ device as target, build and run (⌘R). The app discovers the daemon via Bonjour — ensure your Mac and iPhone are on the same Wi‑Fi network.
Run the daemon HTTP-only:
.venv/bin/python daemon/codex-usage-daemon.py --transport none --http-port 9595The iOS app will still discover and display usage data without a physical device.
- Press the AtomS3 button to cycle through screens
- Hold the button on the Pet Selector screen to change your pet
- Hold on any other screen to clear BLE bonds
- Check Troubleshooting if anything goes wrong
Getting Started
Reference
Development
Help
External