@imsudip/device-info
v0.0.6
Published
A lightweight utility library to fetch device, browser, OS, GPU, battery, network, and screen information for modern web and React applications.
Maintainers
Readme
@imsudip/device-info
A lightweight, cross-environment utility library to retrieve OS, CPU, Memory, and GPU information.
Supports Node.js (via native os module) and Browser (via feature detection + WebGL).
Perfect for system dashboards, diagnostics tools, developer utilities, CLI apps, Electron, and performance analytics.
✨ Features
✅ Node.js OS Information
Powered by Node's built-in os module:
- Architecture (
arch) - Platform (
platform) - Release (
release) - Type (
type) - Version (
version) - CPUs (
cpus) - Total Memory (
totalmem) - Free Memory (
freemem) - Uptime (
uptime) - Hostname (
hostname) - Home Directory (
homedir) - Temporary Directory (
tmpdir) - Endianness (
endianness) - Network Interfaces (
networkInterfaces) - Load Average (
loadavg)
🧩 Flexible Imports
Import exactly the values you need:
import { GPU, OS } from "@imsudip/device-info";
📦 Installation
npm install @imsudip/device-infoyarn add @imsudip/device-info🔧 Usage
import {
OS,
GPU
} from "@imsudip/device-info";
console.log(Hello({ name: "Sudip" }));
console.log("Architecture:", OS.Arch());
console.log("Platform:", OS.Platform());
console.log("CPUs:", OS.CPUs());
console.log("Total Memory:", OS.TotalMem());
console.log("GPU Info:", GPU.getInfo());📜 License
MIT © Sudip Mahata
⭐ Contributing
Pull requests are welcome! If you want new features (battery, network, sensors, etc.), feel free to open an issue.
🙌 Credits
- Created by Sudip Mahata
