GTFO TERMINAL SCRIPTING

STFO

Experimental, bounded scripts and interactive terminal programs built on BetterTerminal.

Quick start

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

Practice terminal

This browser simulator teaches command flow. It does not execute STFO code and cannot reproduce GTFO or IL2CPP behavior.

Language

@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 mode

@program exposes an interactive entry point started with RUN NAME.

Pipeline mode

@pipeline receives BetterTerminal pipeline items and returns transformed output.

Checks first

Use STFO CHECK NAME before running a new or downloaded script.

Imports

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.

Configuration

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.

Security and reliability limits

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.

Client and multiplayer behavior

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.

Verified and unverified

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.

Reporting problems

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.

Open a GitHub issue · Source code

Development disclosure

STFO was developed with assistance from OpenAI Codex. AlexanderMakunin directed, reviewed, tested, packaged and publishes the project. AI assistance does not guarantee correctness.

Original author note
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.