Introduction
I built an app for the Even G2 smart glasses that shows how many calories and macros (protein, fat, carbs) I have left today. With the glasses on, one tap shows the number. Once I tried it, I found out that just being able to see it is surprisingly useful.
This post covers the whole path: from Hello World to a permanent install on the real glasses (Beta).
- Source code: https://github.com/sora-uzu/even-g2-meal-log
Tech stack
- Hardware: Even G2 (smart glasses)
- App: TypeScript, Vite, the Even Hub SDK (
@evenrealities/even_hub_sdk), the Even Hub CLI and simulator - Serving the data: Vite's dev server, Tailscale (VPN)
- Updating the log: Claude Code (driven from the Claude app on my phone)
What are Even G2 and Even Hub?
Even G2 is a pair of smart glasses from Even Realities. It shows small green text on the lenses (the display area for developers is 576×288). There is no camera. You control it with the touchpad or a ring controller (Even R1).
Even Hub is the system for building and distributing apps for the G2. Think of it as an App Store for the glasses.
- You build apps with web technology such as TypeScript. There is an official SDK, a CLI, and a simulator.
- You upload your app to the developer portal and distribute it in three stages: Private (only for testing), Beta (a group you choose), and Public (published after review).
- Published apps can be found and installed from the catalog.
In short, you can build your own app and put it on your own glasses.
What I built
The glasses show five lines:
Meals 11-20 (as of HH:MM) Left ◯◯◯ kcal P ◯◯ F ◯◯ C ◯◯ Total ◯◯◯ kcal Tap = refresh / Double tap = exit - Tap to reload. Double tap to exit.
- All the data comes from one file,
meal.json. The app only reads it.
Architecture
I report meals from the Claude app on my phone to Claude Code on my Mac. Claude Code rewrites meal.json, and the dev server on the Mac serves it. The app itself runs inside the Even app on the phone, fetches meal.json, and sends the display to the glasses.
Design: keep the data out of the app
Meals are personal health data, so I split things up like this:
- The app only reads
meal.jsonand displays it. -
meal.jsonlives on my own Mac and is listed in.gitignore, so it never reaches GitHub. - It is not packed into the app package (
.ehpk) either. I remove it fromdist/before packing. - The URL it is read from sits in
.env.production, which is also outside git.
An AI assistant (Claude Code) updates meal.json for me. When I report a meal, it logs the meal, works out the totals and what is left, and rewrites meal.json.
Side note: borrowing Vite's public/ folder as a data shelf
Vite is a tool for building websites. npm run dev starts a local server on your computer for checking your work, and npm run build collects the files for release into dist/.
The public/ folder is meant for files you want to keep as they are, such as images and icons. A file in public/ is served at a short URL like /meal.json.
In this app I borrow it for a different purpose: I put the daily-changing meal.json in public/ and serve it from the dev server. Because it is a server for development, the data stops being served when my Mac sleeps or shuts down. If you need it running all the time, you could swap in a small server that does nothing but serve files.
Making it permanent: a private Beta
With npm run dev, I had to scan a QR code every time to load the app on the glasses. To keep the app installed, you package it and put it in Beta.
Think of it as shipping a box to a warehouse and then picking it up yourself:
- Pack the box. Run
npm run build, remove personal data fromdist/, and runevenhub pack app.json dist -o app.ehpk. The.ehpkfile is the box. - Send it to the warehouse. Upload the
.ehpkto the portal (hub.evenrealities.com) and create a project. A new build starts as Private. - Choose who can get it. Change the build's tag from
PrivatetoBeta. Only Beta and Public apps show up in the glasses menu. - Add yourself as a tester. Beta is for people you choose, so invite your own email address as a tester in the Testing group, and accept the invitation email.
- Install it on your phone. In the Even app, open Me → Beta tester and install it. After that you can start it from the glasses menu.
The official docs describe the difference: Private is installed from the phone, while Beta can also be started from the glasses menu. If you want to launch it from the glasses alone, use Beta.
Reading data from outside your home
The packaged app reads meal.json from my Mac over the network. Three things were needed:
- Declare a
networkpermission and awhitelistwith the origin to read from inapp.json(after any change, repack and upload again). - Allow CORS on the server (with Vite:
server.cors: true). - Point the app at the Mac's Tailscale address.
Tailscale is a VPN that connects only your own devices. With it, the phone can reach the Mac even outside my home Wi-Fi, and the meal data never goes to a cloud service. The official docs say plain http is meant for development, and I found nothing about http over Tailscale. In my setup, though, the packaged app could read the file.
Things that tripped me up
- The simulator command was not found in my environment. I ran it directly with
nodeand the path to its bin file. - Tap events arrive with
eventTypeset toundefined(the template's notes mention it too). - The build copies personal files from
public/intodist/. Remove them before you pack.
Wrap-up
Even on a tiny display, having the information I need right where I look changed how often I use it. Next, I plan to add features on top of this display one at a time, such as a comparison with yesterday and a way to add meals.
I hope this helps anyone who wants to build a personal app for Even Hub.
- Japanese version (Zenn): https://zenn.dev/uzunaru/articles/389ea89fac6421

