grg-kit-cli 0.1.2 → 0.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grg-kit-cli",
3
- "version": "0.1.2",
3
+ "version": "0.3.0",
4
4
  "description": "CLI tool for pulling GRG Kit resources into your Angular project",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -27,9 +27,10 @@
27
27
  "directory": "cli"
28
28
  },
29
29
  "dependencies": {
30
+ "chalk": "^4.1.2",
30
31
  "commander": "^11.1.0",
31
32
  "degit": "^2.8.4",
32
- "chalk": "^4.1.2",
33
+ "inquirer": "^8.2.7",
33
34
  "ora": "^5.4.1"
34
35
  },
35
36
  "engines": {
@@ -1,122 +0,0 @@
1
- const chalk = require('chalk');
2
- const { RESOURCES } = require('../config/resources');
3
-
4
- /**
5
- * Metadata command - outputs structured information about all commands and resources
6
- * This is designed to be consumed by MCP servers and LLMs
7
- */
8
- async function metadata(options) {
9
- const format = options.format || 'json';
10
-
11
- const commandMetadata = {
12
- version: '0.1.0',
13
- name: 'grg-kit-cli',
14
- description: 'CLI tool for pulling GRG Kit resources into Angular projects',
15
- repository: 'https://github.com/Genesis-Research/grg-kit',
16
- commands: [
17
- {
18
- name: 'init',
19
- description: 'Initialize GRG Kit in your Angular project with themes directory and configuration',
20
- usage: 'grg init [options]',
21
- options: [
22
- {
23
- flag: '-t, --theme <name>',
24
- description: 'Theme to install',
25
- default: 'grg-theme',
26
- choices: ['grg-theme', 'claude', 'clean-slate', 'modern-minimal', 'amber-minimal', 'mocks']
27
- }
28
- ],
29
- examples: [
30
- 'grg init',
31
- 'grg init --theme claude',
32
- 'grg init -t modern-minimal'
33
- ],
34
- effects: [
35
- 'Creates src/themes directory',
36
- 'Downloads selected theme file',
37
- 'Updates src/styles.css with theme import'
38
- ]
39
- },
40
- {
41
- name: 'add',
42
- description: 'Add a GRG Kit resource to your project',
43
- usage: 'grg add <resource> [options]',
44
- options: [
45
- {
46
- flag: '-o, --output <path>',
47
- description: 'Output directory for the resource',
48
- default: 'Auto-determined based on resource type'
49
- }
50
- ],
51
- examples: [
52
- 'grg add theme:claude',
53
- 'grg add component:stepper',
54
- 'grg add layout:dashboard',
55
- 'grg add examples:button',
56
- 'grg add examples:all'
57
- ],
58
- resourceFormat: '<category>:<name>',
59
- categories: ['theme', 'component', 'layout', 'examples'],
60
- effects: [
61
- 'Downloads the specified resource',
62
- 'Places it in the appropriate directory'
63
- ]
64
- },
65
- {
66
- name: 'list',
67
- description: 'List available GRG Kit resources',
68
- usage: 'grg list [category]',
69
- examples: [
70
- 'grg list',
71
- 'grg list themes',
72
- 'grg list components',
73
- 'grg list layouts',
74
- 'grg list examples'
75
- ],
76
- categories: ['themes', 'components', 'layouts', 'examples'],
77
- effects: [
78
- 'Displays available resources in the specified category'
79
- ]
80
- },
81
- {
82
- name: 'metadata',
83
- description: 'Output structured metadata about all available commands and resources (for MCP servers)',
84
- usage: 'grg metadata [options]',
85
- options: [
86
- {
87
- flag: '-f, --format <type>',
88
- description: 'Output format',
89
- default: 'json',
90
- choices: ['json', 'yaml']
91
- }
92
- ],
93
- examples: [
94
- 'grg metadata',
95
- 'grg metadata --format json'
96
- ],
97
- effects: [
98
- 'Outputs structured metadata in specified format'
99
- ]
100
- }
101
- ],
102
- resources: RESOURCES
103
- };
104
-
105
- if (format === 'json') {
106
- console.log(JSON.stringify(commandMetadata, null, 2));
107
- } else if (format === 'yaml') {
108
- // Simple YAML output (could use a library for more complex cases)
109
- console.log('# GRG Kit CLI Metadata');
110
- console.log(`version: ${commandMetadata.version}`);
111
- console.log(`name: ${commandMetadata.name}`);
112
- console.log(`description: ${commandMetadata.description}`);
113
- console.log('\ncommands:');
114
- commandMetadata.commands.forEach(cmd => {
115
- console.log(` - name: ${cmd.name}`);
116
- console.log(` description: ${cmd.description}`);
117
- console.log(` usage: ${cmd.usage}`);
118
- });
119
- }
120
- }
121
-
122
- module.exports = { metadata };