Skip to content

Alireza29675/g2-channels

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

G2 Channels

Turn Even G2 smart glasses into a two-way terminal for your Claude Code sessions — multiplexed so each session is its own decoupled channel.

  • Glasses → session: tap a temple to record, talk, tap to stop → the speech is transcribed and lands in the one session you have selected, delivered through the Claude Code Channels feature as a <channel source="glasses" …> message.
  • Session → glasses: an agent calls the send_to_glasses tool → the message shows on the glasses, labelled with which session it came from, staying on screen ≥5s (longer for longer text).
  • Scroll to switch between the sessions you're subscribed to. Subscribe / rename channels from the phone companion UI.

Why a hub

Claude Code spawns a separate stdio MCP subprocess per session. A single pair of glasses can't connect to N subprocesses directly, so a shared long-lived hub sits in the middle: every session subprocess registers with it, the one glasses app connects to it, and it routes + transcribes.

[Claude session A] ─stdio─▶ [mcp subprocess A] ─┐
[Claude session B] ─stdio─▶ [mcp subprocess B] ─┼─ ws://127.0.0.1:8930 ─▶ [HUB] ─ ws(LAN):8930 ─▶ [G2 web app] ─BLE─▶ glasses
[Claude session C] ─stdio─▶ [mcp subprocess C] ─┘        (registry · STT · routing)

Packages

Package What it is
packages/shared WS protocol + channel types shared by everything
packages/hub Long-lived daemon: channel registry, subscription/label persistence, Groq Whisper STT, routing. Binds 0.0.0.0:8930.
packages/mcp The per-session stdio MCP channel server Claude Code spawns. Declares claude/channel, registers with the hub, fires notifications, exposes send_to_glasses. Auto-starts the hub.
packages/glasses The Even G2 web app (Vite + @evenrealities/even_hub_sdk) — glasses display + phone companion UI.

Setup

Requires Bun, Claude Code ≥ v2.1.80, a Groq API key, and the Even Realities app + G2 glasses.

bun install

# Configure the hub (Groq key + shared token for the glasses connection)
mkdir -p ~/.g2-channels
cat > ~/.g2-channels/config.json <<'JSON'
{ "groqApiKey": "gsk_...", "token": "choose-a-shared-secret" }
JSON
# (GROQ_API_KEY / G2_CHANNELS_TOKEN env vars also work.)

Run a session as a channel

# one-time per machine: register the MCP server
claude mcp add glasses -- bun /ABSOLUTE/PATH/g2-channels/packages/mcp/src/index.ts

# launch any session you want reachable from the glasses (research-preview flag)
claude --dangerously-load-development-channels server:glasses

The first session to start auto-spawns the hub. Channels are explicit: a session stays invisible to the glasses until its agent opens one:

  • create_channel({ name }) → opens a named channel, returns a short code. The named channel now appears on the glasses.
  • send_to_glasses({ code, text }) → shows a message on the glasses.
  • Voice spoken into that channel on the glasses comes back to the session as a <channel source="glasses" channel="<name>" code="<code>">…</channel> event.

So you decide which sessions show up (and what they're called) instead of every session auto-registering.

Run the glasses app

bun run glasses:dev          # vite --host on :5173
cd packages/glasses && bun run qr   # scan from the Even Realities app (Developer mode)

In the phone companion UI, confirm the hub host (defaults to the laptop IP the app loaded from) and token, then subscribe to the channels you want. On the glasses: scroll to pick a channel, tap to record, tap again to send.

Status

v0.1 — see memory/tasks/g2-channels/ in the sooleh workspace for the build log.

About

Even G2 smart-glasses as a two-way terminal for Claude Code sessions — talk to a session and get replies on your glasses, via the Channels feature.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors