freshcrate
Home > MCP Servers > sinain-hud

sinain-hud

Ambient intelligence that sees what you see, hears what you hear, and acts on your behalf

Description

Ambient intelligence that sees what you see, hears what you hear, and acts on your behalf

README

Sinain Sinain HUD

MIT License CI npm macOS 12.3+ Windows 10+

Ambient intelligence that sees what you see, hears what you hear, and acts on your behalf.

Sinain demo

Quick Start ยท Docs ยท Privacy ยท Configuration ยท Contributing


You, Augmented

Sinain captures your screen and audio continuously, runs OCR and transcription, and feeds a rolling context window to your agent. The agent analyzes what's happening, surfaces advice on a private HUD overlay, and can act on its own โ€” fixing code, running commands, or spawning background tasks.

  • Screen capture โ†’ OCR โ†’ context digest, updated every few seconds.
  • System audio โ†’ transcription (local whisper.cpp or cloud) โ†’ real-time awareness.
  • Private overlay: only you see it. Never in screenshots, recordings, or screen shares.

Agent-Agnostic

Sinain feeds the same screen and audio context to any MCP-compatible agent. Switch agents without losing context. Add new ones without reconfiguring.

  • Tested with Claude Code, Codex, Goose, Junie, and Aider. Any MCP-compatible agent works.
  • Knowledge modules travel with you โ€” export from one machine, import on another.
  • Run with an OpenClaw gateway, or use the shell harness (sinain-agent/run.sh) to connect your own agent.

Privacy Controls

By default, sinain uses cloud APIs (OpenRouter) for transcription and analysis. When you need tighter control, switch privacy modes โ€” no code changes, one env var.

  • off โ†’ standard โ†’ strict โ†’ paranoid โ€” four modes in ~/.sinain/.env.
  • paranoid mode: Ollama + whisper.cpp, fully offline. No network calls.
  • HUD overlay is invisible to screen capture (NSWindow.sharingType = .none).

Quick Start

npx @geravant/sinain start

That's it. On first run, sinain will:

  1. Run an interactive setup wizard โ€” transcription backend, API key, agent, privacy mode
  2. Auto-download the overlay app, sck-capture binary, and Python dependencies
  3. Start all services โ€” sinain-core, sense_client, overlay, and agent

Re-run the wizard anytime: npx @geravant/sinain start --setup

Prerequisites

  • Node.js 18+ โ€” nodejs.org (LTS recommended)
  • Python 3.10+ โ€” brew install python3 (macOS) or python.org
  • OpenRouter API key (optional for local-only mode) โ€” openrouter.ai

Fully local? No API key needed. Ollama + whisper-cli = zero cloud. See Running Fully Local.

macOS Permissions

  1. System Settings โ†’ Privacy & Security โ†’ Screen Recording โ€” add your Terminal
  2. System Settings โ†’ Privacy & Security โ†’ Microphone โ€” add your Terminal

Managing sinain

npx @geravant/sinain stop             # stop all services
npx @geravant/sinain status           # check what's running
npx @geravant/sinain start --setup    # re-run setup wizard
npx @geravant/sinain start --no-sense # skip screen capture
npx @geravant/sinain start --no-overlay  # headless mode

Architecture

โ”Œโ”€โ”€โ”€ Your Device โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                                                                     โ”‚
โ”‚  sck-capture (Swift)                                                โ”‚
โ”‚    โ”œโ”€ system audio (PCM) โ”€โ”€โ–บ sinain-core :9500                      โ”‚
โ”‚    โ””โ”€ screen frames (JPEG) โ”€โ”€โ–บ sense_client โ”€โ”€โ”€ POST /sense โ”€โ”€โ–บ    โ”‚
โ”‚                                                      โ”‚              โ”‚
โ”‚                              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜              โ”‚
โ”‚                              โ”‚                                      โ”‚
โ”‚                         sinain-core                                 โ”‚
โ”‚                           โ”œโ”€ audio pipeline โ†’ transcription         โ”‚
โ”‚                           โ”œโ”€ agent loop โ†’ digest + HUD text         โ”‚
โ”‚                           โ”œโ”€ escalation โ”€โ”€โ–บ OpenClaw Gateway (WS)   โ”‚
โ”‚                           โ”‚                  or sinain-agent (poll)  โ”‚
โ”‚                           โ””โ”€ WebSocket feed                         โ”‚
โ”‚                                  โ”‚                                  โ”‚
โ”‚                                  โ–ผ                                  โ”‚
โ”‚                           overlay (Flutter)                         โ”‚
โ”‚                           private, invisible to screen capture      โ”‚
โ”‚                                                                     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                   โ”‚
                          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                          โ–ผ                  โ–ผ
                   OpenClaw Gateway    sinain-agent
                   (server or local)   (bare agent, no gateway)
                     โ”œโ”€ sinain-hud plugin
                     โ”‚   โ””โ”€ sinain-knowledge (curation, playbook, eval)
                     โ””โ”€ SITUATION.md, Telegram alerts

Components

Component Language What it does Docs
sinain-core TypeScript Central hub: audio pipeline, agent loop, escalation, WS feed README
overlay Dart / Swift / C++ Private HUD (macOS + Windows), 4 display modes, hotkeys Hotkeys
sense_client Python Screen capture, SSIM diff, OCR, privacy filter sense_client/
sck-capture Swift ScreenCaptureKit: system audio + screen frames tools/sck-capture/
sinain-agent Bash Shell harness that connects any agent to sinain-core sinain-agent/
sinain-knowledge TypeScript Curation, playbook, eval, portable knowledge modules Knowledge System
sinain-hud-plugin TypeScript OpenClaw plugin: lifecycle, curation, overflow watchdog sinain-hud-plugin/
sinain-mcp-server TypeScript MCP server exposing sinain tools to agents sinain-mcp-server/

Configuration

All config via .env at project root (created by the setup wizard or cp .env.example .env).

Context Analysis (HUD summarizer)

The context analysis loop runs every 3โ€“30 seconds, sending recent audio/screen context to an LLM. It produces a digest used for escalation scoring โ€” when the score threshold is met (or always in rich mode), the digest is forwarded to the escalation agent for a full response.

Variable Default Description
ANALYSIS_PROVIDER openrouter openrouter (cloud) or ollama (local, free)
ANALYSIS_MODEL google/gemini-2.5-flash-lite Primary model for text analysis
ANALYSIS_VISION_MODEL google/gemini-2.5-flash Auto-selected when screen images are present
ANALYSIS_ENDPOINT (auto per provider) Override for custom OpenAI-compatible endpoints
ANALYSIS_API_KEY (from OPENROUTER_API_KEY) API key; not needed for ollama
ANALYSIS_FALLBACK_MODELS gemini-2.5-flash,... Comma-separated fallback chain

Other Key Settings

Variable Default Description
OPENROUTER_API_KEY โ€” Required (unless ANALYSIS_PROVIDER=ollama + local transcription)
ESCALATION_MODE selective off / selective / focus / rich
PRIVACY_MODE off off / standard / strict / paranoid

See docs/CONFIGURATION.md for the full reference.

Privacy Modes

Mode What it does
off All data flows freely โ€” maximum insight quality
standard Auto-redacts credentials before cloud APIs (wizard default)
strict Only summaries leave your machine โ€” no raw text sent to cloud
paranoid Fully local: Ollama + whisper.cpp. Zero network calls.

See Privacy Threat Model for the full design.

Hotkeys

Global hotkeys use Cmd+Shift (macOS) or Ctrl+Shift (Windows):

Shortcut Action
Cmd+Shift+Space Toggle overlay visibility
Cmd+Shift+M Cycle display mode
Cmd+Shift+/ Open command input
Cmd+Shift+H Quit overlay

See docs/HOTKEYS.md for all 15 shortcuts.

Running Fully Local

No cloud APIs needed. Local models handle everything:

# 1. Install local transcription
./setup-local-stt.sh

# 2. Install Ollama + vision model
brew install ollama && ollama pull llava

# 3. Start in local mode
./start-local.sh
Model Size Speed Best for
llava 4.7 GB ~2s/frame General use (recommended)
llama3.2-vision 7.9 GB ~4s/frame Best accuracy
moondream 1.7 GB ~1s/frame Fastest, lower quality

Setup Guides

Setup Guide
Local OpenClaw docs/INSTALL-LOCAL.md
Remote OpenClaw docs/INSTALL-REMOTE.md
NemoClaw (Brev) docs/INSTALL.md
Bare Agent docs/INSTALL-BARE-AGENT.md
Windows setup-windows.sh
From Source git clone, cp .env.example ~/.sinain/.env, ./start.sh

Knowledge System

Sinain builds a persistent knowledge graph from everything it captures โ€” audio transcriptions, screen OCR, and agent interactions. Facts are distilled incrementally (on buffer full and session end), stored in an EAV triplestore with graph relationships, and retrieved via hybrid search (FTS5 + tag-based + entity graph backrefs with RRF fusion).

The integration step is fully deterministic โ€” no LLM decides what to store. Every extracted fact is preserved.

npx @geravant/sinain export-knowledge   # export playbook, modules, graph
npx @geravant/sinain import-knowledge ~/sinain-knowledge-export.tar.gz

See Knowledge System docs for architecture details.

Deep Dives

Topic Doc
Knowledge System docs/knowledge-system.md
Escalation Architecture docs/clean-architecture-escalation.md
Personality Traits docs/PERSONALITY-TRAITS-SYSTEM.md
Privacy Threat Model docs/privacy-protection-design.md
HUD Skill Protocol docs/HUD-SKILL-PROTOCOL.md
Full Configuration docs/CONFIGURATION.md
All Hotkeys docs/HOTKEYS.md

Contributing

See CONTRIBUTING.md.

License

MIT

Release History

VersionChangesUrgencyDate
overlay-v2.8.0## What's Changed * feat: local knowledge pipeline with crash-safe distillation by @Geravant in https://github.com/anthillnet/sinain-hud/pull/75 * fix: goose bare-agent MCP registration and output cleanup by @Geravant in https://github.com/anthillnet/sinain-hud/pull/74 * feat: spawn context enrichment + interactive spawns + remote permissions by @Geravant in https://github.com/anthillnet/sinain-hud/pull/77 * refactor: disable auto-spawn of background subagents by @Geravant in https://github.com/High4/19/2026
overlay-v2.7.0## What's Changed * feat: local knowledge pipeline with crash-safe distillation by @Geravant in https://github.com/anthillnet/sinain-hud/pull/75 * fix: goose bare-agent MCP registration and output cleanup by @Geravant in https://github.com/anthillnet/sinain-hud/pull/74 * feat: spawn context enrichment + interactive spawns + remote permissions by @Geravant in https://github.com/anthillnet/sinain-hud/pull/77 * refactor: disable auto-spawn of background subagents by @Geravant in https://github.com/Medium4/10/2026
overlay-v2.6.0## What's Changed * feat: local knowledge pipeline with crash-safe distillation by @Geravant in https://github.com/anthillnet/sinain-hud/pull/75 * fix: goose bare-agent MCP registration and output cleanup by @Geravant in https://github.com/anthillnet/sinain-hud/pull/74 * feat: spawn context enrichment + interactive spawns + remote permissions by @Geravant in https://github.com/anthillnet/sinain-hud/pull/77 * refactor: disable auto-spawn of background subagents by @Geravant in https://github.com/Medium4/10/2026
overlay-v2.5.0## What's Changed * feat: local knowledge pipeline with crash-safe distillation by @Geravant in https://github.com/anthillnet/sinain-hud/pull/75 * fix: goose bare-agent MCP registration and output cleanup by @Geravant in https://github.com/anthillnet/sinain-hud/pull/74 * feat: spawn context enrichment + interactive spawns + remote permissions by @Geravant in https://github.com/anthillnet/sinain-hud/pull/77 * refactor: disable auto-spawn of background subagents by @Geravant in https://github.com/Medium4/10/2026
overlay-v2.4.0## What's Changed * refactor: unified ANALYSIS_* provider config by @Geravant in https://github.com/anthillnet/sinain-hud/pull/65 * docs: restore demo GIF + remove stale .mov by @Geravant in https://github.com/anthillnet/sinain-hud/pull/66 * refactor: remove git_backup.sh auto-commit from heartbeat by @Geravant in https://github.com/anthillnet/sinain-hud/pull/67 * fix: restore spawn features removed by d5a520b by @Geravant in https://github.com/anthillnet/sinain-hud/pull/68 * feat: default to ChMedium4/2/2026
overlay-v2.3.0**Full Changelog**: https://github.com/anthillnet/sinain-hud/compare/overlay-v2.2.1...overlay-v2.3.0Medium3/31/2026
overlay-v2.2.1## What's Changed * fix(ci): allow-same-version in npm release by @Geravant in https://github.com/anthillnet/sinain-hud/pull/64 **Full Changelog**: https://github.com/anthillnet/sinain-hud/compare/overlay-v2.2.0...overlay-v2.2.1Medium3/31/2026
overlay-v2.2.0## What's Changed * Feat/overlay redesign by @Geravant in https://github.com/anthillnet/sinain-hud/pull/55 * fix: auto-approve MCP tools, add SINAIN_ALLOWED_TOOLS by @Geravant in https://github.com/anthillnet/sinain-hud/pull/56 * docs: README rework + badges + repo polish by @Geravant in https://github.com/anthillnet/sinain-hud/pull/57 * Fix/agent allowed tools by @Geravant in https://github.com/anthillnet/sinain-hud/pull/58 * perf: user command fast-path โ€” 15s faster responses by @Geravant in hMedium3/30/2026
sck-capture-v1.2.0## What's Changed * Feat/overlay redesign by @Geravant in https://github.com/anthillnet/sinain-hud/pull/55 * fix: auto-approve MCP tools, add SINAIN_ALLOWED_TOOLS by @Geravant in https://github.com/anthillnet/sinain-hud/pull/56 * docs: README rework + badges + repo polish by @Geravant in https://github.com/anthillnet/sinain-hud/pull/57 * Fix/agent allowed tools by @Geravant in https://github.com/anthillnet/sinain-hud/pull/58 * perf: user command fast-path โ€” 15s faster responses by @Geravant in hMedium3/30/2026
overlay-v2.1.0**Full Changelog**: https://github.com/anthillnet/sinain-hud/compare/overlay-v2.0.0...overlay-v2.1.0Medium3/26/2026
overlay-v2.0.0## What's Changed * fix: apply audio gain before VAD by @Geravant in https://github.com/anthillnet/sinain-hud/pull/50 * feat: fast startup โ€” recap tick, async vision, escalation fix by @Geravant in https://github.com/anthillnet/sinain-hud/pull/51 **Full Changelog**: https://github.com/anthillnet/sinain-hud/compare/overlay-v1.11.0...overlay-v2.0.0Medium3/26/2026
overlay-v1.11.0## What's Changed * fix: remove spawnedBy from spawn-task RPC by @Geravant in https://github.com/anthillnet/sinain-hud/pull/48 * fix: pixel-based hotkey scroll for long messages by @Geravant in https://github.com/anthillnet/sinain-hud/pull/49 **Full Changelog**: https://github.com/anthillnet/sinain-hud/compare/overlay-v1.10.0...overlay-v1.11.0Medium3/24/2026
overlay-v1.10.0## What's Changed * feat: local vision via Ollama โ€” fully private mode by @Geravant in https://github.com/anthillnet/sinain-hud/pull/47 **Full Changelog**: https://github.com/anthillnet/sinain-hud/compare/overlay-v1.9.0...overlay-v1.10.0Medium3/23/2026
overlay-v1.9.0## What's Changed * feat(overlay): remove STR tab, default to AGT by @Geravant in https://github.com/anthillnet/sinain-hud/pull/42 * fix(overlay): preserve feed messages across hide/show toggle by @Geravant in https://github.com/anthillnet/sinain-hud/pull/43 * feat(overlay): animated idle state with cat-eye pulse ring by @Geravant in https://github.com/anthillnet/sinain-hud/pull/44 * fix: resolve cascading npx install failures on fresh macOS by @Geravant in https://github.com/anthillnet/sinain-hMedium3/23/2026
sck-capture-v1.0.0Initial release of the sck-capture binary for macOS. **sck-capture** is the unified ScreenCaptureKit binary that captures both system audio (raw PCM) and screen frames (JPEG) via a single `SCStream`. ## Asset - `sck-capture-macos.zip` โ€” arm64 binary (macOS 12.3+) ## Install ```bash npx @geravant/sinain setup-sck-capture ``` Or automatically on first `npx @geravant/sinain start`.Medium3/23/2026
overlay-v1.8.0**Full Changelog**: https://github.com/anthillnet/sinain-hud/compare/overlay-v1.7.0...overlay-v1.8.0Low3/22/2026
overlay-v1.7.0**Full Changelog**: https://github.com/anthillnet/sinain-hud/compare/overlay-v1.6.0...overlay-v1.7.0Low3/22/2026
overlay-v1.6.0## What's Changed * feat: docs overhaul, setup wizard, Windows overlay by @Geravant in https://github.com/anthillnet/sinain-hud/pull/40 * feat: spawn background agent from HUD (Shift+Enter) + bare agent queue by @Geravant in https://github.com/anthillnet/sinain-hud/pull/41 **Full Changelog**: https://github.com/anthillnet/sinain-hud/compare/overlay-v1.4.0...overlay-v1.6.0Low3/22/2026
overlay-v1.5.0## What's Changed * feat: docs overhaul, setup wizard, Windows overlay by @Geravant in https://github.com/anthillnet/sinain-hud/pull/40 * feat: spawn background agent from HUD (Shift+Enter) + bare agent queue by @Geravant in https://github.com/anthillnet/sinain-hud/pull/41 **Full Changelog**: https://github.com/anthillnet/sinain-hud/compare/overlay-v1.4.0...overlay-v1.5.0Low3/22/2026
overlay-v1.4.0## What's Changed * feat: pre-built overlay distribution by @Geravant in https://github.com/anthillnet/sinain-hud/pull/38 * docs: Quick Start rewrite + privacy setup + release workflow fix by @Geravant in https://github.com/anthillnet/sinain-hud/pull/39 **Full Changelog**: https://github.com/anthillnet/sinain-hud/compare/overlay-v1.3.0...overlay-v1.4.0Low3/22/2026
overlay-v1.3.0## What's Changed * feat: Privacy Sharing Matrix (6 data types ร— 5 destinations ร— 4 levels) by @Geravant in https://github.com/anthillnet/sinain-hud/pull/20 * feat: render markdown in HUD feed by @Geravant in https://github.com/anthillnet/sinain-hud/pull/21 * fix: dedicated spawnInFlight guard โ€” spawn tasks no longer block regular escalations by @Geravant in https://github.com/anthillnet/sinain-hud/pull/22 * feat: escalation slot โ€” inline context restore + sinain-memory migration by @Geravant inLow3/22/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

headroomThe Context Optimization Layer for LLM Applicationsv0.8.3
pattern8Enforce zero-trust rules for AI agents to prevent hallucinations, unsafe actions, and policy bypasses0.0.0
jarvisYour AI assistant that never forgets and runs 100% privately on your computer. Leave it on 24/7 - it learns your preferences, helps with code, manages your health goals, searches the web, and connectsv1.28.0
agent-scanSecurity scanner for AI agents, MCP servers and agent skills.v0.4.16-snapshot-93d6e32-1010
agentpoolA unified agent orchestration hub that lets you configure and manage multiple AI agents (native, ACP, AGUI, Claude Code) via YAML, and exposes them through standardized protocols (ACP/OpenCode Server)v2.9.18