Modules@robinpath/os

@robinpath/os

0.1.1Public

System information: hostname, platform, architecture, CPU, memory, network, and more

@robinpath/os

System information: hostname, platform, architecture, CPU, memory, network, and more

Category Functions Auth License

Why use this module?

The os module lets you:

  • Get the system hostname
  • Get the OS platform (linux, darwin, win32)
  • Get the CPU architecture
  • Get CPU information
  • Get the number of CPU cores

All functions are callable directly from RobinPath scripts with a simple, consistent API.

Installation

npm install @robinpath/os

Quick Start

No credentials needed — start using it right away:

os.platform

Available Functions

FunctionDescription
os.hostnameGet the system hostname
os.platformGet the OS platform (linux, darwin, win32)
os.archGet the CPU architecture
os.cpusGet CPU information
os.cpuCountGet the number of CPU cores
os.totalMemoryGet total system memory in bytes
os.freeMemoryGet free system memory in bytes
os.uptimeGet system uptime in seconds
os.homeDirGet the user home directory
os.tempDirGet the OS temp directory
os.userInfoGet current user information
os.networkInterfacesGet network interface information
os.typeGet the OS type (Linux, Darwin, Windows_NT)
os.releaseGet the OS release version
os.eolGet the OS end-of-line marker

Examples

Get the OS platform (linux, darwin, win32)

os.platform

Get the CPU architecture

os.arch

Get CPU information

os.cpus

Integration with RobinPath

import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/os";

const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);

const result = await rp.executeScript(`
  os.platform
`);

Full API Reference

See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.

Related Modules

License

MIT

Versions (1)

VersionTagPublished
0.1.1latestyesterday
Install
$ robinpath install @robinpath/os
Version0.1.1
LicenseMIT
Unpacked Size3.9 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

Category

utilities