---
title: "getgenv"
description: "Returns the shared Byte executor environment. Values placed here are visible to subsequent scripts in this VM."
---

```lua
getgenv(): table
```

---

## Aliases

- `getglobalenv`

---

## Arguments

This function takes no arguments.

---

## Returns

<ResponseField name="environment" type="table">
  The shared Byte executor environment table.
</ResponseField>

This is a shared table, not a copy. Teleport/reinitialization creates a new environment.

---

## Example

```lua
getgenv().ByteExample = {enabled = true}
print(getgenv().ByteExample.enabled)
```
