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

> LUA_ENVIRONINDEX を push して current executor environment table を返します。この function は arguments を取りません。exactly one value を返し、registered alias はありません。repository の call-sites は returned table を使って __siApiCache や saveinstance などの shared executor globals を読み書きします。

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

  ## 戻り値

  <ResponseField name={"environment"} type={"table"}>
    この state の LUA\_ENVIRONINDEX に現在格納されている table。
  </ResponseField>

  ## 例

  Read and write values on the current executor environment table.

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

  env.RealDocsValue = "ready"

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