mcpField
T
test-with-simulator

test-with-simulator

github.com/even-realitiesTesting & quality79135 installsUpdated 1w ago
Repository

About test-with-simulator

A guide for Even Hub app developers using evenhub-simulator to test apps with keyboard and mouse gestures, and inspect display and audio behavior. It notes which behaviors still require hardware testing.

Key features

  1. 01Maps keyboard and mouse to gestures
  2. 02Configures display effects and audio input
  3. 03Exports display screenshots
  4. 04Debugs with the Web inspector

Use cases

  1. 01Iterate on app layout and interaction logic
  2. 02Test audio input handling
  3. 03Identify features that need hardware validation

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/even-realities/everything-evenhub --skill test-with-simulator

After installing, type/test-with-simulatorin Claude Code to confirm it loaded.

Details

From the project README

The simulator is a supplement to — not a replacement for — hardware testing.

Installation

npm install -g @evenrealities/evenhub-simulator

Version: v0.7.1. Cross-platform: macOS, Linux, Windows.

Basic Usage

evenhub-simulator http://localhost:5173
evenhub-simulator -g http://localhost:5173           # with glow effect
evenhub-simulator -b spring http://localhost:5173    # with spring bounce
evenhub-simulator -c ./my-config.toml http://localhost:5173  # custom config

CLI Reference

OptionDescription
-c, --config <path>Path to config file
-g, --glowEnable glow effect on glasses display
--no-glowDisable glow effect (overrides config)
-b, --bounce <type>Bounce animation: default or spring
--list-audio-input-devicesList available audio input devices
--aid <device>Choose specific audio input device
--no-aidUse default audio device (overrides config)
--print-config-pathPrint default config file path and exit
--automation-port <port>Start automation HTTP server on this port (e.g. 9898)
--completions <shell>Generate shell completions: bash, elvish, fish, powershell, zsh
-V, --versionPrint version
-h, --helpPrint help

Config File Paths

PlatformLocation
macOS~/Library/Application Support/
Linux$XDG_CONFIG_HOME or ~/.config/
Windows{FOLDERID_RoamingAppData}

Use evenhub-simulator --print-config-path to see the exact path.

Simulator Inputs

Keyboard and mouse inputs are mapped to glasses gestures:

InputGlasses Equivalent
UpSwipe up / scroll up
DownSwipe down / scroll down
ClickSingle tap
Double ClickDouble tap

Audio Testing

  • Sample rate: 16000 Hz
  • Format: signed 16-bit little-endian PCM
  • Data per event: 100ms (3200 bytes / 1600 samples)
  • List devices: --list-audio-input-devices
  • Select device: --aid <device-id>
  • Audio data arrives via event.audioEvent.audioPcm (Uint8Array)

Screenshot

Click the simulator display to export an RGBA PNG to the current working directory. The filename is timestamp-based. The file path is shown in stdout and the glasses web inspector console.

Debugging Tips

  • Raw payload errors: RUST_LOG=debug evenhub-simulator <url> — logs raw payload parse errors
  • Web inspector: The simulator hosts a WebView — use browser dev tools for console, network, and DOM inspection
  • eventSource: Hardcoded as 1 (TOUCH_EVENT_FROM_GLASSES_R) in the simulator
  • onDeviceStatusChanged: NOT emitted — profiles are hardcoded in the simulator

Simulator vs Hardware Differences

FeatureSimulatorReal Glasses
onDeviceStatusChangedNOT emitted (hardcoded)Real-time status updates
eventSourceHardcoded as 1Actual input source (left/right arm, ring)
imuDataAlways nullReal IMU x/y/z data when enabled
Font renderingApproximationFirmware LVGL font
List scrollingMay differ from hardwareNative firmware scroll
Image memoryNo limits enforcedHardware memory limits apply
Error handlingMay differ in edge casesHardware behavior

Development Implications

  • Layout & logic — simulator is reliable for iteration
  • List scrolling UX — verify on hardware before shipping
  • Image memory limits — enforce size limits in code; simulator does not catch violations
  • Device status flows — test on hardware only; onDeviceStatusChanged never fires in simulator
  • IMU features — cannot test in simulator; imuData is always null
  • Multi-input sources — simulator only emits right-arm touch (eventSource = 1)

Typical Workflow

npm run dev                                    # Start dev server
evenhub-simulator -g http://localhost:5173     # Launch simulator
# Interact via keyboard/mouse
# Click display to take screenshots
# Iterate on code — auto-reloads
# Validate on real hardware before deploy

Shell Completions

evenhub-simulator --completions zsh > ~/.zsh/completions/_evenhub-simulator
evenhub-simulator --completions bash > /etc/bash_completion.d/evenhub-simulator
evenhub-simulator --completions fish > ~/.config/fish/completions/evenhub-simulator.fish

Task

$ARGUMENTS

Comments

Markdown supported