3.1 KiB
Even G2 App Lab 🕶️⭐
The repo that gives back. Everything here — docs, tooling notes, starter code, hard-won gotchas — is free for every Even Realities G2 developer. Take it, build on it, ship faster.
Built and maintained by drjones — homelab warlord, red teamer, and the guy who reads the SDK type definitions so you don't have to. If this repo saved you a weekend of debugging, pour one out for the countless hours spent discovering that the simulator sends sysEvent but hardware sends textEvent.
What's in here
| Path | What it is |
|---|---|
apps/ |
Working G2 apps — each one verified in the simulator before it lands |
docs/pages/ |
Full snapshot of the official Even Realities developer docs, converted to clean markdown (28 pages) — grep it, feed it to your agent, don't scrape it again |
README.md |
This love letter |
Why this exists
The G2 platform is awesome but the docs are a website and the SDK is a black box. This repo is:
- A local docs mirror — the entire developer documentation, markdown-ified, so it's searchable offline and LLM-friendly
- Proven starter code — every app here has been booted in the simulator, click-tested through the automation API, and screenshot-verified on the framebuffer
- A graveyard of gotchas — so they only kill each of us once
The golden gotchas (learned the hard way)
- Simulator ≠ hardware: simulator clicks arrive as
sysEvent, real glasses sendtextEvent. Handle BOTH or your app works in dev and dies in the wild. - SDK 0.0.14 API: bridge methods are on the instance (
bridge.createStartUpPageContainer(...)), containers must be class instances (new TextContainerProperty({...})), not plain objects. min_sdk_versioninapp.jsonmust match the SDK version innode_modules— mismatch = rejected.- HMR breaks the bridge — restart the simulator after code changes.
waitForEvenAppBridge()before everything — instant in sim, waits on hardware.- Network whitelist is NOT a CORS bypass — your API needs real CORS headers too.
- npm
omit=devsilently skips devDependencies — checknpm config get omitiftsc"doesn't exist".
Toolchain
| Tool | Version |
|---|---|
evenhub CLI |
0.1.13 |
evenhub-simulator |
0.8.0 |
@evenrealities/even_hub_sdk |
0.0.14 |
| Node | 20+ |
Quick start (one app, five commands)
npm create vite@latest my-app -- --template vanilla-ts
cd my-app && npm install
npm install @evenrealities/even_hub_sdk@latest
npm run dev # :5173
evenhub-simulator http://localhost:5173/ --automation-port 9898
Then drive it like a robot (the way apps should be tested):
curl http://127.0.0.1:9898/api/ping # -> pong
curl -X POST http://127.0.0.1:9898/api/input -H 'Content-Type: application/json' -d '{"action":"click"}'
curl -s http://127.0.0.1:9898/api/screenshot/glasses -o frame.png
License / ethos
Copy freely. The glasses render monochrome green at 576×288 — there's enough room in this world for all our apps. 🟢
Hydroponics, homelabs, and head-mounted displays. — Indiana "drjones" Holmes