get-system-info
v1.0.2
Published
Zero-dependency enterprise-grade cross-platform system information CLI and library (Windows, macOS, Linux, BSD).
Maintainers
Readme
get-system-info (gsi)
Enterprise-grade, zero-dependency, cross-platform system information CLI and Node.js module. Provides in-depth hardware, BIOS/firmware, CPU cache, memory, GPU adapters, storage, and network statistics across Windows, macOS, Linux, and BSD.
Key Capabilities
- Zero External Dependencies: Pure native Node.js core modules (
os,fs,child_process). Runs instantly without bloat or security audit vulnerabilities. - Deep Windows Telemetry (
msinfo32equivalent): Motherboard manufacturer, model, revision, BIOS vendor, version, release date, Windows build and edition, registered owner, timezone, system directories, GPU controllers, and power/battery status. - Deep macOS Telemetry (
system_profiler/sysctlequivalent): Apple model identifier, macOS build and version, CPU vendor and cache sizes (L2/L3), GPU chipsets and VRAM, System Integrity Protection (SIP) status, serial number, hardware UUID, and battery health viapmset. - Deep Linux Telemetry (
/proc&/sys/class/dmi/idequivalent): Distribution name and codename, kernel release, motherboard vendor/name, chassis type, physical core count, swap memory, GPU detection (lspci), and battery capacity via sysfs power supply. - Multiple Output Formats:
- Stylized human-readable CLI table
- Full structured JSON (
--json) - Compressed / Minified JSON (
--compact) for low-overhead logging and telemetry pipelines - File exports (
--output report.json/report.txt)
Runtime Support
get-system-info is engineered to be 100% runtime-agnostic and runs seamlessly on:
- Node.js (v14+)
- Bun (v1.0+)
- Deno (v1.30+ using
node:standard compat or direct npm specifiernpm:get-system-info) - Electron (Main process)
Running on Bun
bunx get-system-info
# or locally
bun run bin/cli.jsRunning on Deno
deno run --allow-all npm:get-system-infoInstallation
Run without installing (using npx):
npx get-system-infoInstall globally:
npm install -g get-system-infoInstall locally as a project dependency:
npm install get-system-infoCLI Usage
Usage:
get-system-info [options]
gsi [options]
Options:
-s, --summary Human-readable summary table (default)
-j, --json Output full raw system info as JSON
-c, --compact Compress/minify JSON output for network pipelines
-w, --msinfo Show enterprise platform details
-o, --output <file> Export report to file (.json or .txt format)
-h, --help Show help message
-v, --version Show package versionExamples
# Display full system summary table
gsi
# Output full JSON
gsi --json
# Output compressed JSON (for curl, pipelines, or telemetry)
gsi --json --compact
# Save report to text or JSON file
gsi --output system-report.txt
gsi --json --output system-report.jsonProgrammatic API
const {
getSystemInfo,
getCpuInfo,
getMemoryInfo,
getDiskInfo,
getNetworkInfo
} = require('get-system-info');
const info = getSystemInfo();
console.log(info.system.osName);
console.log(info.hardware.processor.model);
console.log(info.hardware.graphics);
console.log(info.hardware.memory.totalFormatted);
console.log(info.storage);Publishing to npm
- Log in to npm:
npm login - Publish the package:
npm publish --access public
(Note: If the name get-system-info is already claimed on npm registry, rename "name" in package.json to @your-username/get-system-info).
License
MIT © Nikhil
