@gotcos/glasses-server
v6.1.0
Published
COS Glasses — self-hosted AI heads-up-display server for Even G2 smart glasses, powered by your local Claude Code or Codex CLI
Maintainers
Readme
COS Glasses Server
Self-hosted AI heads-up display for Even G2 smart glasses. Runs on your Mac, talks to your local Claude Code CLI, and pushes answers, voice transcription, and notes to the lens. Your data never leaves your machine, and no API key is pasted into the phone for chat.
Quick start
npx @gotcos/glasses-serverThe launcher checks Node, finds your CLI, downloads the local voice model, writes
~/.cos-glasses/.env, and starts the server on 0.0.0.0:3141. On boot it prints
an API token — paste that into the COS Glasses app.
Requirements
- Node.js 20.11+ — https://nodejs.org
- Claude Code CLI (Opus/Sonnet/Haiku) — https://claude.ai/download, then
claude loginor Codex CLI (Codex High) — https://developers.openai.com/codex/, thencodex login - Even G2 glasses + the COS Glasses app from the Even Hub
- Optional:
brew install whisper-cppfor free local voice (otherwise OpenAI API) - Optional: Tailscale so your phone reaches your Mac from anywhere
No
ANTHROPIC_API_KEYis needed — chat runs through your installed CLI, billed to your existing Claude or Codex subscription. Pick either per query, or set a default withCOS_G2_DEFAULT_MODEL(opus|sonnet|haiku|codex-high). Codex runs sandboxed read-only by default (COS_CODEX_SANDBOXto adjust).
Connect your phone (the one gotcha)
The glasses app runs on your iPhone and must reach this server on your Mac.
- The launcher binds
0.0.0.0(all interfaces) for you. - Same WiFi (simplest): find your Mac's LAN IP (System Settings > Wi-Fi > Details), and in the COS Glasses app enter
http://192.168.x.x:3141. - From anywhere: install Tailscale on the Mac + iPhone (same account), note the Mac's
100.xaddress, and enterhttp://100.x.x.x:3141. - Either way, paste the API token the server printed at boot.
To restrict the server to localhost only, set BIND_HOST=127.0.0.1 in ~/.cos-glasses/.env.
The built-in IP allowlist blocks public-internet traffic regardless.
What it does
- Ask anything, get a streamed answer on the lens (
/api/query,/v1/chat/completions) - Live voice capture + transcription during meetings
- Local whisper.cpp transcription (free) with OpenAI fallback (optional)
- Tasks / calendar / people context if you run the
COS Starter Kit (
COS_SCRIPTS_DIR); otherwise it is glasses + AI only
Configuration
Config lives at ~/.cos-glasses/.env (created on first run). Every key is
optional except an installed CLI. Highlights: BIND_HOST, PORT,
COS_API_TOKEN (auto if unset), OPENAI_API_KEY (cloud voice fallback),
COS_SCRIPTS_DIR (full pipeline). Your name + transcription vocabulary live in
~/.cos-glasses/.cos-profile.json (see .cos-profile.example.json).
Run from source
git clone https://github.com/ukaoma/cos-glasses-server.git
cd cos-glasses-server
npm install
BIND_HOST=0.0.0.0 npm run start:serverTroubleshooting
- Phone can't connect — check
BIND_HOST=0.0.0.0, the same Tailscale account on both devices, and the correct100.xIP + token. - AI queries fail — run
claude --version/codex --version, thenclaude login/codex login. - Voice getting billed? — install
whisper-cppfor free local transcription.
License
MIT. Learn more at gotcos.com.
