English | 日本語
HeadLenss
HeadLenss is an app that lets you drive Claude Code running on your PC by voice from Even Realities G2 smart glasses.
It also lets you operate tmux sessions from a smartphone browser in both terminal mode and chat mode.
Screenshots
G2
Console
Ask User Question
Session list
Voice input
Browser (smartphone)
Console view
Chat view
System overview
G2 (microphone + display + touchpad)
↕ BLE 5.2
Smartphone (Even Realities app = Flutter WebView)
└─ even/ G2 web app (TS + Vite)
├─ HTTPS → Speechmatics Realtime (audio → text)
└─ HTTP → PC (via Tailscale)
PC
├─ server/ Hono + tmux + Claude Code + Web UI
└─ plugin/ Claude Code plugin (forwards hooks to the server)
↕ HTTP/WS
Browser (smartphone / PC, web UI)
Repository layout
headlenss/
├── server/ # Server running on the PC (tmux management API + Web UI + ASR)
├── even/ # Even G2 app (TS web app running inside the smartphone WebView)
└── plugin/ # Claude Code / Codex hooks (forwarded to the server) + bundled agent skills
What It Can Do
Codex support
HeadLenss can also surface Codex CLI sessions in the same browser/G2 chat view when Codex hooks are enabled.
Install the global Codex hooks once:
node /path/to/headlenss/plugin/codex-hooks/install.mjs
Restart Codex, open /hooks, and review/trust the HeadLenss hook definitions. After that, start Codex in any tmux session:
tmux new -s codex-work -c /path/to/your/project codex
The tmux session will appear in the HeadLenss browser/G2 session list, and its prompts, replies, and permission requests will appear in chat view.
Set HEADLENSS_SERVER_URL if your server is not http://localhost:3000.
- Access Claude Code (tmux) on your PC from G2.
- Send prompts using G2's voice input.
- Add and view tmux sessions from a web browser. Supports both PCs and smartphones.
- Two session display types are available: console-style and chat-style.
Differences from even-terminal
- Can be launched from the menu on G2
- Can add new sessions (via the smartphone app)
- Control tmux via a web browser
Requirements
- PC: Node.js 20+, tmux 3.0+ (Linux / macOS)
- Tailscale account (effectively required so the G2 / smartphone can reach the PC)
- Even Realities G2 + paired smartphone + Even Realities app
(not required if you only use the Web UI)
- Speechmatics API key (for G2-side real-time transcription; free up to 480 minutes / month)
- Claude Code v2.1+ (if you want the Claude Code integration)
Setup
The easiest path is to let an AI read the source code and walk you through setup.
1. Install the server on your PC
git clone https://github.com/takashicompany/headlenss.git
cd headlenss/server
npm install
cp .env.example .env
# Edit .env (e.g. ASR_BACKEND). It works with the defaults too.
npm start
# → open http://localhost:3000/ in a browser to verify
To keep it running on Linux, a systemd unit is provided:
npm run service:install
sudo loginctl enable-linger $USER # only once, if you want it to survive logout
Migration note: If you are upgrading from a version that used npm start in the systemd unit, re-run npm run service:install once to regenerate the unit file. This ensures systemctl --user restart headlenss releases the port correctly.
For details (ASR backend selection, API reference, systemd operation) see server/README.md.
2. Reach the PC via Tailscale
Put the PC and the G2 phone / control devices into the same tailnet. Confirm the Tailscale IP with tailscale ip -4.
Verify that http://<tailscale-ip>:3000/ opens in a browser.
If MagicDNS is enabled, http://<hostname>.<tailnet>.ts.net:3000/ also works.
3. Install the hooks (Claude Code / Codex)