Program mode
@program exposes an interactive entry point started with RUN NAME.
GTFO TERMINAL SCRIPTING
Experimental, bounded scripts and interactive terminal programs built on BetterTerminal.
STFO requires BetterTerminal. r2modman and Thunderstore install that dependency automatically. Scripts are stored here:
BepInEx/config/STFO/Scripts
STFO creates the folder when the plugin loads. Add demo.stfo, then use:
SCRIPTS
STFO CHECK DEMO
RUN DEMO
LIST MEDIPACK | STFO DEMO | QUERY
This browser simulator teaches command flow. It does not execute STFO code and cannot reproduce GTFO or IL2CPP behavior.
@stfo 1
@program main
@pipeline process_items
FUNCTION main()
name = INPUT("NAME:")
PRINT "HELLO"
PRINT name
choice = OPTION("ACTION:", ["CONTINUE", "STOP"])
OUTPUT choice
END
FUNCTION process_items(items)
ordered = SORT(items, "ID")
RETURN TAKE(ordered, 3)
END
@program exposes an interactive entry point started with RUN NAME.
@pipeline receives BetterTerminal pipeline items and returns transformed output.
Use STFO CHECK NAME before running a new or downloaded script.
Relative imports and subfolders are supported, but paths must remain inside the script workspace.
Supported structure includes variables, functions, IF/ELSE, WHILE, FOR, lists, maps, imports, PRINT, OUTPUT, RETURN, input and options.
File: BepInEx/config/STFO.cfg. Runtime commands:
STFO CONFIG
STFO CONFIG RELOAD
STFO CONFIG ENABLED ON|OFF
STFO CONFIG WRITES ON|OFF
STFO CONFIG STATS ON|OFF
STFO CONFIG UPPERCASEINPUT ON|OFF
STFO CONFIG INPUTLIMIT 1-65536
STFO CONFIG LISTLIMIT 1-1000
STFO CONFIG PROMPT TEXT
STFO CONFIG MARKER TEXT
File writes are disabled by default. Keep them disabled unless a reviewed script needs them.
STFO is a bounded interpreter, not a proven security sandbox.
Limits cover instructions, estimated memory, elapsed time, call depth, import depth, source size, collection size and string length. They reduce accidents; they cannot guarantee GTFO will never hang or crash.
Scripts run on the client with STFO installed. They are not automatically sent to or synchronized with other players. BetterTerminal works without STFO; STFO cannot load without BetterTerminal.
STFO 1.0.1 compiled without warnings or errors against BetterTerminal 1.1.1. Package layout and automated Thunderstore publication succeeded.
That does not verify every script, rundown, multiplayer setup, host migration, mod combination or long-running session. GTFO does not officially support mods and updates can change IL2CPP behavior.
Include STFO, BetterTerminal and GTFO versions; script and command with private data removed; config; installed mods; reproduction steps; expected/actual behavior; and relevant BepInEx/LogOutput.log lines.
STFO was developed with assistance from OpenAI Codex. AlexanderMakunin directed, reviewed, tested, packaged and publishes the project. AI assistance does not guarantee correctness.
I know guys that the code is made by AI (with my supervision and testing by myself) isnt the best and maybe bad but wanted do smt for help u (and myself and friends) in common things that happens to all. Ff u got any ideas, recomendation or anything just go to the github and try ask me there, ill be glad to hear your opinions and changes to it. Made with passion, time and suffering asking to codex (chatgpt) to help me build this thing for all.