# Module /os

Host operating system, CPU architecture, hostname, and environment introspection.

```tangu
(use /os)
```

## Functions & symbols

### arch

`(os/arch) -> String`

Returns the CPU architecture (e.g. "x86_64", "aarch64").

```tangu
(let target-arch (os/arch))
```

### cpu-count

`(os/cpu-count) -> Int`

Returns the number of logical CPU cores available to the current process.

```tangu
(let concurrency (os/cpu-count))
```

### family

`(os/family) -> String`

Returns the operating system family (e.g. "unix", "windows").

```tangu
(if (= (os/family) "unix") (writeln "POSIX compliant"))
```

### home-dir

`(os/home-dir) -> (Or String ())`

Returns the current user's home directory path, or () if not found.

```tangu
(let home (os/home-dir))
```

### host-name

`(os/host-name) -> String`

Returns the network hostname of the host system.

```tangu
(let host (os/host-name))
```

### os-name

`(os/os-name) -> String`

Returns the operating system name (e.g. "linux", "macos", "windows").

```tangu
(let os (os/os-name))
```

### temp-dir

`(os/temp-dir) -> String`

Returns the default directory path for temporary files.

```tangu
(let tmp (os/temp-dir))
```

### uptime

`(os/uptime) -> Float`

Returns system uptime in seconds as a floating-point number.

```tangu
(let secs (os/uptime))
```
