Documentation
ModdingTerminal

Environments

Variables, command chaining, and the result key

Environment variables are per terminal instance (Dictionary<string, object>).

API

T GetEnvironment<T>(string key, T defaultValue = default);
void SetEnvironment(string key, object value);  // null removes
object GetResult();   // sugar for GetEnvironment<object>("result")
void SetResult(object result);

Keys are case-insensitive (TO_UPPER_INVARIANT).

$VAR Substitution

$VARIABLE references in input are replaced before execution:

> set NAME World
> echo Hello $NAME   → "Hello World"

Uses .ToString() on the value. Missing vars left as literal $NAME.

result

Every command sets result — the implicit return value:

Commandresult type
config getJToken
curl urlstring
mods listIMod[]
settings listList<IHandler>
set KEY valstring

Command Chaining

> curl https://api.example.com/user
{ "name": "Alice" }
> echo $result
{ "name": "Alice" }
> set DATA $result

Toggles the [Executing: ...] prefix. Default true.

> set print_executing false
> echo hello
hello         (no prefix)

On this page