# Cloudflare Tunnel Runner

> Run and manage the cloudflared process that publishes the dashboard through a Cloudflare Tunnel.

| | |
|---|---|
| Version | 1.0.0 |
| Category | Cloud |
| Permissions | shell.exec |
| Depends on | ai-chat |

# Cloudflare Tunnel Runner

Run and manage the cloudflared process that publishes the dashboard through a Cloudflare Tunnel.

**Type:** `backend` — see `.claude/skills/kazuo-create-plugin/references/plugin-examples.md`

**Requires:** `ai-chat` — checked when installing, not installed for you.

**Permissions declared:** `shell.exec` — shown to the user before install; the host does not sandbox on them.

## What it does

- Starts and stops the local cloudflared process that publishes this machine through a named tunnel.
- The backend owns the process, so it keeps running while the widget is closed; the widget streams its log.

## Files

- `manifest.json` — metadata, `defaultSettings`, `defaultWidgetConfig`
- `widget.html` / `js/widget.js` / `css/widget.css` — the widget, including its own gear button and settings overlay (the host draws no per-widget gear icon)
- `settings.html` / `js/settings.js` / `css/settings.css` — the same fields again, for the Plugin Manager screen and the pop-out window
- `locales/en.json5` / `locales/vi.json5` — UI strings under `widget.*` and `settings.*`
- `main/index.ts` (compiled to `main/index.js`) — runs in the Electron main process: `activate` / `deactivate`
- `icon.svg` — Store and Plugin Manager icon

## Default settings

- `cloudflaredPath` — default: `"%USERPROFILE%\\cloudflared\\cloudflared.exe"`
- `tunnelName` — default: `"kazuo-dashboard"`
- `configPath` — default: `"%USERPROFILE%\\.cloudflared\\config.yml"`
- `publicUrl` — default: `"https://dash.kaiitech.net"`
- `autoStart` — default: `false`

## Test

Open Kazuo AI → Plugin Manager — the plugin appears on its own (the host scans `plugins-library/`,
nothing to register) → Install → Enable.

After editing `main/index.ts`, recompile before testing: `npx tsc -p tsconfig.plugins.json`
(from the project root).
