Disclaimer : I used to stream on Windows with some scripts but when I stared to stream on Linux, it was painful to make Streamer.Bot even works normally that it gave me the idea to replace it with some app on linux. After some failed configuration to run my custom scripts (bash/powershell/typescript within wine) and some AI tests, I decided to give it a shot directly with an app seeing that the Kick api was finally available (it was my last blocker for some tries already on Windows....)
Small toolkit to manage streaming across YouTube, Twitch, and Kick with a unified interface. Written to run on Bun. This repository contains:
src/: TypeScript source (platform providers, services, UI)test/: Unit and integration tests (run withbun test)config.example.json: Template for bootstrap config stored atYASH_DATA_DIR/config.jsonsettings.example.json: Template for mutable runtime settings stored atYASH_DATA_DIR/settings.json
- Install dependencies:
bun install - Launch the full app:
bun run start
bun run startstarts the current primary entrypoint:src/index.tsxsrc/index.tsxruns the TUI and importssrc/index.tsas a side effect to startBun.servein the same processbun run start:webuiruns only the web server (src/index.ts)bun run start:tuiruns the TUI-focused mode (YASH_TUI_ONLY=1 bun run src/index.tsx)bun run cmd <command>sends a command to a running TUI process via IPC (see CLI IPC below)bun ~/.agents/skills/github-pr-attachments/scripts/upload_pr_attachment.ts --file tmp/<artifact>.mp4 [--pr <number|url>]uploads a local proof artifact through GitHub's PR editor and prints agithub.com/user-attachments/...URL that GitHub will inline in the PR bodyBun.serveintentionally usesdevelopment: false; Bun development-mode bundle timing output corrupts the TUI rendering on the shared terminal fd
Note: Running the TUI process and web server as separate long-lived processes against the same port is not the supported default flow anymore. Use
bun run startunless you explicitly want a web-only or TUI-only mode.
When a TUI process is running, it listens on a Unix Domain Socket at YASH_DATA_DIR/yash.sock (default ~/.config/yash/yash.sock). The bun run cmd script connects to that socket, sends a command, prints the response, and exits.
bun run cmd /action # list public IPC-safe actions
bun run cmd /marker # drop a stream marker
bun run cmd /marker "Replay | -300" # 5 minutes before the current live position
bun run cmd /marker "Boss | 32:44" # 32 minutes 44 seconds from stream start
bun run cmd /markers # list all markers
bun run cmd /markers restore twitch
bun run cmd /settings get stream.title
bun run cmd /settings set demo true
bun run cmd /connect youtube
bun run cmd /msg all Hello chat
bun run cmd /memory
bun run cmd /help
bun run cmd /scripts list
bun run cmd /scripts install obs-source-recallerBoth forms are accepted — bun run cmd marker and bun run cmd /marker are equivalent; the leading / is added automatically if omitted.
/marker accepts raw seconds as before, and also mm:ss or hh:mm:ss timestamps for YouTube chapters.
/markers restore twitch [limit] imports recent Twitch markers into persisted YouTube chapters, but only when that marker text is missing from YouTube already. Persisted YouTube chapters stay sorted by timestamp so /markers, edit, and clear IDs remain stable after imports.
Commands invoked over IPC are also echoed into the live TUI chat pane before their output, using an [ipc → cmd] /... line. The same command echo exists for typed slash commands inside the TUI as [you → cmd] /....
/settings and the TUI settings modal can also change logs.level (debug, info, warn, error, or none) at runtime, so you can raise logging for live debugging without restarting YASH.
/memory prints a live process snapshot from inside YASH itself: RSS, heap/external usage, recent growth windows, and retention probe counts for major long-lived buffers/caches. The same data is also available over HTTP at GET /api/runtime/status, while /api/metrics and /metrics expose the numeric gauges for scraping. For TUI leak triage, the payload includes refresh-loop counters such as updateUiLoopRefreshCount, updateLoopEnabled, and updateLoopSkippedRefreshCount so you can confirm whether the periodic 2s loop is actually rebuilding the UI or idling.
The memory modal and /api/runtime/status also expose RSS-focused telemetry for cases where resident memory rises while JS heap stays flat: estimated native gap (RSS - heapUsed - external), since-start growth, sample-to-sample delta, peak/floor RSS, and rolling 15m/30m/60m windows.
If memory.telemetry.enabled is turned on, YASH appends periodic JSONL memory snapshots under YASH_DATA_DIR/logs/memory-telemetry-YYYY-MM-DD.jsonl. The cadence is controlled by memory.telemetry.intervalMinutes (default 15), and the file is daily/appended rather than one file per startup.
For heap-retention incidents, opt in with memory.autoSnapshot.enabled=true. YASH captures only after sustained 30-minute growth meets the configured RSS and JS-heap thresholds (minRssGrowthMb=256, minHeapGrowthMb=128, heap share >=25%), then limits captures with a 30-minute cooldown, maxPerRun=3, and maxRetained=6. Automatic snapshots are written under YASH_DATA_DIR/logs/heap-snapshots/; this remains disabled by default because snapshots pause the process and can temporarily raise memory use.
Inside the live TUI, /memory modal opens the same memory status overlay as clicking the MEM: status-bar segment. That subcommand is TUI-only and is rejected over IPC and the WebUI command box.
Exit behaviour:
- Exits
0with stdout output on success - Exits
1and prints the error string to stderr on command error - Exits
1and printsyash is not runningwhen the socket is absent or the connection is refused
Commands blocked over IPC (return an error string instead of executing):
| Command | Reason |
|---|---|
/exit |
Cannot terminate the TUI remotely |
/stream |
Requires TUI modal interaction |
/setup-youtube |
Requires TUI modal interaction |
/history |
Requires TUI modal interaction |
/activity |
Requires TUI modal interaction |
/chatter |
Requires TUI modal interaction |
/inject |
TUI-only dev/testing helper |
/memory modal |
Requires TUI modal interaction |
/settings (bare) |
Requires TUI settings modal |
/settings get <key> and /settings set <key> <value> work normally over IPC.
YASH ships a small catalog of tracked example user scripts under examples/scripts/, and the live TUI/IPC command surface can install them into your runtime script directory:
bun run cmd /scripts list
bun run cmd /scripts install obs-scene-change
bun run cmd /scripts install obs-startup
bun run cmd /scripts install obs-source-recaller
bun run cmd /scripts install obs-audio-routing
bun run cmd /scripts install obs-alerts
bun run cmd /scripts install obs-source-recaller repair
bun run cmd /scripts install obs-source-recaller copy- Install target:
${YASH_DATA_DIR}/scripts/<example-id>/ - Existing files are never overwritten; install aborts if any target file already exists
- Local dev installs default to
linkmode: tracked script files are symlinked from the repo, whileconfig.jsoncis still copied so script-local settings stay user-owned - AppImage / packaged installs default to
copymode because the bundled example sources are not expected to be edited in place - Pass
copyto force copied tracked files in local dev, orlinkto request symlinked tracked files explicitly - Use
repair(orforce) to refresh tracked files intentionally for a partial or outdated install - Repair merges the shipped
config.jsoncdefaults with your currentconfig.jsonc, preserving your existing values and unknown keys - Restart YASH after install so the script is loaded at startup
obs-scene-changeis the simplest voice-bridge-oriented example: configure a default scene or passscene=and callobs.scene-change.activateobs-audio-routingis a Linux-first Hyprland + PipeWire example that keeps persistedStream/Musicrouting rules inscripts/obs-audio-routing/config.jsonc, exposesconfig,config.tui,config.open, runtimestatus/wiring/candidates/searchactions, can restore or repair shipped default exclusions, restores tracked streams to their previous sink when disabled, supports optional OBS stream start/stop and OBS connect/disconnect auto-enable flags, supportsrouting.linkWhenSourceSinkMatchesfor intercepting/processing sinks likeeasyeffects_sinkso matched apps are linked toMusic/Streaminstead of being moved off those sinks, and ships with one enabledcliamp -> Musicexample ruleobs-alertsreacts to live Twitch/Kick/YouTube activity events, stores rules inscripts/obs-alerts/config.jsonc, and exposesobs.alerts.add/list/remove/enable/test/status/pause/resume;obs.alerts.addautocompletesplatform=, comma-separatedtypes=,scene=fromobs.scenes, andsource=/textSource=/showSource=fromobs.sceneSources, then matching events set OBS text to{user}and show the configured source without auto-hiding
/action exposes public IPC-safe actions from the internal action registry.
bun run cmd /action
bun run cmd /action marker.create timestamp=-300
bun run cmd /action obs.shutdown.initiate
bun run cmd /action obs.shutdown.initiate delay=10 scene='[PS] End'
bun run cmd /action obs.shutdown.config delay=45 stopStream=false
bun run cmd /action obs.startup.config countdownDelay=60 startStream=true/actionwith no action id lists public actions grouped by domain/action <id>invokes the action directly when all args are optional/action <id>shows help and examples when required args are still missing/action <id> key=value ...parses typed args and invokes the action
The TUI autocomplete also understands /action, including action ids, key= argument names, and enum values. Matches are fuzzy-ranked: prefix matches win, then substring matches, then subsequence matches. Tab cycles forward through the current completion set, and Shift+Tab cycles backward.
Bundled OBS actions also publish scene/source arg metadata for dynamic autocomplete providers. obs.shutdown.* exposes scene= plus scene-qualified source= / hideSources= suggestions, and obs.source-recaller.* exposes dynamic source= / scene= suggestions for OBS scene exploration and restore flows.
Stale socket cleanup: the server removes any pre-existing socket file at startup, so a leftover socket from a crash does not block a new TUI launch.
flowchart TD
A(["bun run cmd <command>\nsrc/cli.ts"]) --> B["Normalise\n(prepend '/' if missing)"]
B --> C["sendCliCommand\nsrc/ipc/client.ts"]
C --> D["net.createConnection\n$YASH_DATA_DIR/yash.sock"]
D -->|"ENOENT / ECONNREFUSED"| E["stderr: 'yash is not running'\nexit 1"]
D -->|"connected"| F["Write JSON request\n{command: '/foo bar'}"]
F --> G[["yash TUI process\nsrc/ipc/server.ts"]]
G --> H["Buffer until newline\nparse JSON"]
H --> I["handleCommandForCli\nsrc/index.tsx"]
I -->|"/exit"| J["'Cannot exit the TUI via IPC'"]
I -->|"TUI-only cmd\n(/stream /history etc.)"| K["'This command requires the TUI'"]
I -->|"unknown cmd"| L["'Unknown command: ...'"]
I -->|"valid cmd"| M["commandHandlers#91;cmd#93;(parts, emit)\ncollect lines → join"]
J --> N["Write {ok: false, error}"]
K --> N
L --> O["Write {ok: true, output}"]
M --> O
N --> P["socket.end()"]
O --> P
P --> Q["client reads response"]
Q -->|"ok: true"| R["stdout: output / exit 0"]
Q -->|"ok: false"| S["stderr: error / exit 1"]
Q -->|"parse failure"| T["'Invalid response' / exit 1"]
R --> U["client.end()"]
S --> U
T --> U
style E fill:#c0392b,color:#fff
style N fill:#e67e22,color:#fff
style R fill:#27ae60,color:#fff
style S fill:#c0392b,color:#fff
style T fill:#c0392b,color:#fff
style G fill:#2980b9,color:#fff
This project splits runtime state across two files under YASH_DATA_DIR (default ~/.config/yash). Do NOT commit either file.
On startup, YASH performs a one-time migration from the legacy repository-root config.json when that legacy file exists and the runtime config file does not yet exist. It also performs a one-time split migration that moves mutable runtime settings out of config.json into settings.json.
- Copy
config.example.jsonto your runtime config location and update bootstrap values that are local-only (OBS websocket password, provider credentials, stream keys, etc.).mkdir -p "${YASH_DATA_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/yash}" && cp config.example.json "${YASH_DATA_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/yash}/config.json" - Copy
settings.example.jsonto your runtime settings location and update mutable defaults such as stream metadata, UI preferences, and YouTube setup flags.mkdir -p "${YASH_DATA_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/yash}" && cp settings.example.json "${YASH_DATA_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/yash}/settings.json" - If you already have a legacy repo-root
config.json, YASH will migrate it once automatically the first time it starts without an existing runtime config file.
config.json holds rarely edited bootstrap data such as OBS, server, and provider credentials/setup fields. settings.json holds mutable YASH-owned runtime state such as stream.*, streamTemplates.activeName, streamTemplates.items, platforms.youtube.setup, chat/UI preferences, demo mode, and per-platform viewer display settings.
Ownership boundary:
YASH_DATA_DIR/config.json,YASH_DATA_DIR/settings.json, tokens, logs, the message DB, and the IPC socket are YASH-owned files- User scripts own
YASH_DATA_DIR/scripts/<scriptId>/ - A script's editable config lives at
YASH_DATA_DIR/scripts/<scriptId>/config.jsonc - For normal script settings,
config.jsoncis the single source of truth; live edits from commands or TUI should write back there rather than splitting into another runtime settings file
Bundled and user scripts use a dedicated per-script folder at ~/.config/yash/scripts/<scriptId>/.
The standard editable config file is config.jsonc inside that folder:
For example, the bundled obs-shutdown action can be configured at:
That lets /action obs.shutdown.initiate run with config-backed defaults, optionally keep an OBS text source updated during the countdown, and choose whether the countdown should actually stop the OBS stream when it reaches zero.
The bundled script reads and writes YASH_DATA_DIR/scripts/obs-shutdown/config.jsonc. You can inspect or update it with /action obs.shutdown.config; for example:
/action obs.shutdown.config
/action obs.shutdown.config delay=45 stopStream=false scene='[PS] End'
/action obs.shutdown.config chat.interval=15 countdown.source='[TXT] Countdown'Inside the live TUI, /action obs.shutdown.config.tui opens a dedicated modal for the same settings, and /action obs.shutdown.actions opens the action browser for the shutdown script. Both are TUI-only and are rejected over IPC.
source accepts either <source> or <scene>.<source>. The scene qualifier is only used to resolve the intended source name before OBS text updates, because the text update itself still applies to the underlying source globally. hideSources accepts the same two forms: plain <source> searches every scene, while explicit <scene>.<source> only hides and restores that one scene item.
The bundled obs-startup example follows the same ownership model. Its settings live in YASH_DATA_DIR/scripts/obs-startup/config.jsonc; YASH injects /action obs.startup.config, /action obs.startup.config.tui, /action obs.startup.config.open, and /action obs.startup.actions around that file and the script's registered behavior actions.
Keep any script-private data inside the same YASH_DATA_DIR/scripts/<scriptId>/ folder so ownership stays local to that script and YASH's own config.json / settings.json remain reserved for the app itself. For normal script settings, config.jsonc is the standard persisted file.
For loader-backed user scripts and bundled example scripts, YASH owns the standard script surface: /action <prefix>.config, /action <prefix>.config.tui, /action <prefix>.config.open, and /action <prefix>.actions. Scripts provide scriptDefinition, their behavior actions (for example begin, save, status), and a mandatory config.jsonc; YASH injects the config/actions surface, keeps config IPC-safe, blocks config.tui and actions over IPC, and opens config.open through $EDITOR / $TERMINAL. A script config.jsonc may also include a reserved top-level "$ui" object so the generic TUI editor can apply labels, ordering, widget hints, hidden fields, and wildcard path templates for nested object/array rows.
The main TUI input history is persisted separately in YASH_DATA_DIR/input-history.json, so previously sent commands and plain messages remain recallable with Up/Down after a restart.
For self-describing script config UIs, a script may also keep reserved TUI metadata inside the same config.jsonc file under a top-level "$ui" object. The generic script config modal reads that metadata to choose labels, ordering, widget hints such as toggle or json, descriptions, and hidden fields, while leaving the actual runtime values in their normal config shape. Object and array values are explored recursively; json hints render them as structured tree sections with editable scalar leaves rather than one opaque blob. When focus is on an array-item section row, [ moves it up, ] moves it down, and x deletes it locally until you save or cancel.
Pre-v1 note:
- YASH does not guarantee migration of old user-script runtime state layouts
- Script/runtime data format changes may require reinstalling or resetting a script's local
config.jsonc
The bundled obs-source-recaller example remembers one OBS source's settings per scene and automatically restores matching snapshots on CurrentProgramSceneChanged.
Actions:
obs.source-recaller.config [startPaused=<true|false>]obs.source-recaller.config.tuiobs.source-recaller.config.openobs.source-recaller.actionsobs.source-recaller.save source=<source|scene.source> [stage=<inputSettings|sceneItemTransform|sceneItemEnabled>]obs.source-recaller.load source=<source|scene.source>obs.source-recaller.listobs.source-recaller.exploreobs.source-recaller.pauseobs.source-recaller.resume
Typical flow:
- Install it with
bun run cmd /scripts install obs-source-recaller - Run
/action obs.source-recaller.exploreto list source names in the current scene - If needed, inspect another scene directly with
/action obs.source-recaller.explore scene='Starting Soon' - Adjust a source in one OBS scene and run
/action obs.source-recaller.save source='Camera' - If you only want to refresh one restore stage, use
/action obs.source-recaller.save source='Camera' stage='sceneItemTransform' - Switch to another scene, adjust the same source differently, and save again
- If needed, target another scene or nested/keyed source directly with
/action obs.source-recaller.save source='Starting Soon.Camera' - The active OBS scene still acts as the trigger scene; the explicit
scene.sourceonly changes which source is captured or restored - Use
/action obs.source-recaller.listto see which saved sources match the current OBS program scene - Leave the watcher active so later scene changes restore the matching snapshot automatically
Notes:
loadrestores the saved snapshot for the current OBS trigger scene; an explicitscene.sourcechanges the targeted source rather than the trigger scenesavewithoutstage=refreshes all three restore stages; withstage=...it replaces only that stored stage for the target source and leaves the other saved stages untouched- Restores wait for each OBS request ACK before starting the next stage; there is no extra sleep, but the script does not mark the restore complete until the full sequential ACK chain finishes
- Saved and edited trigger operations support
checkIfChangedToApply; when true, a stage is skipped if the current OBS state already matches the saved value - Automatic scene recalls keep stage order per source, skip later stages for a source after that source fails, and continue restoring unrelated sources in the same scene
pausedisables automatic scene-change recalls without deleting saved snapshotsresumere-enables recalls and, when OBS is connected, immediately reapplies any matching snapshots for the current sceneconfig,config.tui, andconfig.openare framework-owned actions injected by YASH againstYASH_DATA_DIR/scripts/obs-source-recaller/config.jsoncconfigupdates the script-localstartPauseddefault, whileconfig.tuican also edit top-levelpausedand thetriggersJSON map in that same file- The generic script config TUI renders scalar leaves as compact one-line editors (
key: type = value) and can rename nested object/array rows with"$ui"wildcard templates such as"triggers/*/*": { "titleTemplate": "${index} - ${sourceRef} : ${stage}" } - When focus lands on an array-item section row in the generic script config TUI,
[moves that item up,]moves it down, andxdeletes it locally until you save or cancel - The same
config.jsoncfile also stores top-levelpausedandtriggerskeys for this script - The bundled example also ships a top-level
"$ui"section so the generic TUI config editor can describestartPaused,paused, andtriggersfrom the same file
YASH_DATA_DIR/config.json,YASH_DATA_DIR/settings.json, and the other files underYASH_DATA_DIR(default~/.config/yash/) should be treated as sensitive local secrets- This repository is suitable for local or otherwise controlled environments, not as-is for broad public multi-tenant deployment
- If you expose the web server beyond localhost, you should add a reverse proxy / network ACL layer and explicit authentication controls around any sensitive endpoints
The /stream modal (TUI) and stream form (WebUI) have per-platform category fields. Twitch and Kick fields autocomplete live as you type (300 ms debounce); YouTube uses a static dropdown. All three are sent as separate metadata fields (twitchGame, kickCategory, youtubeCategory).
Inside the TUI /stream modal, Ctrl+→ still cascades the current category/subject field down the platform chain, Ctrl+F toggles force-apply mode so all currently visible fields are resent even when persisted values already match, and the template name field lets you manage multiple saved templates: F5 saves the current draft into streamTemplates.items[<name>], F8 restores the template currently named in that field, and F10 deletes the currently named template from the saved set.
The WebUI chat surfaces at /, /unified, and /sidebyside render Twitch FrankerFaceZ emotes inline when YASH knows the authenticated Twitch channel login. The browser fetches a cached emote map from GET /api/twitch/ffz-emotes; persisted chat messages remain plain text, and only the WebUI rendering layer swaps matching Twitch tokens for emote images.
The TUI uses the same cached FrankerFaceZ map for Twitch messages, but keeps substitution as a render-time concern so persisted chat history stays plain text. When the active terminal supports Kitty-style Unicode image placeholders, YASH swaps matching Twitch tokens inline in the main Chat pane and the chatter/history modal message rows; verified on Ghostty through tmux with allow-passthrough on or allow-passthrough all. On terminals without that support, YASH leaves the original token text visible instead of breaking layout.
You can scale TUI emotes with tui.emotes.scale in settings.json or through /settings set tui.emotes.scale <percent>. 100 keeps the default size, 150 makes them larger, and the live TUI reuploads the inline images immediately after the setting changes.
If you tried tui.emotes.scale before the sizing fix on this branch, revisit your saved value. Visible growth now happens in terminal cell spans, so you may want a larger setting such as 200 or 400 for a more obvious change.
GitHub only renders inline PR videos reliably when the body contains a https://github.com/user-attachments/assets/... URL. Release asset URLs from gh release upload remain useful as downloadable artifacts, but GitHub usually treats them as plain links instead of rendering embedded video blocks.
Use the global GitHub PR attachment helper when you need an inline PR video:
bun ~/.agents/skills/github-pr-attachments/scripts/upload_pr_attachment.ts --pr 35 --file tmp/ffz-web.mp4- The script reuses the shared persistent Playwright browser profile at
~/.cache/codex/github-pr-attachments/playwright-profile - If that profile is not logged in yet, sign in once in the opened browser window and rerun or let the script continue
- The helper uploads through the PR conversation editor, extracts the
user-attachmentsURL, and prints it - Add that raw URL on its own line in the PR body so GitHub renders the inline video
- For templated PR bodies, use
--mode apply --placeholder __ATTACHMENT_URL__to patch the live PR body throughgh pr edit
/streammay only update mutable YouTube broadcasts:created,ready,testing, orlive- Completed or revoked broadcasts are never valid update targets
- If no mutable broadcast exists for the configured stream key, YASH creates a fallback broadcast with
liveBroadcasts.insert, binds it withliveBroadcasts.bind, and then applies the metadata update to that new broadcast - Studio can create an unscheduled
ready"Direct stream" broadcast withsnippet.scheduledStartTime = null - The public YouTube API does not expose that exact creation behavior:
liveBroadcasts.insertrequires a futurescheduledStartTime, and using Unix epoch zero is rejected withinvalidScheduledStartTime
flowchart TD
A["User runs /stream in TUI or submits stream form in WebUI"] --> B["Collect selected platforms and metadata fields"]
B --> C{"Any metadata changed?"}
C -- No --> C1["Stop: no-op, report 'No changes'"]
C -- Yes --> D["Persist merged stream metadata to YASH_DATA_DIR/settings.json"]
D --> E["Call StreamService.setStreamMetadata(targetPlatforms, mergedMetadata)"]
E --> F{"For each selected provider"}
F --> Y["YouTube provider"]
F --> T["Twitch provider"]
F --> K["Kick provider"]
T --> T1["Validate auth and resolve Twitch game/category by name"]
T1 --> T2{"Validation/update result"}
T2 -- Success --> T3["Return applied/skipped field details"]
T2 -- Error --> T4["Return provider error"]
K --> K1["Validate auth and resolve Kick category by name"]
K1 --> K2{"Validation/update result"}
K2 -- Success --> K3["Return applied/skipped field details"]
K2 -- Error --> K4["Return provider error"]
Y --> Y1["List own liveBroadcasts; resolve saved stream key to streamId via API"]
Y1 --> Y3["Filter broadcasts to mutable lifecycle states: created, ready, testing, live"]
Y3 --> Y4{"Any broadcast (mutable or not) bound to saved streamId?"}
Y4 -- Yes --> Y5["Pick best mutable broadcast bound to that streamId"]
Y4 -- No --> Y6{"Any mutable broadcast exists at all?"}
Y6 -- Yes --> Y7["Pick best mutable broadcast (unbound or other)"]
Y6 -- No --> Y8{"saved streamId available?"}
Y8 -- No --> Y13["Return warning: no broadcast target found + recent broadcast references"]
Y8 -- Yes --> Y9["Create fallback broadcast via liveBroadcasts.insert"]
Y9 --> Y10["Bind fallback broadcast to saved stream via liveBroadcasts.bind"]
Y10 --> Y11["Return warning: fallback broadcast created"]
Y11 --> Y5
Y5 --> Y12["Update liveBroadcast snippet, then update video snippet/title/description/category/tags"]
Y12 --> Y14{"Update result"}
Y14 -- Success --> Y15["Return applied field details and optional warnings"]
Y14 -- Error --> Y16["Return provider error"]
T3 --> Z["Aggregate per-provider results"]
T4 --> Z
K3 --> Z
K4 --> Z
Y13 --> Z
Y15 --> Z
Y16 --> Z
Z --> R{"Any provider errors?"}
R -- No --> R1["Report per-provider success/warning results to UI"]
R -- Yes --> R2["Report mixed success/error results to UI"]
Notes:
- YouTube completed/revoked broadcasts are never valid
/streamupdate targets. - If YouTube has no mutable target, YASH may create a fallback broadcast and bind it to the saved stream key before applying metadata.
- The public YouTube API does not reproduce Studio's unscheduled direct-stream sentinel exactly; fallback creation may briefly exist as an upcoming broadcast because
liveBroadcasts.insertrequires a futurescheduledStartTime.
YASH keeps retrying OBS websocket connections both after an established connection drops and when OBS was unavailable during app startup. You can tune that reconnection and backoff behaviour via environment variables or the runtime config file at YASH_DATA_DIR/config.json (default ~/.config/yash/config.json, under obs.websocket). Environment variables take precedence and are useful for CI/runtime overrides.
Environment variables:
| Variable | Description | Default |
|---|---|---|
YASH_OBS_SERVER |
OBS websocket host | localhost |
YASH_OBS_PORT |
OBS websocket port | 4455 |
YASH_OBS_PASSWORD |
OBS websocket password | — |
YASH_OBS_RECONNECT_BASE_MS |
Base backoff delay in ms | 30000 |
YASH_OBS_RECONNECT_MAX_MS |
Maximum backoff cap in ms | 300000 (5 min) |
YASH_OBS_RECONNECT_MULTIPLIER |
Exponential multiplier | 2 |
YASH_OBS_RECONNECT_MAX_ATTEMPTS |
Maximum retry attempts | unlimited |
YASH_OBS_DISABLE_RECONNECT |
Disable reconnect retries after an OBS disconnect/failure (1/true) |
disabled |
YASH_OBS_CONNECT_DELAY_MS |
Simulated connect delay in ms (testing) | 1000 |
YASH_DISABLE_AUTH_AUTO_REFRESH |
Skip AuthService token refresh loop for soak/A-B runs (1/true) |
disabled |
YASH_DISABLE_YOUTUBE_STARTUP |
Skip YouTube startup hooks/poll setup for soak/A-B runs (1/true) |
disabled |
YASH_DISABLE_TWITCH_STARTUP |
Skip Twitch startup hooks/listener setup for soak/A-B runs (1/true) |
disabled |
YASH_DISABLE_KICK_STARTUP |
Skip Kick startup hooks/poll/relay setup for soak/A-B runs (1/true) |
disabled |
YASH_DISABLE_TWITCH_RUNTIME |
Skip Twitch auth-restored chat/viewer runtime startup for soak/A-B runs (1/true) |
disabled |
YASH_DISABLE_KICK_RUNTIME |
Skip Kick auth-restored poll runtime startup for soak/A-B runs (1/true) |
disabled |
YASH_DISABLE_TUI_UPDATE_LOOP |
Skip the 2s periodic TUI refresh loop for soak/A-B runs (1/true) |
disabled |
Example (env):
export YASH_OBS_RECONNECT_BASE_MS=10000
export YASH_OBS_RECONNECT_MULTIPLIER=2
export YASH_OBS_RECONNECT_MAX_ATTEMPTS=10
# disable retries entirely for OBS-down soak runs
export YASH_OBS_DISABLE_RECONNECT=1
# disable all non-chat startup loops for leak A/B runs
export YASH_DISABLE_AUTH_AUTO_REFRESH=1
export YASH_DISABLE_YOUTUBE_STARTUP=1
export YASH_DISABLE_TWITCH_STARTUP=1
export YASH_DISABLE_KICK_STARTUP=1
export YASH_DISABLE_TWITCH_RUNTIME=1
export YASH_DISABLE_KICK_RUNTIME=1
export YASH_DISABLE_TUI_UPDATE_LOOP=1Example (~/.config/yash/config.json):
{
"obs": {
"websocket": {
"server": "localhost",
"port": "4455",
"reconnectBaseMs": 10000,
"reconnectMultiplier": 2,
"reconnectMaxAttempts": 10,
"disableReconnect": true
}
}
}Note: Values supplied via environment variables are parsed as strings and cast to numbers by the app where applicable. Set
YASH_OBS_DISABLE_RECONNECT=1only for leak/soak A/B runs where you want one initial connect attempt and no automatic retries afterward. TheYASH_DISABLE_*_STARTUP,YASH_DISABLE_*_RUNTIME,YASH_DISABLE_TUI_UPDATE_LOOP, andYASH_DISABLE_AUTH_AUTO_REFRESHswitches are intended only for controlled leak-isolation runs; they intentionally prevent the related background loops from starting.
When the Kick platform provider calls setupWebhooks(), the app starts a smee.io relay channel and logs the public relay URL to the console. Register that URL in your Kick developer app settings (under "Webhook URL") so Kick can deliver real-time chat events to your local instance.
The relay URL is also available at runtime via GET /api/kick/webhook (returns { url: string | null }).