pidms-cli 1.0.2 → 1.0.3

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.
Files changed (3) hide show
  1. package/README.md +8 -16
  2. package/bin/cli.js +45 -6
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,13 +1,12 @@
1
1
  # PIDMS 🔑 - Microsoft Product Key & License Channel Inspector
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/pidms.svg)](https://www.npmjs.com/package/pidms)
3
+ [![npm version](https://img.shields.io/npm/v/pidms-cli.svg)](https://www.npmjs.com/package/pidms-cli)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
5
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
6
 
8
7
  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
8
 
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)).
9
+ Powered by the **CID Portal Gateway** ([https://cidportal.win](https://cidportal.win)).
11
10
 
12
11
  ---
13
12
 
@@ -16,19 +15,13 @@ Powered by the **CID Portal Gateway** ([https://cidportal.win](https://cidportal
16
15
  Run instantly in your terminal:
17
16
 
18
17
  ```bash
19
- npx pidms <PRODUCT-KEY>
18
+ npx pidms-cli <PRODUCT-KEY>
20
19
  ```
21
20
 
22
- Or install globally:
21
+ Or run interactively (prompts for key):
23
22
 
24
23
  ```bash
25
- npm install -g pidms
26
- pidms <PRODUCT-KEY>
27
- ```
28
-
29
- ### Example:
30
- ```bash
31
- npx pidms W269N-WFGWX-YVC9B-4J6C9-T83GX
24
+ npx pidms-cli
32
25
  ```
33
26
 
34
27
  ---
@@ -36,10 +29,10 @@ npx pidms W269N-WFGWX-YVC9B-4J6C9-T83GX
36
29
  ## 💻 Programmatic Usage (Node.js SDK)
37
30
 
38
31
  ```javascript
39
- const { checkKey, sanitizeKey } = require('pidms');
32
+ const { checkKey, sanitizeKey } = require('pidms-cli');
40
33
 
41
34
  async function inspect() {
42
- const result = await checkKey('W269N-WFGWX-YVC9B-4J6C9-T83GX');
35
+ const result = await checkKey('XXXXX-XXXXX-XXXXX-XXXXX-XXXXX');
43
36
  console.log(result);
44
37
  }
45
38
 
@@ -52,6 +45,7 @@ inspect();
52
45
 
53
46
  - **Channel Identification:** Instantly differentiates between **Retail**, **OEM:DM**, **Volume:MAK**, and **Volume:GVLK**.
54
47
  - **Edition Recognition:** Resolves Windows 11, Windows 10, Windows Server 2025/2022, Office 2024, 2021, and 2019 editions.
48
+ - **Accurate Status Highlighting:** Clear visual differentiation between Active, Phone Activation, KMS, and Blocked keys with specific Microsoft error codes.
55
49
  - **Zero Third-Party Dependencies:** Pure native Node.js HTTPS client with minimal footprint.
56
50
  - **Automated Telephone Activation (CID):** If your key requires telephone confirmation, generate Confirmation IDs in sub-2s at [https://cidportal.win](https://cidportal.win).
57
51
 
@@ -60,8 +54,6 @@ inspect();
60
54
  ## 🌐 Ecosystem & Links
61
55
 
62
56
  - **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
57
 
66
58
  ---
67
59
 
package/bin/cli.js CHANGED
@@ -6,6 +6,7 @@
6
6
  * Powered by CID Portal (https://cidportal.win)
7
7
  */
8
8
 
9
+ const readline = require('readline');
9
10
  const { sanitizeKey, checkKey } = require('../index');
10
11
 
11
12
  const colors = {
@@ -26,29 +27,43 @@ ${colors.cyan}${colors.bright}==================================================
26
27
  / /_/ // // / / / /|_/ /\\__ \\
27
28
  / ____// // /_/ / / / /___/ /
28
29
  /_/ /___/_____/_/ /_//____/
29
- Microsoft Product Key & License Channel Inspector | v1.0.0
30
+ Microsoft Product Key & License Channel Inspector | v1.0.3
30
31
  Powered by CID Portal (https://cidportal.win)
31
32
  =====================================================================${colors.reset}
32
33
  `);
33
34
  }
34
35
 
36
+ function prompt(query) {
37
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
38
+ return new Promise(resolve => rl.question(query, ans => { rl.close(); resolve(ans.trim()); }));
39
+ }
40
+
35
41
  async function main() {
36
42
  banner();
37
43
  const args = process.argv.slice(2);
38
44
 
39
- if (args.length === 0 || args.includes('-h') || args.includes('--help')) {
45
+ if (args.includes('-h') || args.includes('--help')) {
40
46
  console.log(`${colors.bright}Usage:${colors.reset}`);
41
47
  console.log(` npx pidms <PRODUCT-KEY>`);
42
48
  console.log(` npx pid-checker <PRODUCT-KEY>`);
43
49
  console.log('');
44
- console.log(`${colors.bright}Example:${colors.reset}`);
45
- console.log(` npx pidms W269N-WFGWX-YVC9B-4J6C9-T83GX`);
50
+ console.log(`${colors.bright}Interactive Mode:${colors.reset}`);
51
+ console.log(` npx pidms (prompts directly for key)`);
46
52
  console.log('');
47
53
  console.log(`${colors.dim}Online Portal & Confirmation ID (CID): https://cidportal.win${colors.reset}`);
48
54
  process.exit(0);
49
55
  }
50
56
 
51
- const rawKey = args[0];
57
+ let rawKey = args[0];
58
+ if (!rawKey) {
59
+ rawKey = await prompt('Enter 25-character Windows or Office Product Key: ');
60
+ }
61
+
62
+ if (!rawKey) {
63
+ console.log(`${colors.red}[X] No product key provided.${colors.reset}`);
64
+ process.exit(1);
65
+ }
66
+
52
67
  const cleanKey = sanitizeKey(rawKey);
53
68
 
54
69
  if (cleanKey.length !== 29) {
@@ -71,12 +86,36 @@ async function main() {
71
86
  console.log(`\n${colors.cyan}--- Key Information ---${colors.reset}`);
72
87
  if (Array.isArray(res.results) && res.results.length > 0) {
73
88
  const item = res.results[0];
89
+ const rawStatus = (item.status || '').toLowerCase();
90
+ const label = item.status_label || item.status || 'Unknown';
91
+
92
+ let statusDisplay = '';
93
+ if (rawStatus === 'blocked' || item.is_valid === false) {
94
+ statusDisplay = `${colors.red}${colors.bright}[X] ${label} (${item.error_code || 'Blocked'})${colors.reset}`;
95
+ } else if (rawStatus === 'phone') {
96
+ statusDisplay = `${colors.yellow}${colors.bright}[☎] ${label} (Telephone Activation Required)${colors.reset}`;
97
+ } else if (rawStatus === 'kms') {
98
+ statusDisplay = `${colors.cyan}${colors.bright}[KMS] ${label} (Volume Client)${colors.reset}`;
99
+ } else if (rawStatus === 'valid' || item.is_valid === true) {
100
+ statusDisplay = `${colors.green}${colors.bright}[✓] ${label}${colors.reset}`;
101
+ } else {
102
+ statusDisplay = `${colors.bright}${label}${colors.reset}`;
103
+ }
104
+
74
105
  console.log(` Product Description : ${colors.bright}${item.product || item.description || 'Unknown'}${colors.reset}`);
75
106
  console.log(` License Channel : ${colors.bright}${item.subType || item.channel || 'Standard'}${colors.reset}`);
76
- console.log(` License Status : ${colors.green}${colors.bright}${item.status || 'Active'}${colors.reset}`);
107
+ console.log(` License Status : ${statusDisplay}`);
108
+
109
+ if (item.error_code && rawStatus === 'blocked') {
110
+ console.log(` Error Code : ${colors.red}${item.error_code}${colors.reset}`);
111
+ }
112
+
77
113
  if (item.makCount !== undefined) {
78
114
  console.log(` Remaining MAK Count : ${colors.yellow}${item.makCount}${colors.reset}`);
79
115
  }
116
+ if (item.extended_pid) {
117
+ console.log(` Extended PID : ${colors.dim}${item.extended_pid}${colors.reset}`);
118
+ }
80
119
  } else {
81
120
  console.log(` Status : ${colors.green}${colors.bright}Processed successfully${colors.reset}`);
82
121
  console.log(` Details : ${JSON.stringify(res, null, 2)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pidms-cli",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
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
5
  "main": "index.js",
6
6
  "bin": {