Skip to content
ForgeCastDocs

Lua API reference

Every function, argument and type a ForgeCast plugin can use.

This reference is written from the same file your editor reads (forgecast.d.lua), so it is always the API of the app you downloaded. The same text appears in the app under Plugins → SDK & reference.

Functions that need a permission show it as a badge; list it in your plugin.json.

PageWhat is in itFunctions
ChatRead chat, listen for it, and filter it before anyone sees it.8
StreamsThe streams being watched: viewers, likes and when they start and end.4
Notifications and dialogsPop-up notifications, messages, questions and your own dialogs.7
Interface elementsThe building blocks of every window, Dashboard section, settings panel and dialog.23
WindowsOpen windows of your own.8
Dashboard sectionsAdd your own box to the Dashboard.4
The plugin itselfIts settings panel and what to do when it is turned off.3
Storage, timers and dataKeep data, run things later, write to the console, read and write JSON.18
Talking to ForgeCastSounds, alerts, the app's version, links, and messages between plugins.7
OverlaysPut your plugin's own values (a timer, a score, a queue) into the streamer's overlays.20
OBSSee OBS's scenes and audio, switch scenes, mute inputs, show or hide sources, and hear what changes.19
AIAsk ForgeCast's AI, paid with the streamer's credits.7
Past streamsThe streams recorded on this PC and the week's numbers.5
Chat commands and toolsChat commands with cooldowns and roles, rate limits, waiting for a viewer's answer, emotes.12
Counters, queues, countdowns, leaderboardsReady-made pieces that save themselves, draw their own Dashboard controls and fill your overlays.35
Data toolsTables in storage, CSV, hashes and signatures, QR codes, redacting private details, time and schedules.28
Plugin toolsKeeping state through reloads, updates, optional permissions, secrets, settings, calls between plugins, libraries, assets, translations, metrics and tests.23
Speech, clipboard and the appSpeak out loud, copy text, add a page, Ctrl+K commands, chat menu items, name badges, charts, tabs and pickers.25
More interface elementsGrids, stats, timers, markdown, menus, kanban boards, ratings and the other building blocks for rich pages.41
Money, events, goals, channelAmounts in the streamer's currency, the app's events, goals shared with overlays, and the channel's videos and schedule.15
YouTubeChat as the channel, run polls, moderate the live chat, change the stream's title and read how the stream is doing.13
Hotkeys, buttons, lightsGlobal hotkeys, buttons on the phone remote and the Stream Deck, smart lights, Home Assistant and MIDI controllers.18
The microphoneVoice commands and live captions, with Windows' own speech recognition.4
Tips, services, DiscordTips from Ko-fi, Streamlabs and StreamElements, the streamer's Spotify and Google, and their Discord server.8
Channel points and viewersOne points wallet for the channel, redeems, predictions, and the viewers who keep coming back.24
Your PCThe PC's numbers, battery and temperature, whether you are away, the game you play and the music that is playing.16
InternetCall websites and APIs over https.3
HelpersSmall functions for text, lists and time.12

Downloads

  • forgecast.d.lua: the whole API, annotated for the Lua language server. ForgeCast writes it into every plugin's .forgecast/ folder for you.
  • plugin.schema.json: a JSON schema for plugin.json, for completion and validation in VS Code.

On this page