node-machine-id

Cross-platform unique machine ID discovery for Node.js, no admin rights required

Library
npm
v1.1.12
629stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
37/100Needs Attention
Development Activity0
Maintenance0
Community60
Maturity60
Momentum28

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
61/100Good
Architecture60
Code Quality55
Innovation45
Learning Curve85

node-machine-id is a small Node.js library that returns a unique, hardware-independent identifier for the machine it runs on, reading the OS’s own native UUID rather than deriving one from hardware components that can change. On Windows it reads the MachineGuid registry key, on macOS it reads IOPlatformUUID from the I/O Kit registry, and on Linux it reads /var/lib/dbus/machine-id (or /etc/machine-id), all without requiring elevated privileges or native bindings.

The returned ID stays stable across reboots and most OS updates, which makes it useful for software licensing, trial-period enforcement, installation tracking, and per-device analytics in both Node.js and Electron/NW.js desktop applications.

What You Get

  • A cross-platform (Windows, macOS, Linux, FreeBSD) unique machine identifier with no native bindings or compiled addons
  • Both async (machineId) and sync (machineIdSync) APIs
  • An option to return the raw platform UUID or a SHA-256 hash of it (original vs. default)
  • No elevated/admin rights required to read the identifier on any supported platform

Common Use Cases

  • Enforcing software license or trial-period restrictions tied to a specific machine
  • Tagging installation/analytics events with a stable per-device ID instead of a random one generated at first run
  • Generating a per-device key for Electron or NW.js desktop apps that need to identify “this computer” without hardware fingerprinting

Under The Hood

Architecture - The entire library is a single module (index.js) built around a lookup table of shell commands keyed by process.platformioreg on darwin, REG.exe QUERY on win32 (with a mixed/native architecture check for 32-bit Node on 64-bit Windows), reading /var/lib/dbus/machine-id or /etc/machine-id on linux, and kenv/sysctl on freebsd. Both machineId (via Node’s exec) and machineIdSync (via execSync) run the matching command, then an expose() function parses the platform-specific output format down to a bare lowercase UUID string.

Tech Stack - Written in Flow-annotated ES2015+ JavaScript, transpiled with Babel and bundled with Webpack 1.x for the published dist/index.js. It has zero runtime dependencies — it relies entirely on Node’s built-in child_process and crypto modules plus whatever OS command is available on the host (ioreg, REG.exe, cat, kenv/sysctl).

Code Quality - The implementation is compact (under 90 lines) with a small Mocha test suite in tests/index.js covering both the sync and async paths. There’s no input validation beyond what the shelled-out commands naturally provide, and error handling for the async path is a single rejected promise wrapping the command’s stderr/stack.

API Design - The API is about as minimal as it gets: two functions, one boolean argument (original) controlling whether the ID is returned raw or hashed. There’s no configuration object, no classes, and adoption is a single import {machineId} from 'node-machine-id' — trivial to use, though the coarse error surface (one generic Error per platform-command failure) limits diagnosability across the different OS command failure modes.

Used by 9 apps in this directory

TypeScript
84%
MIT

Amical

Note Taking · AI Assistants

1,495

Local-first AI dictation that understands your active app — private, offline, and built for speed.

View details
79
Repo Health
82
Technical
67
Dependency
Built with
TypeScript84%
Updated 3 weeks ago
TypeScript
97%
Apache 2.0

Cline

AI Code Assistants

66,453

An open-source AI coding agent that lives in your editor and terminal — reads and edits your codebase, runs commands, browses the web, and requires human approval for every action by default.

View details
90
Repo Health
74
Technical
67
Dependency
Built with
TypeScript97%
Updated today
TypeScript
98%
Apache 2.0

Codebuff

AI Code Assistants

9,981

An open-source AI coding assistant that coordinates specialized agents to edit your codebase from natural language — including Freebuff, a free, ad-supported version powered entirely by open-source models like DeepSeek and Kimi.

View details
84
Repo Health
71
Technical
68
Dependency
Built with
TypeScript98%
Updated today
TypeScript
84%
Apache 2.0

Continue

Developer Tools · AI Development · AI Code Assistants

35,532

Open-source coding agent for VS Code, JetBrains, and CLI with support for 30+ LLM providers.

View details
87
Repo Health
88
Technical
65
Dependency
Built with
TypeScript84%
Updated today
TypeScript
80%
Other

Directus

CMS · Low Code Platforms

37,462

Connect any SQL database and get instant REST and GraphQL APIs, a visual management Studio, and a native MCP server for AI agents — free for most organizations.

View details
93
Repo Health
82
Technical
78
Dependency
Built with
TypeScript80%
Vue18%
Updated yesterday
TypeScript
99%
Other

LobeHub

AI Assistants · Productivity · Automation

81,816

Your Chief Agent Operator — build, schedule, and collaborate with an entire AI team in one self-hostable workspace.

View details
92
Repo Health
81
Technical
72
Dependency
Built with
TypeScript99%
Updated today
TypeScript
95%
MIT

OmniRoute

AI Agents

50,700

A free, open-source AI gateway connecting Claude Code, Codex, Cursor, Cline, and Copilot to 237 AI providers (90+ free) through one endpoint, with automatic fallback and token-compression to stretch free-tier limits further.

View details
86
Repo Health
70
Technical
75
Dependency
Built with
TypeScript95%
Updated today
TypeScript
87%
Other

strapi

CMS

72,965

Open-source headless CMS that auto-generates REST and GraphQL APIs from your content models, with a fully customizable admin panel you control.

View details
93
Repo Health
84
Technical
68
Dependency
Built with
TypeScript87%
JavaScript12%
Updated yesterday
Python
69%
Apache 2.0

SurfSense

Search · AI Assistants

15,960

The open-source, unlimited NotebookLM alternative with real-time collaboration, a desktop app, and no vendor lock-in.

View details
88
Repo Health
71
Technical
66
Dependency
Built with
Python69%
TypeScript28%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search