| src/g2_preview | ||
| tests | ||
| .gitignore | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
g2-preview
Preview HUD content as the Even Realities G2 smart-glasses lens would display it: 576×288 px, 4-bit greyscale (16 levels), green-tinted micro-LED.
A tiny design tool for prototyping G2 widgets, dashboards, and notifications without owning the glasses yet — letterbox any image or text into the lens frame, optionally tinted green to mimic the actual look.
Why this project
Built overnight (May 8, 2026) off a chat thread the previous evening where the user was deciding whether to buy the Even Realities G2 and brainstorming custom apps (Hermes HUD bridge, Bee live-transcript overlay, Obsidian quick-capture, contract-lead pinger, model-launch radar). The unresolved question was: what would these widgets actually look like on a 576×288, 4-bit greyscale lens?
This CLI answers that locally — design a widget, render a PNG, see the constraint, iterate. Once the glasses arrive, the same frames feed straight into an @evenrealities/even_hub_sdk plugin.
Install
cd g2-preview
pip install -e .
Requires Python ≥ 3.9 and Pillow.
Usage
# Show G2 display spec
g2-preview info
# Render text as a HUD frame
g2-preview text "Lead: Acme Corp\n$8k contract\nReply Y to call" -o lead.png
# Render an image (letterboxed, quantized, green-tinted)
g2-preview image dashboard.png -o dashboard_g2.png
# Skip the green tint to see raw greyscale output
g2-preview text "Plain greyscale" --no-tint -o plain.png
# 1-bit look for line art / icons
g2-preview image icon.png --threshold 128 -o icon_g2.png
Output is upscaled 2× by default for easier on-screen review (--scale N to change). The actual quantized frame is always 576×288 internally.
API
from g2_preview import render_text, render_image, tint_green
frame = render_text("Hello G2", font_size=32) # PIL.Image, mode 'L', 576x288
shown = tint_green(frame)
shown.save("hello.png")
Tests
pip install pytest
pytest
Roadmap
- Animated GIF preview (multi-frame widget)
- Side-by-side stereo (left + right eye) layout
- Direct export to
.ehpkplugin asset bundle - Live preview server that watches a JSON widget spec and re-renders
License
MIT