> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# getgenv

> Returns the current executor environment table by pushing LUA_ENVIRONINDEX. The function takes no arguments, returns exactly one value, and has no registered alias. Repository call-sites use the returned table to read and write shared executor globals such as __siApiCache and saveinstance.

<div className="real-function-page">
  ```lua theme={null}
  getgenv(): table
  ```

  ## Returns

  <ResponseField name={"environment"} type={"table"}>
    The table currently stored at LUA\_ENVIRONINDEX for this state.
  </ResponseField>

  ## Example

  Read and write values on the current executor environment table.

  ```lua theme={null}
  local env = getgenv()

  env.RealDocsValue = "ready"

  print(getgenv().RealDocsValue)
  ```
</div>
