cardworthscanner-cli 0.0.0-stage → 1.0.1

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/README.md CHANGED
@@ -1,3 +1,24 @@
1
- # Temporary Holding Version
1
+ # CardWorthScanner CLI
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
+ Official command-line companion for **[CardWorthScanner.com](https://cardworthscanner.com)** — The premier analytics and deterministic valuation suite for Pokemon, Magic: The Gathering (MTG), Yu-Gi-Oh!, and sports card collectors.
4
+
5
+ ## Quick Start
6
+
7
+ Run instantly with `npx` (no installation needed):
8
+
9
+ ```bash
10
+ # Calculate trading card border centering ratio (PSA 10 55/45 benchmark)
11
+ npx cardworthscanner-cli centering --left 52 --right 48 --top 50 --bottom 50
12
+
13
+ # Calculate PSA grading ROI and net profit after marketplace fees
14
+ npx cardworthscanner-cli roi --raw 50 --grade 25 --gem 300 --mint 100
15
+
16
+ # Open the full web workbench
17
+ npx cardworthscanner-cli open
18
+ ```
19
+
20
+ ## Features
21
+
22
+ - **Centering Ratio Verification**: Instant pixel/mm border math checking against PSA 10 (55/45) and BGS 9.5 (50/50) standards.
23
+ - **Grading Economics**: Fast calculation of upfront card costs, third-party authentication fees, expected PSA 10/9 sales comps, and net return on investment.
24
+ - **Web Workbench**: Seamless launch into the full interactive camera scanner and portfolio trackers at [CardWorthScanner.com](https://cardworthscanner.com).
@@ -0,0 +1,91 @@
1
+ #!/usr/bin/env node
2
+
3
+ const args = process.argv.slice(2);
4
+ const command = args[0] || 'help';
5
+
6
+ console.log('šŸƒ CardWorthScanner CLI v1.0.1 — PSA/BGS Card Grading & Valuation Engine');
7
+ console.log('🌐 Web Workbench: https://cardworthscanner.com\n');
8
+
9
+ if (command === 'help' || command === '--help' || command === '-h') {
10
+ console.log(`Usage:
11
+ npx cardworthscanner-cli centering --left <px> --right <px> --top <px> --bottom <px>
12
+ npx cardworthscanner-cli roi --raw <cost> --grade <fee> --gem <price> [--mint <price>]
13
+ npx cardworthscanner-cli open
14
+
15
+ Examples:
16
+ npx cardworthscanner-cli centering --left 52 --right 48 --top 50 --bottom 50
17
+ npx cardworthscanner-cli roi --raw 50 --grade 25 --gem 300 --mint 100
18
+ npx cardworthscanner-cli open
19
+ `);
20
+ process.exit(0);
21
+ }
22
+
23
+ if (command === 'open') {
24
+ const url = 'https://cardworthscanner.com';
25
+ console.log(`Opening CardWorthScanner Web App: ${url}`);
26
+ const openCmd = process.platform === 'win32' ? `start ${url}` : process.platform === 'darwin' ? `open ${url}` : `xdg-open ${url}`;
27
+ import('node:child_process').then(({ exec }) => exec(openCmd));
28
+ process.exit(0);
29
+ }
30
+
31
+ if (command === 'centering') {
32
+ const getArg = (flag) => {
33
+ const idx = args.indexOf(flag);
34
+ return idx !== -1 && args[idx + 1] ? parseFloat(args[idx + 1]) : null;
35
+ };
36
+ const left = getArg('--left') ?? 50;
37
+ const right = getArg('--right') ?? 50;
38
+ const top = getArg('--top') ?? 50;
39
+ const bottom = getArg('--bottom') ?? 50;
40
+
41
+ const lrTotal = left + right;
42
+ const tbTotal = top + bottom;
43
+
44
+ const lrPct1 = Math.round((Math.max(left, right) / lrTotal) * 100);
45
+ const lrPct2 = 100 - lrPct1;
46
+ const tbPct1 = Math.round((Math.max(top, bottom) / tbTotal) * 100);
47
+ const tbPct2 = 100 - tbPct1;
48
+
49
+ console.log(`šŸ“ Centering Measurements:`);
50
+ console.log(` Left/Right Ratio : ${lrPct1}/${lrPct2}%`);
51
+ console.log(` Top/Bottom Ratio : ${tbPct1}/${tbPct2}%`);
52
+
53
+ const meetsPsa10Front = lrPct1 <= 55 && tbPct1 <= 55;
54
+ const meetsBgs95 = lrPct1 <= 50.5 && tbPct1 <= 50.5;
55
+
56
+ console.log(`\nšŸ† Centering Verdicts:`);
57
+ console.log(` PSA 10 Gem Mint Standard (55/45 or better) : ${meetsPsa10Front ? 'āœ… PASS' : 'āŒ FAIL (Outside 55/45)'}`);
58
+ console.log(` BGS 9.5 True Gem Standard (50/50) : ${meetsBgs95 ? 'āœ… PASS' : 'āš ļø SIGHT VARIANCE'}`);
59
+ console.log(`\nExplore full AI visual border scanner at https://cardworthscanner.com/centering-calculator`);
60
+ process.exit(0);
61
+ }
62
+
63
+ if (command === 'roi') {
64
+ const getArg = (flag) => {
65
+ const idx = args.indexOf(flag);
66
+ return idx !== -1 && args[idx + 1] ? parseFloat(args[idx + 1]) : 0;
67
+ };
68
+ const raw = getArg('--raw') || 50;
69
+ const grade = getArg('--grade') || 25;
70
+ const gem = getArg('--gem') || 300;
71
+ const mint = getArg('--mint') || 80;
72
+
73
+ const totalCost = raw + grade;
74
+ const netGem = gem * (1 - 0.125);
75
+ const profitGem = netGem - totalCost;
76
+ const roiGem = Math.round((profitGem / totalCost) * 100);
77
+
78
+ const netMint = mint * (1 - 0.125);
79
+ const profitMint = netMint - totalCost;
80
+
81
+ console.log(`šŸ’° Grading Economics:`);
82
+ console.log(` Total Upfront Cost (Raw + Fee) : $${totalCost.toFixed(2)}`);
83
+ console.log(` PSA 10 (Gem Mint) Gross Price : $${gem.toFixed(2)}`);
84
+ console.log(` Net Profit on PSA 10 : $${profitGem.toFixed(2)} (ROI: ${roiGem}%)`);
85
+ console.log(` Net Profit/Loss on PSA 9 : $${profitMint.toFixed(2)}`);
86
+
87
+ console.log(`\nRun full multi-tier portfolio simulations at https://cardworthscanner.com/psa-grading-calculator`);
88
+ process.exit(0);
89
+ }
90
+
91
+ console.log(`Unknown command: "${command}". Run "npx cardworthscanner-cli help" for usage.`);
package/package.json CHANGED
@@ -1,6 +1,32 @@
1
1
  {
2
2
  "name": "cardworthscanner-cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.1",
4
+ "description": "Trading card grading ROI calculator, optical centering inspector, and TCG market price scanner CLI for CardWorthScanner.com.",
5
+ "main": "bin/cardworthscanner.mjs",
6
+ "bin": {
7
+ "cardworthscanner": "bin/cardworthscanner.mjs",
8
+ "cardworthscanner-cli": "bin/cardworthscanner.mjs"
9
+ },
10
+ "type": "module",
11
+ "keywords": [
12
+ "cardworthscanner",
13
+ "card-worth",
14
+ "psa-grading",
15
+ "tcgplayer",
16
+ "card-centering",
17
+ "pokemon-cards",
18
+ "sports-cards",
19
+ "bgs",
20
+ "cgc"
21
+ ],
22
+ "author": "Abigail Davised",
23
+ "license": "MIT",
24
+ "homepage": "https://cardworthscanner.com",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/AbigailDavised/cardworthscanner-mcp.git"
28
+ },
29
+ "bugs": {
30
+ "url": "https://github.com/AbigailDavised/cardworthscanner-mcp/issues"
31
+ }
32
+ }