deploy-menubarlisted
Install: claude install-skill RonenMars/threadbase-streamer
# Deploy menubar
Builds and launches the `vendor/menubar` Electron app. Always run this **after** the streamer server is healthy — the menubar polls `/healthz` and needs the server up to show a green icon.
## Step 1 — Detect OS
Use `$IsWindows` / `$IsMacOS` / `$IsLinux` in PowerShell, or check `uname -s` in bash:
| Platform | Proceed? |
|---|---|
| macOS (`Darwin`) | yes |
| Linux | yes |
| Windows (`$IsWindows`) | yes |
| Other | stop — unsupported |
All subsequent steps have platform-specific variants where needed.
## Step 2 — Ensure submodule is checked out
**macOS / Linux (bash):**
```bash
cd <repo-root>
if [[ ! -f vendor/menubar/package.json ]]; then
git submodule update --init --recursive vendor/menubar
fi
```
**Windows (PowerShell):**
```powershell
$menubarPkg = "vendor\menubar\package.json"
if (-not (Test-Path $menubarPkg)) {
git submodule update --init --recursive vendor/menubar
}
```
## Step 3 — Install deps (idempotent)
**macOS / Linux:**
```bash
cd vendor/menubar
if [[ ! -d node_modules ]] || [[ package.json -nt node_modules ]]; then
npm install --silent
fi
```
**Windows:**
```powershell
Set-Location vendor\menubar
if (-not (Test-Path node_modules)) { npm install --silent }
```
## Step 4 — Build (idempotent)
**macOS / Linux:**
```bash
cd vendor/menubar
need_build=0
if [[ ! -d dist ]]; then
need_build=1
else
newest_src="$(find src -type f -newer dist -print -quit 2>/dev/null || true)"
[[ -n "$newest_src" ]] && need_build=1
fi
if (( need_bui