Multi-application development environment for building and testing Even G2 apps with the Even Hub Simulator.
For general G2 development documentation, see the G2 development notes.
| App | Description | Visual |
|---|---|---|
| chess | Chess HUD app by @dmyster145 | ![]() |
| clock | Clock app – app refresh test showcase | ![]() |
| demo | Demo app – simple control showcase | ![]() |
| epub | Epub reader by @chortya | ![]() |
| Reddit feed and comments browser by @fuutott | ![]() |
|
| stars | Real-time sky chart by @thibautrey | ![]() |
| timer | Countdown timer (1, 5 ... min, click to start, double-click to stop) | ![]() |
| transit | Public transport planner by @langerhans | ![]() |
| weather | Weather forecast by @nickustinov | ![]() |
| restapi | Simple REST API client (micrOS integration) | ![]() |
| stt | Real-time speech-to-text via Soniox by @nickustinov | |
| quicktest | Fast test app for UI generated by misc/editor |
![]() |
- Node.js
- npm
- curl (used by
start-even.sh) - Even Hub Simulator
npm install
./start-even.shThe launcher lists all available apps (built-in + external) and prompts you to pick one.
misc/editor is an auxiliary helper project tracked as a git submodule under misc/. It is not a runtime app in the apps/* selection list.
APP_NAME=demo ./start-even.shOr as a positional argument:
./start-even.sh demoIf you have an app checked out locally, point to it directly – no need to edit apps.json:
APP_PATH=../my-app ./start-even.shThis resolves the directory, installs its dependencies if needed, and launches it. The app name is derived from the directory basename.
Some apps (like stt) need microphone audio from the simulator. Pass AUDIO_DEVICE with the exact device ID:
AUDIO_DEVICE="coreaudio:AppleUSBAudioEngine:Apple Inc.:Studio Display:00008030-00065D000C10802E:6,7" ./start-even.sh sttTo find available device IDs, run:
npx @evenrealities/evenhub-simulator --list-audio-input-devicesThis prints a table of IDs and names. Copy the full ID string from the left column. Note that default is not a valid device ID – you must use the exact ID.
The AUDIO_DEVICE value is passed to the simulator's --aid flag. When set, the simulator captures audio from that device, resamples it to 16 kHz S16LE PCM mono, and delivers it to your app via bridge.audioControl(true) / event.audioEvent.audioPcm.
There are two kinds of apps:
Small apps that live directly in the apps/ directory (demo, clock, timer, quicktest, restapi). They share the even-dev index.html and src/Main.ts loader, and export an AppModule interface from apps/<name>/index.ts.
Standalone web apps with their own index.html, package.json, and vite.config.ts. They run independently – even-dev just serves their index.html through Vite with the correct filesystem access.
External apps are registered in apps.json:
{
"chess": "https://github.com/dmyster145/EvenChess",
"weather": "https://github.com/nickustinov/weather-even-g2.git",
"my-local-app": "../my-local-app"
}Values can be:
- Git URLs – cloned into
.apps-cache/on first run - Local paths – resolved relative to the even-dev root
For one-off testing without editing apps.json, use APP_PATH instead (see above).
A G2 app is a regular web app. There is no special framework or wrapper required – just HTML, TypeScript, and the Even Hub SDK for communicating with the glasses.
See chess and reddit for well-structured examples.
my-app/
index.html <- entry point
package.json <- dependencies and scripts
vite.config.ts <- dev server config
src/
main.ts <- app bootstrap
app.json <- app metadata (for packaging)
A standard HTML page that loads your app:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>My App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>At minimum, you need the Even Hub SDK and Vite:
{
"name": "my-even-app",
"scripts": {
"dev": "vite --host 0.0.0.0 --port 5173",
"build": "vite build"
},
"dependencies": {
"@evenrealities/even_hub_sdk": "^0.0.7"
},
"devDependencies": {
"typescript": "^5.9.3",
"vite": "^7.3.1"
}
}Metadata file used by evenhub-cli for packaging and deployment:
{
"package_id": "com.example.myapp",
"name": "my-app",
"version": "0.1.0",
"description": "What my app does",
"author": "Your Name",
"entrypoint": "index.html"
}See the reddit app's app.json for a full example with permissions.
import { waitForEvenAppBridge } from '@evenrealities/even_hub_sdk'
const bridge = await waitForEvenAppBridge()
bridge.onEvenHubEvent((event) => {
// Handle tap, double-tap, swipe, etc.
})
// Send UI to the glasses
bridge.sendStartUpPage(container)- Use inline styles or plain CSS – avoid CSS frameworks like Tailwind that require build plugins, since your app may be served through even-dev's Vite config which won't have those plugins.
- Keep it standalone – your app should work with just
npm run dev. Don't depend on even-dev's infrastructure. - If your app needs a backend server, put it in a
server/directory with its ownpackage.json. Even-dev will auto-detect and start it (seevite-plugins/app-server.ts). - Use
@jappyjan/even-realities-uifor settings pages if you want consistent UI components across apps. - Use
@evenrealities/evenhub-clifor packaging and deploying to the Even Hub. See reddit forpackandqrscript examples.
Even-dev has a vite-plugins/ directory for app-specific Vite configuration that runs when serving external apps. Current plugins:
| Plugin | Purpose |
|---|---|
app-server.ts |
Auto-starts an app's server/ process (e.g., Tesla's Tessie API proxy) |
browser-launcher.ts |
Opens the browser when the dev server is ready |
chess-stockfish.ts |
Serves Stockfish WASM assets for the chess app |
reddit-proxy.ts |
Proxies Reddit API requests to avoid CORS issues |
restapi-proxy.ts |
Proxies REST API requests for the restapi app |
If your app needs custom server-side behaviour (API proxying, asset serving, etc.), add a plugin here. Plugins receive a PluginContext with externalApps – a map of app names to their resolved directory paths. Return null if the plugin doesn't apply to the current app.
Use this flow when you build UI in misc/editor and want to test it quickly in the simulator with apps/quicktest.
- Ensure submodules are initialized once:
git submodule update --init --recursive - Start the editor helper app:
./misc/editor.sh - In the editor UI, generate TypeScript source.
- Either paste that source into the quicktest textarea, or replace
apps/quicktest/generated-ui.ts. - Start quicktest:
APP_NAME=quicktest ./start-even.sh - In quicktest, click Render Quicktest UI.
Quicktest expectations for generated source:
- Source should define
const container = new CreateStartUpPageContainer(...). - Source can include
import ... from '@evenrealities/even_hub_sdk'andexport default container; quicktest strips those automatically. - First render creates startup UI; additional renders rebuild the page container.
apps.json -> External app registry (git URLs or local paths)
start-even.sh -> CLI launcher: app selection, deps, Vite, simulator
index.html -> Entry point for built-in apps
src/Main.ts -> Built-in app loader (AppModule discovery)
apps/ -> Built-in apps (demo, clock, timer, quicktest, restapi)
apps/_shared/ -> Shared types (AppModule contract)
vite-plugins/ -> Custom Vite plugins for external apps
.apps-cache/ -> Auto-cloned external app repositories (gitignored)
vite.config.ts -> Vite config (aliases, fs.allow, external app HTML serving)
flowchart TD
A["start-even.sh"] --> B["Vite dev server (APP_NAME)"]
B --> C["Built-in app?"]
C -- Yes --> D["index.html + src/Main.ts"]
D --> E["apps/<app>/index.ts (AppModule)"]
C -- No --> F["External app's own index.html"]
F --> G["External app's src/main.ts"]
E --> H["Even Hub SDK / bridge"]
G --> H
H <--> I["Even Hub Simulator"]
J["vite-plugins/"] --> B
- SDK: even_hub_sdk
- CLI: evenhub-cli
- Simulator: evenhub-simulator
- Community SDK: even-better-sdk by @JappyJan
- UI components: even-realities-ui by @JappyJan
- UIUX guidelines: Figma
- G2 development notes: G2.md
This is a development environment intended for experimentation and building Even G2 apps. APIs and structure may change as the Even ecosystem evolves.












