{
  "classes": [
    {
      "constants": [],
      "types": [
        {
          "lua_type": "type SpawnOptions = {\n    cwd: string?,\n    env: { [string]: string }?,\n    shell: boolean?,\n}",
          "name": "SpawnOptions",
          "tags": [],
          "source": {
            "path": "",
            "line": 1
          },
          "fields": [
            {
              "lua_type": "cwd: string?",
              "name": "cwd",
              "desc": "Specify the directory for the child process"
            },
            {
              "lua_type": "env: { [string]: string }?",
              "name": "env",
              "desc": "Specify additional environment variables for the child process"
            },
            {
              "lua_type": "shell: boolean?",
              "name": "shell",
              "desc": "Run this as a shell command\n:::warning\n    This passes the provided command and arguments directly to `cmd.exe /C`\n"
            }
          ],
          "desc": ""
        },
        {
          "lua_type": "type ExecResult = {\n    stdout: string,\n    stderr: string,\n    code: number,\n}",
          "name": "ExecResult",
          "tags": [],
          "source": {
            "path": "",
            "line": 14
          },
          "fields": [
            {
              "lua_type": "stdout: string",
              "name": "stdout",
              "desc": ""
            },
            {
              "lua_type": "stderr: string",
              "name": "stderr",
              "desc": ""
            },
            {
              "lua_type": "code: number",
              "name": "code",
              "desc": ""
            }
          ],
          "desc": ""
        },
        {
          "lua_type": "type Platform = \"windows\"\n    | \"macos\"\n    | \"linux\"\n    | nil",
          "name": "Platform",
          "tags": [],
          "source": {
            "path": "",
            "line": 45
          },
          "fields": [],
          "desc": ""
        },
        {
          "lua_type": "type Arch = \"x64\"\n    | \"arm64\"\n    | \"arm\"\n    | \"x86\"\n    | nil",
          "name": "Arch",
          "tags": [],
          "source": {
            "path": "",
            "line": 46
          },
          "fields": [],
          "desc": ""
        }
      ],
      "name": "@eryx/os",
      "tags": [],
      "functions": [
        {
          "source": {
            "path": "",
            "line": 54
          },
          "is_method": false,
          "signature": "os.getenv(\n    key: string  -- string Environment variable to get \n) → string?",
          "owner": "os",
          "desc": "Get a specific environment variable",
          "tags": [],
          "name": "getenv",
          "return_str": "string?",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "string?",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "key",
              "desc": "string Environment variable to get "
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 63
          },
          "is_method": false,
          "signature": "os.setenv(\n    key: string,  -- string Environment variable to set\n    value: string?  -- string? Value to set, or nil to unset \n) → ()",
          "owner": "os",
          "desc": "Set or unset a specific environment variable",
          "tags": [],
          "name": "setenv",
          "return_str": "",
          "function_type": "Function",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "key",
              "desc": "string Environment variable to set"
            },
            {
              "lua_type": "string?",
              "name": "value",
              "desc": "string? Value to set, or nil to unset "
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 66
          },
          "is_method": false,
          "signature": "os.environ() → { [string]: string }",
          "owner": "os",
          "desc": "Get all currently defined environment variables",
          "tags": [],
          "name": "environ",
          "return_str": "{ [string]: string }",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "{ [string]: string }",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 80
          },
          "is_method": false,
          "signature": "os.luauVersion() → { release: string, hash: string }",
          "owner": "os",
          "desc": "Get the git hash of Luau\n\nThere are no official \"proper\" version numbers for Luau, so the values here are derived from git.\n\nThe hash is the most reliable value, and indicates the exact version of Luau compiled against\n\nThe release is based on most recent tag, and typically follows the format `0.xxx`, but can include\nadditional information if the tagged commit is not the most recent\n",
          "tags": [],
          "name": "luauVersion",
          "return_str": "{ release: string, hash: string }",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "{ release: string, hash: string }",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 85
          },
          "is_method": false,
          "signature": "os.platform() → Platform",
          "owner": "os",
          "desc": "Get the current system platform",
          "tags": [],
          "name": "platform",
          "return_str": "Platform",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "Platform",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 90
          },
          "is_method": false,
          "signature": "os.arch() → Arch",
          "owner": "os",
          "desc": "Get the current system arch",
          "tags": [],
          "name": "arch",
          "return_str": "Arch",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "Arch",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 95
          },
          "is_method": false,
          "signature": "os.hostname() → string",
          "owner": "os",
          "desc": "Get the current system hostname",
          "tags": [],
          "name": "hostname",
          "return_str": "string",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "string",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 100
          },
          "is_method": false,
          "signature": "os.tmpdir() → string",
          "owner": "os",
          "desc": "Get the current user's temporary directory",
          "tags": [],
          "name": "tmpdir",
          "return_str": "string",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "string",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 105
          },
          "is_method": false,
          "signature": "os.homedir() → string",
          "owner": "os",
          "desc": "Get the current user's home directory",
          "tags": [],
          "name": "homedir",
          "return_str": "string",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "string",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 110
          },
          "is_method": false,
          "signature": "os.cpucount() → number",
          "owner": "os",
          "desc": "Get the number of CPUs present",
          "tags": [],
          "name": "cpucount",
          "return_str": "number",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "number",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 115
          },
          "is_method": false,
          "signature": "os.totalmem() → number",
          "owner": "os",
          "desc": "Get the total system memory in KiB",
          "tags": [],
          "name": "totalmem",
          "return_str": "number",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "number",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 120
          },
          "is_method": false,
          "signature": "os.freemem() → number",
          "owner": "os",
          "desc": "Get the free system memory in KiB",
          "tags": [],
          "name": "freemem",
          "return_str": "number",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "number",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 125
          },
          "is_method": false,
          "signature": "os.uptime() → number",
          "owner": "os",
          "desc": "Get the system uptime in seconds",
          "tags": [],
          "name": "uptime",
          "return_str": "number",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "number",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 130
          },
          "is_method": false,
          "signature": "os.pid() → number",
          "owner": "os",
          "desc": "Get the current process PID",
          "tags": [],
          "name": "pid",
          "return_str": "number",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "number",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 138
          },
          "is_method": false,
          "signature": "os.exit(\n    code: number?  -- number? Process exit code \n) → ()",
          "owner": "os",
          "desc": "Exit the process with a specific status code",
          "tags": [],
          "name": "exit",
          "return_str": "",
          "function_type": "Function",
          "returns": [],
          "params": [
            {
              "lua_type": "number?",
              "name": "code",
              "desc": "number? Process exit code "
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 141
          },
          "is_method": false,
          "signature": "os.clock() → number",
          "owner": "os",
          "desc": "Get the current time of the system clock",
          "tags": [],
          "name": "clock",
          "return_str": "number",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "number",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 146
          },
          "is_method": false,
          "signature": "os.cwd() → string",
          "owner": "os",
          "desc": "Get the current working directory",
          "tags": [],
          "name": "cwd",
          "return_str": "string",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "string",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 154
          },
          "is_method": false,
          "signature": "os.chdir(\n    path: string  -- string New directory \n) → ()",
          "owner": "os",
          "desc": "Change the current working directory",
          "tags": [],
          "name": "chdir",
          "return_str": "",
          "function_type": "Function",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "path",
              "desc": "string New directory "
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 164
          },
          "is_method": false,
          "signature": "os.cliargs() → { string }",
          "owner": "os",
          "desc": "Get the command line arguments for this script.\n\nReturns only the user-supplied arguments; the executable name, subcommand,\nand script path are automatically stripped.\n\nFor example, `eryx run foo.luau --verbose bar` returns `{\"--verbose\", \"bar\"}`.\n",
          "tags": [],
          "name": "cliargs",
          "return_str": "{ string }",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "{ string }",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 180
          },
          "is_method": false,
          "signature": "os.exec(\n    cmd: string,  -- string The process to spawn. Can be either a complete path, or a name to be resolve on the PATH\n    args: { string },  -- SpawnOptions? Optional addition configuration \n    opts: SpawnOptions?\n) → ExecResult",
          "owner": "os",
          "desc": "Execute a child process and wait for it to complete.\n\nThis function is equivalent to using:\n```luau\nos.spawn(...):wait()\n```\n",
          "tags": [],
          "name": "exec",
          "return_str": "ExecResult",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "ExecResult",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "cmd",
              "desc": "string The process to spawn. Can be either a complete path, or a name to be resolve on the PATH"
            },
            {
              "lua_type": "{ string }",
              "name": "args",
              "desc": "SpawnOptions? Optional addition configuration "
            },
            {
              "lua_type": "SpawnOptions?",
              "name": "opts",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 190
          },
          "is_method": false,
          "signature": "os.spawn(\n    cmd: string,  -- string The process to spawn. Can be either a complete path, or a name to be resolve on the PATH\n    args: { string },  -- SpawnOptions? Optional addition configuration \n    opts: SpawnOptions?\n) → ProcessHandle",
          "owner": "os",
          "desc": "Spawn a process, returning an interactive handle to it",
          "tags": [],
          "name": "spawn",
          "return_str": "ProcessHandle",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "ProcessHandle",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "cmd",
              "desc": "string The process to spawn. Can be either a complete path, or a name to be resolve on the PATH"
            },
            {
              "lua_type": "{ string }",
              "name": "args",
              "desc": "SpawnOptions? Optional addition configuration "
            },
            {
              "lua_type": "SpawnOptions?",
              "name": "opts",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 208
          },
          "is_method": false,
          "signature": "os.shell(\n    cmd: string,  -- string  The command to run\n    opts: SpawnOptions?  -- SpawnOptions? Optional addition configuration\n) → (\n      -- number The process' status code after completion \n)",
          "owner": "os",
          "desc": "Run a command as if it was run on the shell.\nThis is similar to setting `shell=true` in [[SpawnOptions]], but does not\nattempt to capture input or output from the process.\n\n`SpawnOptions.shell` is ignored when calling this function.\n\n:::warning\n    This function passes the provided argument directly to `cmd.exe /C`\n",
          "tags": [],
          "name": "shell",
          "return_str": "number",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "number",
              "desc": "number The process' status code after completion "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "cmd",
              "desc": "string  The command to run"
            },
            {
              "lua_type": "SpawnOptions?",
              "name": "opts",
              "desc": "SpawnOptions? Optional addition configuration"
            }
          ]
        }
      ],
      "properties": [],
      "source": {
        "path": "",
        "line": 0
      },
      "desc": ""
    },
    {
      "is_primary_export": false,
      "source": {
        "path": "",
        "line": 20
      },
      "tags": [],
      "properties": [
        {
          "tags": [],
          "lua_type": "pid: number",
          "name": "pid",
          "desc": "Process ID"
        },
        {
          "tags": [],
          "lua_type": "status: number?",
          "name": "status",
          "desc": "Process return code, if it's exited"
        }
      ],
      "desc": "",
      "name": "ProcessHandle",
      "functions": [
        {
          "source": {
            "path": "",
            "line": 26
          },
          "is_method": true,
          "signature": "ProcessHandle:wait() → ExecResult",
          "desc": "Wait for the process to complete",
          "tags": [],
          "name": "wait",
          "return_str": "ExecResult",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "ExecResult",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 31
          },
          "is_method": true,
          "signature": "ProcessHandle:kill(\n    signal: number?  -- Optional signal to raise in process \n) → ()",
          "desc": "Kill the process",
          "tags": [],
          "name": "kill",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "number?",
              "name": "signal",
              "desc": "Optional signal to raise in process "
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 36
          },
          "is_method": true,
          "signature": "ProcessHandle:write(\n    data: string  -- Data to write \n) → ()",
          "desc": "Write data to the process' stdin",
          "tags": [],
          "name": "write",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "data",
              "desc": "Data to write "
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 38
          },
          "is_method": true,
          "signature": "ProcessHandle:closeStdin() → ()",
          "desc": "Close the connecting to the process' stdin",
          "tags": [],
          "name": "closeStdin",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 40
          },
          "is_method": true,
          "signature": "ProcessHandle:readStdout() → string?",
          "desc": "Read any data available on stdout",
          "tags": [],
          "name": "readStdout",
          "return_str": "string?",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "string?",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 42
          },
          "is_method": true,
          "signature": "ProcessHandle:readStderr() → string?",
          "desc": "Read any data available on stderr",
          "tags": [],
          "name": "readStderr",
          "return_str": "string?",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "string?",
              "desc": ""
            }
          ],
          "params": []
        }
      ],
      "metamethods": [],
      "types": []
    }
  ]
}