> ## 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

> Devuelve la current executor environment table haciendo push de LUA_ENVIRONINDEX. La function no toma arguments, devuelve exactly one value y no tiene registered alias. Los call-sites del repository usan la returned table para leer y escribir shared executor globals como __siApiCache y saveinstance.

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

  ## Retornos

  <ResponseField name={"environment"} type={"table"}>
    La table almacenada actualmente en LUA\_ENVIRONINDEX para este state.
  </ResponseField>

  ## Ejemplo

  Read and write values on the current executor environment table.

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

  env.RealDocsValue = "ready"

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