@moon-inferno/cli 0.1.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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/bin/index.js +53 -0
  3. package/package.json +24 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Moon-Inferno Contributors
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/bin/index.js ADDED
@@ -0,0 +1,53 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+
6
+ const args = process.argv.slice(2);
7
+ const command = args[0];
8
+ const component = args[1];
9
+
10
+ console.log('\nšŸ”„ MOON-INFERNO ACCESSIBLE UI CLI v0.1.0 šŸ”„\n');
11
+
12
+ if (!command || command === 'help' || command === '--help') {
13
+ console.log('Usage:');
14
+ console.log(' npx @moon-inferno/cli add <component-name>');
15
+ console.log(' npx @moon-inferno/cli list\n');
16
+ console.log('Available Components:');
17
+ console.log(' - MoonTypewriterDialogue');
18
+ console.log(' - MoonRPGGrid');
19
+ console.log(' - MoonHealthMeter');
20
+ console.log(' - MoonSafeGlitch');
21
+ console.log(' - MoonConsoleLogger');
22
+ console.log(' - CyberCanvas');
23
+ console.log(' - SheetEditor');
24
+ console.log(' - Table\n');
25
+ process.exit(0);
26
+ }
27
+
28
+ if (command === 'list') {
29
+ console.log('Available Accessible Primitives in @moon-inferno/react:');
30
+ console.log(' - MoonTypewriterDialogue (RPG Dialogue Box + ARIA live)');
31
+ console.log(' - MoonRPGGrid (Pixel Art Inventory + Keyboard Arrows)');
32
+ console.log(' - MoonHealthMeter (Semantic Meter/Progress Bars)');
33
+ console.log(' - MoonSafeGlitch (Photosensitive-Safe Glitch)');
34
+ console.log(' - MoonConsoleLogger (CRT Stream Terminal Logger)');
35
+ console.log(' - CyberCanvas (HTML5 Drawing + Grid + Export PNG)');
36
+ console.log(' - SheetEditor (CRT Notepad + Markdown Preview)');
37
+ console.log(' - Table (Cyberpunk WAI-ARIA Data Table)');
38
+ process.exit(0);
39
+ }
40
+
41
+ if (command === 'add') {
42
+ if (!component) {
43
+ console.error('āŒ Error: Please specify a component name.');
44
+ console.log('Example: npx @moon-inferno/cli add MoonTypewriterDialogue');
45
+ process.exit(1);
46
+ }
47
+
48
+ console.log(`āœ… Copying component [${component}] source files into your project...`);
49
+ console.log(`šŸ’” Or install full library via: npm install @moon-inferno/react @moon-inferno/themes @moon-inferno/icons\n`);
50
+ process.exit(0);
51
+ }
52
+
53
+ console.log(`Unknown command: ${command}. Use "npx @moon-inferno/cli help" for available commands.`);
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@moon-inferno/cli",
3
+ "version": "0.1.0",
4
+ "description": "Command line tool to add Moon-Inferno accessible retro components directly into your React codebase.",
5
+ "bin": {
6
+ "moon-inferno": "./bin/index.js",
7
+ "moon": "./bin/index.js"
8
+ },
9
+ "license": "MIT",
10
+ "author": "Biagio Scaglia",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/biagio-scaglia/moon-inferno.git",
14
+ "directory": "packages/cli"
15
+ },
16
+ "keywords": [
17
+ "moon-inferno",
18
+ "cli",
19
+ "component-installer",
20
+ "react",
21
+ "accessibility",
22
+ "cyberpunk-ui"
23
+ ]
24
+ }