# ๐Ÿฆž OpenClaw Windows Hub A Windows companion suite for [OpenClaw](https://openclaw.ai) - the AI-powered personal assistant. *Made with ๐Ÿฆž love by Scott Hanselman and Molty* ![Molty - Windows Tray App](docs/molty1.png) ![Molty - Command Palette](docs/molty2.png) ## Projects This monorepo contains four projects: | Project | Description | |---------|-------------| | **OpenClaw.Tray.WinUI** | System tray application (WinUI 3) for quick access to OpenClaw | | **OpenClaw.Shared** | Shared gateway client library | | **OpenClaw.Cli** | CLI validator for WebSocket connect/send/probe using tray settings | | **OpenClaw.CommandPalette** | PowerToys Command Palette extension | ## ๐Ÿš€ Quick Start > **End-user installer?** See [docs/SETUP.md](docs/SETUP.md) for a step-by-step installation guide (no build required). ### Prerequisites - Windows 10 (20H2+) or Windows 11 - .NET 10.0 SDK - https://dotnet.microsoft.com/download/dotnet/10.0 - Windows 10 SDK (for WinUI build) - install via Visual Studio or standalone - WebView2 Runtime - pre-installed on modern Windows, or get from https://developer.microsoft.com/microsoft-edge/webview2 - PowerToys (optional, for Command Palette extension) โ€” see [docs/POWERTOYS.md](docs/POWERTOYS.md) ### Build Use the build script to check prerequisites and build: ```powershell # Check prerequisites .\build.ps1 -CheckOnly # Build all projects .\build.ps1 # Build specific project .\build.ps1 -Project WinUI ``` Or build directly with dotnet: ```powershell # Build all (use build.ps1 for best results) dotnet build # Build WinUI (requires runtime identifier for WebView2 support) dotnet build src/OpenClaw.Tray.WinUI/OpenClaw.Tray.WinUI.csproj -r win-arm64 # ARM64 dotnet build src/OpenClaw.Tray.WinUI/OpenClaw.Tray.WinUI.csproj -r win-x64 # x64 # Build MSIX package (for camera/mic consent prompts) dotnet build src/OpenClaw.Tray.WinUI -r win-arm64 -p:PackageMsix=true # ARM64 MSIX dotnet build src/OpenClaw.Tray.WinUI -r win-x64 -p:PackageMsix=true # x64 MSIX ``` ### Run Tray App ```powershell # Run the exe directly (path includes runtime identifier) .\src\OpenClaw.Tray.WinUI\bin\Debug\net10.0-windows10.0.19041.0\win-arm64\OpenClaw.Tray.WinUI.exe # ARM64 .\src\OpenClaw.Tray.WinUI\bin\Debug\net10.0-windows10.0.19041.0\win-x64\OpenClaw.Tray.WinUI.exe # x64 ``` ### Run CLI WebSocket Validator Use the CLI to validate gateway connectivity and `chat.send` outside the tray UI. ```powershell # Show help dotnet run --project src/OpenClaw.Cli -- --help # Use tray settings from %APPDATA%\OpenClawTray\settings.json and send one message dotnet run --project src/OpenClaw.Cli -- --message "quick send validation" # Loop sends and also probe sessions/usage/nodes APIs dotnet run --project src/OpenClaw.Cli -- --repeat 5 --delay-ms 1000 --probe-read --verbose # Override gateway URL/token for isolated testing dotnet run --project src/OpenClaw.Cli -- --url ws://127.0.0.1:18789 --token "" --message "override test" ``` ## ๐Ÿ“ฆ OpenClaw.Tray (Molty) Modern Windows 11-style system tray companion that connects to your local OpenClaw gateway. ### Features - ๐Ÿฆž **Lobster branding** - Pixel-art lobster tray icon with status colors - ๐ŸŽจ **Modern UI** - Windows 11 flyout menu with dark/light mode support - ๐Ÿ’ฌ **Quick Send** - Send messages via global hotkey (Ctrl+Alt+Shift+C) - ๐Ÿ”„ **Auto-updates** - Automatic updates from GitHub Releases - ๐ŸŒ **Web Chat** - Embedded chat window with WebView2 - ๐Ÿ“Š **Live Status** - Real-time sessions, channels, and usage display - ๐Ÿงญ **Command Center** - Dense gateway, channel, usage, node, pairing, and allowlist diagnostics from one window - โšก **Activity Stream** - Command Center page for live session, usage, node, and notification events - ๐Ÿ”” **Toast Notifications** - Clickable Windows notifications with [smart categorization](docs/NOTIFICATION_CATEGORIZATION.md) - ๐Ÿ“ก **Channel Control** - Start/stop Telegram & WhatsApp from the menu - ๐Ÿ–ฅ๏ธ **Node Observability** - Node inventory with online/offline state and copyable summary - โฑ **Cron Jobs** - Quick access to scheduled tasks - ๐Ÿš€ **Auto-start** - Launch with Windows - โš™๏ธ **Settings** - Full configuration page - ๐ŸŽฏ **First-run onboarding** โ€” 6-screen setup wizard (connection, permissions, chat, configuration) #### Quick Send scope requirement Quick Send uses the gateway `chat.send` method and requires the operator device to have `operator.write` scope. If Quick Send fails with `missing scope: operator.write`, Molty now copies identity + remediation guidance to your clipboard, including: - operator role and `client.id` used by the tray app - gateway-reported operator device id (if provided) - currently granted scopes (if provided) For this specific error (`missing scope: operator.write`), the cause is an **operator token scope issue**. Update the token used by the tray app so it includes `operator.write`, then retry Quick Send. If Quick Send fails with `pairing required` / `NOT_PAIRED`, that is a **device approval** issue. Approve the tray device in gateway pairing approvals, reconnect, and retry. ### Menu Sections - **Status** - Gateway connection status with click-to-view details - **Command Center** - Hub with diagnostics, channel health, usage, sessions, nodes, and copyable repair commands - **Sessions** - Active agent sessions with preview and per-session controls - **Usage** - Provider/cost summary with quick jump to activity details - **Channels** - Telegram/WhatsApp status with toggle control - **Nodes** - Online/offline node inventory and copyable summary - **Recent Activity** - Timestamped event stream for sessions, usage, nodes, and notifications - **Actions** - Dashboard, Web Chat, Quick Send, Activity Stream, History - **Support & Debug** - Logs, config, diagnostics folder, redacted support context, browser setup, port/capability/node/channel/activity summaries, and managed SSH tunnel restart - **Settings** - Configuration and auto-start ### Mac Parity Status Comparing against [openclaw-menubar](https://github.com/magimetal/openclaw-menubar) (macOS Swift menu bar app): | Feature | Mac | Windows | Notes | |---------|-----|---------|-------| | Menu bar/tray icon | โœ… | โœ… | Color-coded status | | Gateway status display | โœ… | โœ… | Connected/Disconnected | | PID display | โœ… | โœ… | Command Center shows gateway listener process/PID | | Channel status | โœ… | โœ… | Mac: Discord / Win: Telegram+WhatsApp | | Sessions count | โœ… | โœ… | | | Last check timestamp | โœ… | โœ… | Shown in tray tooltip | | Gateway start/stop/restart | โœ… | โš ๏ธ | Windows can restart the managed SSH tunnel from tray Support & Debug and Command Center; external gateway process control is not implemented | | View Logs | โœ… | โœ… | | | Open Web UI | โœ… | โœ… | | | Refresh | โœ… | โœ… | Auto-refresh on menu open | | Launch at Login | โœ… | โœ… | | | Notifications toggle | โœ… | โœ… | | ### Windows-Only Features These features are available in Windows but not in the Mac app: | Feature | Description | |---------|-------------| | Quick Send hotkey | Ctrl+Alt+Shift+C global hotkey | | Embedded Web Chat | WebView2-based chat window | | Toast notifications | Clickable Windows notifications | | Channel control | Start/stop Telegram & WhatsApp | | Modern flyout menu | Windows 11-style with dark/light mode | | Deep links | `openclaw://` URL scheme with IPC | | First-run onboarding | 6-screen guided setup wizard (Welcome โ†’ Connection โ†’ Wizard โ†’ Permissions โ†’ Chat โ†’ Ready) | | PowerToys integration | Command Palette extension | ### ๐Ÿ”Œ Node Mode (Agent Control) When Node Mode is enabled in Settings, your Windows PC becomes a **node** that the OpenClaw agent can control - just like the Mac app! The agent can: | Capability | Commands | Description | |------------|----------|-------------| | **System** | `system.notify`, `system.run`, `system.run.prepare`, `system.which`, `system.execApprovals.get`, `system.execApprovals.set` | Show Windows toast notifications, execute commands with policy controls | | **Canvas** | `canvas.present`, `canvas.hide`, `canvas.navigate`, `canvas.eval`, `canvas.snapshot`, `canvas.a2ui.push`, `canvas.a2ui.pushJSONL`, `canvas.a2ui.reset` | Display and control a WebView2 window | | **Screen** | `screen.snapshot`, `screen.record` | Capture screenshots and fixed-duration MP4 screen recordings | | **Camera** | `camera.list`, `camera.snap`, `camera.clip` | Enumerate cameras and capture still photos or short video clips | | **Speech-to-text** | `stt.transcribe` | Capture audio from the default microphone for a bounded duration and return transcribed text. Default-off; opt-in via Settings. When enabled, advertised to both gateway callers (subject to gateway allowlist) and local MCP clients (subject to bearer token). | | **Location** | `location.get` | Return Windows geolocation when permission is available | | **Device** | `device.info`, `device.status` | Return Windows host/app metadata and lightweight status | | **Text-to-speech** | `tts.speak` | Speak text aloud through Windows speech synthesis, or ElevenLabs when configured | Packaged installs declare camera, microphone, and location capabilities. Windows may ask for consent the first time a node capability uses one of those protected resources. #### Node Setup 1. **Enable Node Mode** in Settings (enabled by default) 2. **First connection** creates a pairing request on the gateway 3. **Approve the device** on your gateway: ```bash openclaw devices list # Find your Windows device openclaw devices approve # Approve it ``` 4. **Configure gateway allowCommands** - Add the commands you want to allow under `gateway.nodes` in `~/.openclaw/openclaw.json`: ```json { "gateway": { "nodes": { "allowCommands": [ "system.notify", "system.run", "system.run.prepare", "system.which", "system.execApprovals.get", "system.execApprovals.set", "canvas.present", "canvas.hide", "canvas.navigate", "canvas.eval", "canvas.snapshot", "canvas.a2ui.push", "canvas.a2ui.pushJSONL", "canvas.a2ui.reset", "screen.snapshot", "camera.list", "camera.snap", "camera.clip", "location.get", "device.info", "device.status", "tts.speak" ] } } } ``` > โš ๏ธ **Important**: The gateway has a server-side allowlist. Commands must be listed explicitly - wildcards like `canvas.*` don't work! Privacy-sensitive commands such as `screen.record` and agent-driven audio playback via `tts.speak` should only be added to `allowCommands` when you explicitly want to allow them. 5. **Test it** from your Mac/gateway: ```bash # Show a notification openclaw nodes notify --node --title "Hello" --body "From Mac!" # Open a canvas window openclaw nodes canvas present --node --url "https://example.com" # Execute JavaScript (note: CLI sends "javaScript" param) openclaw nodes canvas eval --node --javaScript "document.title" # Render A2UI JSONL in the canvas (pass the file contents as a string) openclaw nodes canvas a2ui push --node --jsonl "$(cat ./ui.jsonl)" # Take a screenshot openclaw nodes invoke --node --command screen.snapshot --params '{"screenIndex":0,"format":"png"}' # Record a short screen clip (requires explicitly allowing screen.record on the gateway) openclaw nodes screen record --node --duration 3000 --fps 10 --screen 0 --no-audio --out /tmp/openclaw-windows-screen-record-test.mp4 --json # List cameras openclaw nodes invoke --node --command camera.list # Take a photo (NV12/MediaCapture fallback) openclaw nodes invoke --node --command camera.snap --params '{"deviceId":"","format":"jpeg","quality":80}' # Speak text aloud on the Windows node (requires TTS enabled in Settings and tts.speak allowed on the gateway) openclaw nodes invoke --node --command tts.speak --params '{"text":"Hello from OpenClaw","provider":"windows"}' # Execute a command on the Windows node openclaw nodes invoke --node --command system.run --params '{"command":"Get-Process | Select -First 5","shell":"powershell","timeoutMs":10000}' # View exec approval policy openclaw nodes invoke --node --command system.execApprovals.get # Update exec approval policy (add custom rules) openclaw nodes invoke --node --command system.execApprovals.set --params '{"rules":[{"pattern":"echo *","action":"allow"},{"pattern":"*","action":"deny"}],"defaultAction":"deny"}' ``` > ๐Ÿ“ท **Camera permission**: Desktop builds rely on Windows Privacy settings. Packaged MSIX builds will show the system consent prompt. > ๐Ÿ”’ **Exec Policy**: `system.run` is gated by an approval policy on the Windows node at `%LOCALAPPDATA%\OpenClawTray\exec-policy.json` (schema: `{ "defaultAction": "...", "rules": [...] }`). This is separate from gateway-side `~/.openclaw/exec-approvals.json`. > > Rules are matched against the full command line. Known wrapper payloads such as `cmd /c ...`, `powershell -Command ...`, `pwsh -EncodedCommand ...`, and `bash -c ...` are also evaluated before execution. Dangerous environment overrides like `PATH`, `PATHEXT`, `NODE_OPTIONS`, `GIT_SSH_COMMAND`, `LD_*`, and `DYLD_*` are rejected. #### Command Center diagnostics Open the status detail/Command Center from the tray menu or with `openclaw://commandcenter`. It shows: - channel health from gateway `health` events, including node-mode health received without a separate operator connection - active sessions, usage/cost data, node inventory, declared commands, and Mac parity notes - allowlist diagnostics that separate safe companion commands from privacy-sensitive opt-ins like `screen.record`, `camera.snap`, and `camera.clip` - copyable repair commands for safe allowlist fixes and pending pairing approval - recent activity and node invoke results through the Activity Stream, storing command names/status/duration only (not payloads, screenshots, recordings, or secrets) > > ```bash > openclaw nodes invoke --node --command system.execApprovals.set --params '{"rules":[{"pattern":"powershell.exe","action":"allow"},{"pattern":"pwsh.exe","action":"allow"},{"pattern":"echo *","action":"allow"},{"pattern":"*","action":"deny"}],"defaultAction":"deny"}' > ``` > ๐Ÿ” **Web Chat secure context**: Remote web chat requires `https://` (or localhost). If using a self-signed cert, trust it in Windows (Trusted Root Certification Authorities) or use an SSH tunnel to localhost. #### Node Status in Tray Menu The tray menu shows node connection status: - **๐Ÿ”Œ Node Mode** section appears when enabled - **โณ Waiting for approval...** - Device needs approval on gateway - **โœ… Paired & Connected** - Ready to receive commands - Click the device ID to copy it for the approval command ### Deep Links OpenClaw registers the `openclaw://` URL scheme for automation and integration: | Link | Description | |------|-------------| | `openclaw://settings` | Open the Settings page | | `openclaw://setup` | Open Setup Wizard | | `openclaw://chat` | Open the Chat page | | `openclaw://commandcenter` | Open Command Center diagnostics | | `openclaw://activity` | Open the Activity page | | `openclaw://history` | Open the Activity page filtered to notification history | | `openclaw://dashboard` | Open Dashboard in browser | | `openclaw://dashboard/sessions` | Open specific dashboard page | | `openclaw://dashboard/channels` | Open Channels dashboard page | | `openclaw://dashboard/skills` | Open Skills dashboard page | | `openclaw://dashboard/cron` | Open Cron dashboard page | | `openclaw://healthcheck` | Run a manual health check | | `openclaw://check-updates` | Run a manual update check | | `openclaw://logs` | Open the current tray log file | | `openclaw://log-folder` | Open the logs folder | | `openclaw://config` | Open the config folder | | `openclaw://diagnostics` | Open the diagnostics JSONL folder | | `openclaw://support-context` | Copy redacted support context | | `openclaw://debug-bundle` | Copy a combined debug bundle for support | | `openclaw://browser-setup` | Copy browser.proxy/browser-control setup guidance | | `openclaw://port-diagnostics` | Copy gateway/browser/tunnel port diagnostics with owner PID stop hints | | `openclaw://capability-diagnostics` | Copy permissions, allowlist, and parity diagnostics | | `openclaw://node-inventory` | Copy node capabilities, commands, and policy status | | `openclaw://channel-summary` | Copy channel health and start/stop availability | | `openclaw://activity-summary` | Copy recent tray activity for troubleshooting | | `openclaw://extensibility-summary` | Copy channel, skills, and cron dashboard surface guidance | | `openclaw://restart-ssh-tunnel` | Restart the tray-managed SSH tunnel when enabled | | `openclaw://send?message=Hello` | Open Quick Send with pre-filled text | | `openclaw://agent?message=Hello` | Send message directly to the connected gateway | Deep links work even when Molty is already running - they're forwarded via IPC. ## ๐Ÿ“ฆ OpenClaw.CommandPalette PowerToys Command Palette extension for quick OpenClaw access. ### Commands - **๐Ÿฆž Open Dashboard** - Launch the OpenClaw web dashboard - **๐Ÿ’ฌ Dashboard: Sessions** - Open the sessions dashboard - **๐Ÿ“ก Dashboard: Channels** - Open the channel configuration dashboard - **๐Ÿงฉ Dashboard: Skills** - Open the skills dashboard - **โฑ๏ธ Dashboard: Cron** - Open the scheduled jobs dashboard - **๐Ÿ’ฌ Web Chat** - Open the embedded Chat page - **๐Ÿ“ Quick Send** - Open the Quick Send dialog to compose a message - **๐Ÿงญ Setup Wizard** - Open pairing/setup - **๐Ÿงญ Command Center** - Open diagnostics and support actions - **๐Ÿ”„ Run Health Check** - Refresh connection health - **โฌ‡๏ธ Check for Updates** - Run a manual GitHub Releases update check - **โšก Activity Stream** - Open recent activity - **๐Ÿ“‹ Notification History** - Open notification history in the Activity page - **โš™๏ธ Settings** - Open the OpenClaw Tray Settings page - **๐Ÿ“„ Open Log File / ๐Ÿ“ Logs / ๐Ÿ—‚๏ธ Config / ๐Ÿงช Diagnostics** - Open support files and folders - **๐Ÿ“‹ Copy Support Context** - Copy redacted Command Center metadata - **๐Ÿงฐ Copy Debug Bundle** - Copy combined support, port, capability, node, channel, and activity diagnostics - **๐ŸŒ Copy Browser Setup** - Copy browser.proxy and node-host setup guidance - **๐Ÿ”Œ Copy Port Diagnostics** - Copy gateway/browser/tunnel port owners and stop hints - **๐Ÿ›ก๏ธ Copy Capability Diagnostics** - Copy permission, allowlist, and parity diagnostics - **๐Ÿ–ฅ๏ธ Copy Node Inventory** - Copy node capabilities, commands, and policy status - **๐Ÿ“ก Copy Channel Summary** - Copy channel health and start/stop availability - **โšก Copy Activity Summary** - Copy recent tray activity - **๐Ÿงฉ Copy Extensibility Summary** - Copy channel, skills, and cron surface guidance - **๐Ÿ” Restart SSH Tunnel** - Restart the tray-managed SSH tunnel when enabled ### Installation 1. Run the OpenClaw Tray installer and tick **"Install PowerToys Command Palette extension"**, or 2. Register manually: `Add-AppxPackage -Register "$env:LOCALAPPDATA\OpenClawTray\CommandPalette\AppxManifest.xml" -ForceApplicationShutdown` 3. Open Command Palette (`Win+Alt+Space`) and type "OpenClaw" to see commands See [docs/POWERTOYS.md](docs/POWERTOYS.md) for detailed setup and troubleshooting. ## ๐Ÿ“ฆ OpenClaw.Shared Shared library containing: - `OpenClawGatewayClient` - WebSocket client for gateway protocol - `IOpenClawLogger` - Logging interface - Data models (SessionInfo, ChannelHealth, etc.) - Channel control (start/stop channels via gateway) ## Development ### Project Structure ``` openclaw-windows-node/ โ”œโ”€โ”€ src/ โ”‚ โ”œโ”€โ”€ OpenClaw.Shared/ # Shared gateway library โ”‚ โ”œโ”€โ”€ OpenClaw.Tray.WinUI/ # System tray app (WinUI 3) โ”‚ โ””โ”€โ”€ OpenClaw.CommandPalette/ # PowerToys extension โ”œโ”€โ”€ tests/ โ”‚ โ”œโ”€โ”€ OpenClaw.Shared.Tests/ # Shared library tests โ”‚ โ””โ”€โ”€ OpenClaw.Tray.Tests/ # Tray app helper tests โ”œโ”€โ”€ docs/ โ”‚ โ””โ”€โ”€ molty1.png # Screenshot โ”œโ”€โ”€ openclaw-windows-node.slnx # Solution file โ”œโ”€โ”€ README.md โ”œโ”€โ”€ LICENSE โ””โ”€โ”€ .gitignore ``` ### Configuration Settings are stored in: - Settings: `%APPDATA%\OpenClawTray\settings.json` - Logs: `%LOCALAPPDATA%\OpenClawTray\openclaw-tray.log` Default gateway: `ws://localhost:18789` ### First Run On first run, Molty launches a guided onboarding wizard that walks you through setup: 1. **Welcome** โ€” introduces OpenClaw and starts the setup flow 2. **Connection** โ€” choose Local gateway, Remote gateway, or configure later. Paste a setup code or enter gateway URL and token manually. Tests the connection with Ed25519 device authentication. 3. **Wizard** โ€” gateway-driven configuration steps (AI provider selection, personality setup, communication channels). Steps are defined by your gateway. 4. **Permissions** โ€” reviews Windows system permissions (notifications, camera, microphone, screen capture, location) and links to system settings to grant them. 5. **Chat** โ€” meet your agent in a live chat powered by the gateway's web UI. 6. **Ready** โ€” summary of available features, option to launch at startup, and a Finish button. For detailed setup instructions, see [docs/SETUP.md](docs/SETUP.md). For the full onboarding architecture, see [docs/ONBOARDING_WIZARD.md](docs/ONBOARDING_WIZARD.md). ## License MIT License - see [LICENSE](LICENSE) --- *Formerly known as Moltbot, formerly known as Clawdbot*