pidms-cli 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ActvKey Open Source Team (https://actvkey.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,70 @@
1
- # Temporary Holding Version
1
+ # PIDMS 🔑 - Microsoft Product Key & License Channel Inspector
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [![npm version](https://img.shields.io/npm/v/pidms.svg)](https://www.npmjs.com/package/pidms)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
5
+ [![Gateway](https://img.shields.io/badge/Gateway-CIDPortal.win-blueviolet.svg)](https://cidportal.win)
6
+ [![Maintained by](https://img.shields.io/badge/Maintained%20by-ActvKey%20Open%20Source-16a34a.svg)](https://actvkey.com)
7
+
8
+ A fast, lightweight, zero-dependency Node.js CLI & SDK to inspect Microsoft Windows and Office product keys, identify license channels (Retail vs OEM vs Volume:MAK), and verify activation validity.
9
+
10
+ Powered by the **CID Portal Gateway** ([https://cidportal.win](https://cidportal.win)) and maintained by the **ActvKey Open Source Team** ([https://actvkey.com](https://actvkey.com)).
11
+
12
+ ---
13
+
14
+ ## ⚡ Quick Start (Zero Install)
15
+
16
+ Run instantly in your terminal:
17
+
18
+ ```bash
19
+ npx pidms <PRODUCT-KEY>
20
+ ```
21
+
22
+ Or install globally:
23
+
24
+ ```bash
25
+ npm install -g pidms
26
+ pidms <PRODUCT-KEY>
27
+ ```
28
+
29
+ ### Example:
30
+ ```bash
31
+ npx pidms W269N-WFGWX-YVC9B-4J6C9-T83GX
32
+ ```
33
+
34
+ ---
35
+
36
+ ## 💻 Programmatic Usage (Node.js SDK)
37
+
38
+ ```javascript
39
+ const { checkKey, sanitizeKey } = require('pidms');
40
+
41
+ async function inspect() {
42
+ const result = await checkKey('W269N-WFGWX-YVC9B-4J6C9-T83GX');
43
+ console.log(result);
44
+ }
45
+
46
+ inspect();
47
+ ```
48
+
49
+ ---
50
+
51
+ ## 🛠️ Key Features
52
+
53
+ - **Channel Identification:** Instantly differentiates between **Retail**, **OEM:DM**, **Volume:MAK**, and **Volume:GVLK**.
54
+ - **Edition Recognition:** Resolves Windows 11, Windows 10, Windows Server 2025/2022, Office 2024, 2021, and 2019 editions.
55
+ - **Zero Third-Party Dependencies:** Pure native Node.js HTTPS client with minimal footprint.
56
+ - **Automated Telephone Activation (CID):** If your key requires telephone confirmation, generate Confirmation IDs in sub-2s at [https://cidportal.win](https://cidportal.win).
57
+
58
+ ---
59
+
60
+ ## 🌐 Ecosystem & Links
61
+
62
+ - **Online Activation Gateway:** [https://cidportal.win](https://cidportal.win)
63
+ - **Maintainer:** [ActvKey Systems](https://actvkey.com)
64
+ - **GitHub Repository:** [https://github.com/actvkey-bd/pidms](https://github.com/actvkey-bd/pidms)
65
+
66
+ ---
67
+
68
+ ## 📄 License
69
+
70
+ MIT License - see the LICENSE file for details.
package/bin/cli.js ADDED
@@ -0,0 +1,100 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * pidms CLI - Microsoft Product Key Inspector
5
+ *
6
+ * Powered by CID Portal (https://cidportal.win)
7
+ * Maintained by ActvKey (https://actvkey.com)
8
+ */
9
+
10
+ const { sanitizeKey, checkKey } = require('../index');
11
+
12
+ const colors = {
13
+ reset: '\x1b[0m',
14
+ bright: '\x1b[1m',
15
+ cyan: '\x1b[36m',
16
+ green: '\x1b[32m',
17
+ yellow: '\x1b[33m',
18
+ red: '\x1b[31m',
19
+ dim: '\x1b[2m'
20
+ };
21
+
22
+ function banner() {
23
+ console.log(`
24
+ ${colors.cyan}${colors.bright}=====================================================================
25
+ ____ ________ __ ________
26
+ / __ \\/ _/ __ \\/ |/ / ___/
27
+ / /_/ // // / / / /|_/ /\\__ \\
28
+ / ____// // /_/ / / / /___/ /
29
+ /_/ /___/_____/_/ /_//____/
30
+ Microsoft Product Key & License Channel Inspector | v1.0.0
31
+ Powered by CID Portal (https://cidportal.win)
32
+ =====================================================================${colors.reset}
33
+ `);
34
+ }
35
+
36
+ async function main() {
37
+ banner();
38
+ const args = process.argv.slice(2);
39
+
40
+ if (args.length === 0 || args.includes('-h') || args.includes('--help')) {
41
+ console.log(`${colors.bright}Usage:${colors.reset}`);
42
+ console.log(` npx pidms <PRODUCT-KEY>`);
43
+ console.log(` npx pid-checker <PRODUCT-KEY>`);
44
+ console.log('');
45
+ console.log(`${colors.bright}Example:${colors.reset}`);
46
+ console.log(` npx pidms W269N-WFGWX-YVC9B-4J6C9-T83GX`);
47
+ console.log('');
48
+ console.log(`${colors.dim}Online Portal & Confirmation ID (CID): https://cidportal.win${colors.reset}`);
49
+ console.log(`${colors.dim}Maintained by ActvKey Open Source: https://actvkey.com${colors.reset}`);
50
+ process.exit(0);
51
+ }
52
+
53
+ const rawKey = args[0];
54
+ const cleanKey = sanitizeKey(rawKey);
55
+
56
+ if (cleanKey.length !== 29) {
57
+ console.log(`${colors.red}[X] Invalid product key format.${colors.reset} Expected 25 alphanumeric characters.`);
58
+ process.exit(1);
59
+ }
60
+
61
+ console.log(`[*] Inspecting key: ${colors.bright}${cleanKey}${colors.reset}`);
62
+ console.log(`[*] Connecting to PIDMS validation gateway...`);
63
+
64
+ try {
65
+ const res = await checkKey(cleanKey);
66
+
67
+ if (!res || res.success === false) {
68
+ console.log(`${colors.yellow}[!] Notice:${colors.reset} ${res?.error || 'Unable to inspect key or rate limit reached.'}`);
69
+ console.log(`Visit https://cidportal.win for direct online inspection.`);
70
+ process.exit(1);
71
+ }
72
+
73
+ console.log(`\n${colors.cyan}--- Key Information ---${colors.reset}`);
74
+ if (Array.isArray(res.results) && res.results.length > 0) {
75
+ const item = res.results[0];
76
+ console.log(` Product Description : ${colors.bright}${item.product || item.description || 'Unknown'}${colors.reset}`);
77
+ console.log(` License Channel : ${colors.bright}${item.subType || item.channel || 'Standard'}${colors.reset}`);
78
+ console.log(` License Status : ${colors.green}${colors.bright}${item.status || 'Active'}${colors.reset}`);
79
+ if (item.makCount !== undefined) {
80
+ console.log(` Remaining MAK Count : ${colors.yellow}${item.makCount}${colors.reset}`);
81
+ }
82
+ } else {
83
+ console.log(` Status : ${colors.green}${colors.bright}Processed successfully${colors.reset}`);
84
+ console.log(` Details : ${JSON.stringify(res, null, 2)}`);
85
+ }
86
+
87
+ console.log(`
88
+ ${colors.cyan}=====================================================================
89
+ Need instant Confirmation ID (CID) for telephone activation?
90
+ Visit: https://cidportal.win
91
+ Developed & Maintained by ActvKey Open Source: https://actvkey.com
92
+ =====================================================================${colors.reset}
93
+ `);
94
+ } catch (err) {
95
+ console.log(`${colors.red}[X] Error connecting to gateway:${colors.reset} ${err.message}`);
96
+ process.exit(1);
97
+ }
98
+ }
99
+
100
+ main();
package/index.js ADDED
@@ -0,0 +1,76 @@
1
+ /**
2
+ * pidms - Microsoft Product Key Inspector SDK
3
+ *
4
+ * Maintained by ActvKey (https://actvkey.com)
5
+ * Powered by CID Portal (https://cidportal.win)
6
+ * License: MIT
7
+ */
8
+
9
+ const https = require('https');
10
+
11
+ function sanitizeKey(rawKey) {
12
+ if (!rawKey || typeof rawKey !== 'string') return '';
13
+ const clean = rawKey.replace(/[^A-Za-z0-9]/g, '').toUpperCase();
14
+ if (clean.length === 25) {
15
+ return `${clean.slice(0, 5)}-${clean.slice(5, 10)}-${clean.slice(10, 15)}-${clean.slice(15, 20)}-${clean.slice(20, 25)}`;
16
+ }
17
+ return clean;
18
+ }
19
+
20
+ function checkKeys(keysArray) {
21
+ return new Promise((resolve, reject) => {
22
+ if (!Array.isArray(keysArray) || keysArray.length === 0) {
23
+ return reject(new Error('Input must be a non-empty array of product keys.'));
24
+ }
25
+
26
+ const payload = JSON.stringify({ keys: keysArray.join('\n') });
27
+
28
+ const req = https.request({
29
+ hostname: 'cidportal.win',
30
+ port: 443,
31
+ path: '/api/check-keys.php',
32
+ method: 'POST',
33
+ headers: {
34
+ 'Content-Type': 'application/json',
35
+ 'Content-Length': Buffer.byteLength(payload),
36
+ 'User-Agent': 'pidms-cli/1.0.0 (Node.js)'
37
+ },
38
+ timeout: 15000
39
+ }, (res) => {
40
+ let data = '';
41
+ res.on('data', chunk => data += chunk);
42
+ res.on('end', () => {
43
+ if (res.statusCode === 429) {
44
+ return resolve({ success: false, error: 'Rate limit reached. Please try again later.' });
45
+ }
46
+ try {
47
+ const json = JSON.parse(data);
48
+ resolve(json);
49
+ } catch (e) {
50
+ resolve({ success: false, raw: data });
51
+ }
52
+ });
53
+ });
54
+
55
+ req.on('error', err => reject(err));
56
+ req.on('timeout', () => {
57
+ req.destroy();
58
+ reject(new Error('Request timed out connecting to gateway.'));
59
+ });
60
+
61
+ req.write(payload);
62
+ req.end();
63
+ });
64
+ }
65
+
66
+ async function checkKey(singleKey) {
67
+ const formatted = sanitizeKey(singleKey);
68
+ const result = await checkKeys([formatted]);
69
+ return result;
70
+ }
71
+
72
+ module.exports = {
73
+ sanitizeKey,
74
+ checkKey,
75
+ checkKeys
76
+ };
package/package.json CHANGED
@@ -1,6 +1,40 @@
1
1
  {
2
2
  "name": "pidms-cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "Fast, lightweight CLI & SDK to inspect Microsoft Windows & Office product keys, detect license channels (Retail, OEM, Volume:MAK), and verify activation status.",
5
+ "main": "index.js",
6
+ "bin": {
7
+ "pidms": "bin/cli.js",
8
+ "pid-checker": "bin/cli.js"
9
+ },
10
+ "scripts": {
11
+ "start": "node ./bin/cli.js",
12
+ "test": "node index.js"
13
+ },
14
+ "keywords": [
15
+ "pidms",
16
+ "product-key-checker",
17
+ "windows-key",
18
+ "office-key",
19
+ "retail-key",
20
+ "oem-key",
21
+ "mak-count",
22
+ "microsoft-licensing",
23
+ "actvkey",
24
+ "cidportal",
25
+ "pid-checker"
26
+ ],
27
+ "author": "ActvKey Open Source Team (https://actvkey.com)",
28
+ "license": "MIT",
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "git+https://github.com/actvkey-bd/pidms.git"
32
+ },
33
+ "homepage": "https://cidportal.win",
34
+ "bugs": {
35
+ "url": "https://github.com/actvkey-bd/pidms/issues"
36
+ },
37
+ "engines": {
38
+ "node": ">=14.0.0"
39
+ }
40
+ }