Small helpers under geode.utils are documented here. Larger ones have their own page.
For signatures, use editor autocomplete from type stubs.
Wide integer types appear as string in the stub (see type stubs for the rule).
| Module | Page | Role |
|---|---|---|
geode.utils.web |
web | Async HTTP requests |
geode.utils.base64 |
base64 | Base64 encode and decode |
geode.utils.permission |
permission | OS permission checks |
geode.utils.game |
game | Exit, restart, uninstaller |
Related top-level helpers outside this prefix:
- json as
geode.json - VersionInfo as
geode.VersionInfo
These functions sit directly on geode.utils, not in a child table.
| Function | Role |
|---|---|
formatSystemError |
Turn a system error code into text |
getDisplayFactor |
Ratio of physical pixels to logical pixels on one axis |
getEnvironmentVariable |
Read a process environment variable by name. Not available on iOS |
getInputTimestamp |
Latest input timestamp in seconds |
getSafeAreaRect |
Safe area rectangle relative to the window size |
| Function | Role |
|---|---|
getString |
Human-readable platform label for crash logs and compatibility checks |
isWine |
Whether the Windows build runs under Wine. Always false on other platforms |
Read or set the current thread name for debugging and logging.
| Function | Role |
|---|---|
getDefaultName |
Default thread name |
getName |
Current name, or the default when no custom name was set |
setName |
Assign a custom name |
geode.utils.clipboard reads and writes the system clipboard as plain text.
Use it for paste into a text field or copy a result for the user.
| Function | Role |
|---|---|
read |
Current clipboard text. Empty string when empty or read fails |
write |
Copy text to the clipboard. Returns success as a boolean |
local clip = geode.utils.clipboard
local paste = clip.read()
if paste ~= "" then
print("clipboard:", paste)
end
clip.write("copied from Luau")geode.utils.random generates random strings and UUIDs from Geode's PRNG.
These are not cryptographically secure OS random bytes unless Geode says otherwise elsewhere.
Length arguments use the wide-integer binding rule. The stub types them as string.
At runtime you must pass a decimal integer string such as "16", not a bare number.
| Function | Role |
|---|---|
generateUUID |
Random UUID v4 string |
generateHexString |
Random lowercase hex string with the given length |
generateAlphanumericString |
Random string using [0-9A-Za-z] |
generateString |
Random string from a custom alphabet. alphabet must not be empty |
choice |
Random value from a dense, one-based array |
local rand = geode.utils.random
local id = rand.generateUUID()
print(id)
local token = rand.generateHexString("16")
print(token)
local direction = rand.choice({ "left", "right" })
print(direction)choice ignores non-array fields. It errors when the array is empty or has holes.
geode.utils.string holds small string helpers from Geode.
They do not replace Luau's built-in string library.
| Function | Role |
|---|---|
trim, trimLeft, trimRight |
Remove whitespace or a custom character set from ends |
toLower, toUpper |
Case-changed copy |
contains, startsWith, endsWith |
Substring tests |
replace |
Swap every occurrence of one substring for another |
remove |
Delete every occurrence of a substring |
filter |
Keep only characters in a given set |
normalize |
Collapse repeated spaces per Geode rules |
count |
Count byte occurrences. Pass c as a byte value such as string.byte("e"). Result is a decimal integer string |
local str = geode.utils.string
local id = str.trim(" hello ")
print(str.startsWith(id, "hel")) -- true
print(str.replace(id, "hello", "world")) -- world
print(str.count("hello", string.byte("l"))) -- "2"src/bindings/geode/GeodeSmallBindings.cppsrc/bindings/geode/web/GeodeWebCore.cpptools/luau_codegen/extra_bindings/web.dluautools/luau_codegen/model/free_fn_sources.pytools/luau_codegen/emit/luau_types/manual_fields.pybuild/luauapi-gen/src/types/geode.d.luau