grimoire-wizard 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.
@@ -0,0 +1,112 @@
1
+ meta:
2
+ name: "Grimoire Component Demo"
3
+ description: "Showcasing all 10 step types, groups, and theming"
4
+
5
+ theme:
6
+ tokens:
7
+ primary: "#89b4fa"
8
+ success: "#a6e3a1"
9
+ error: "#f38ba8"
10
+ warning: "#fab387"
11
+ info: "#74c7ec"
12
+ muted: "#6c7086"
13
+ accent: "#cba6f7"
14
+ icons:
15
+ step: "●"
16
+ stepDone: "✔"
17
+ stepPending: "○"
18
+ pointer: "❯"
19
+
20
+ steps:
21
+ - id: name
22
+ type: text
23
+ group: "Text Inputs"
24
+ message: "What is your name?"
25
+ placeholder: "John Doe"
26
+ validate:
27
+ - rule: required
28
+ - rule: minLength
29
+ value: 2
30
+
31
+ - id: bio
32
+ type: editor
33
+ group: "Text Inputs"
34
+ message: "Write a short bio (opens editor)"
35
+ required: false
36
+
37
+ - id: project-dir
38
+ type: path
39
+ group: "Text Inputs"
40
+ message: "Project directory"
41
+ placeholder: "./my-project"
42
+ default: "."
43
+
44
+ - id: secret
45
+ type: password
46
+ group: "Text Inputs"
47
+ message: "Enter a secret key"
48
+ validate:
49
+ - rule: minLength
50
+ value: 4
51
+ message: "At least 4 characters"
52
+
53
+ - id: framework
54
+ type: select
55
+ group: "Selections"
56
+ message: "Pick a framework"
57
+ options:
58
+ - { value: react, label: "React" }
59
+ - { value: vue, label: "Vue" }
60
+ - { value: svelte, label: "Svelte" }
61
+ - { value: angular, label: "Angular", hint: "Enterprise-ready" }
62
+
63
+ - id: tools
64
+ type: multiselect
65
+ group: "Selections"
66
+ message: "Choose your tools"
67
+ options:
68
+ - { value: eslint, label: "ESLint", hint: "Linting" }
69
+ - { value: prettier, label: "Prettier", hint: "Formatting" }
70
+ - { value: vitest, label: "Vitest", hint: "Testing" }
71
+ - { value: husky, label: "Husky", hint: "Git hooks" }
72
+ min: 1
73
+ max: 3
74
+
75
+ - id: language
76
+ type: search
77
+ group: "Selections"
78
+ message: "Search for a language"
79
+ options:
80
+ - { value: typescript, label: "TypeScript" }
81
+ - { value: javascript, label: "JavaScript" }
82
+ - { value: python, label: "Python" }
83
+ - { value: go, label: "Go" }
84
+ - { value: rust, label: "Rust" }
85
+ - { value: java, label: "Java" }
86
+ - { value: csharp, label: "C#" }
87
+ - { value: ruby, label: "Ruby" }
88
+
89
+ - id: dark-mode
90
+ type: toggle
91
+ group: "Toggles & Numbers"
92
+ message: "Enable dark mode?"
93
+ active: "Dark"
94
+ inactive: "Light"
95
+ default: true
96
+
97
+ - id: port
98
+ type: number
99
+ group: "Toggles & Numbers"
100
+ message: "Dev server port"
101
+ default: 3000
102
+ min: 1024
103
+ max: 65535
104
+
105
+ - id: proceed
106
+ type: confirm
107
+ group: "Confirmation"
108
+ message: "Proceed with these settings?"
109
+ next: __done__
110
+
111
+ output:
112
+ format: json
@@ -0,0 +1,171 @@
1
+ meta:
2
+ name: "eBay MCP Setup"
3
+ description: "Interactive setup wizard for eBay MCP server configuration"
4
+
5
+ theme:
6
+ tokens:
7
+ primary: "#0064d2"
8
+ success: "#4caf50"
9
+ error: "#e53935"
10
+ warning: "#ff9800"
11
+ info: "#2196f3"
12
+ muted: "#757575"
13
+ accent: "#7c3aed"
14
+
15
+ checks:
16
+ - name: "Node.js installed"
17
+ run: "node --version"
18
+ message: "Node.js >= 18 is required"
19
+
20
+ steps:
21
+ - id: first-time
22
+ type: confirm
23
+ group: "Getting Started"
24
+ message: "Is this your first time setting up eBay Developer credentials?"
25
+ default: true
26
+
27
+ - id: runame-help
28
+ type: confirm
29
+ group: "Getting Started"
30
+ message: "Need help understanding RuName (Redirect URI)?"
31
+ default: false
32
+ when:
33
+ field: first-time
34
+ equals: true
35
+
36
+ - id: environment
37
+ type: select
38
+ group: "Environment"
39
+ message: "Select target environment"
40
+ options:
41
+ - { value: sandbox, label: "Sandbox (Development & Testing)" }
42
+ - { value: production, label: "Production (Live Trading)" }
43
+ default: sandbox
44
+
45
+ - id: client-id
46
+ type: text
47
+ group: "Credentials"
48
+ message: "Enter your eBay App ID (Client ID)"
49
+ placeholder: "YourApp-SBX-xxxxxxxx-xxxxxxxx"
50
+ validate:
51
+ - rule: required
52
+ message: "Client ID is required"
53
+
54
+ - id: client-secret
55
+ type: password
56
+ group: "Credentials"
57
+ message: "Enter your eBay Cert ID (Client Secret)"
58
+ validate:
59
+ - rule: required
60
+ message: "Client Secret is required"
61
+
62
+ - id: redirect-uri
63
+ type: text
64
+ group: "Credentials"
65
+ message: "Enter your RuName (Redirect URI)"
66
+ default: "http://localhost:3000/oauth/callback"
67
+ validate:
68
+ - rule: required
69
+ - rule: pattern
70
+ value: "^https?://"
71
+ message: "Must be a valid URL starting with http:// or https://"
72
+
73
+ - id: marketplace
74
+ type: search
75
+ group: "Marketplace"
76
+ message: "Search for your eBay marketplace"
77
+ options:
78
+ - { value: EBAY_US, label: "United States (EBAY_US)" }
79
+ - { value: EBAY_GB, label: "United Kingdom (EBAY_GB)" }
80
+ - { value: EBAY_DE, label: "Germany (EBAY_DE)" }
81
+ - { value: EBAY_AU, label: "Australia (EBAY_AU)" }
82
+ - { value: EBAY_FR, label: "France (EBAY_FR)" }
83
+ - { value: EBAY_IT, label: "Italy (EBAY_IT)" }
84
+ - { value: EBAY_ES, label: "Spain (EBAY_ES)" }
85
+ - { value: EBAY_CA, label: "Canada (EBAY_CA)" }
86
+ default: EBAY_US
87
+
88
+ - id: scopes
89
+ type: multiselect
90
+ group: "OAuth Scopes"
91
+ message: "Select OAuth scope categories"
92
+ options:
93
+ - { value: inventory, label: "Inventory", hint: "Manage listings and inventory" }
94
+ - { value: orders, label: "Orders", hint: "View and manage orders" }
95
+ - { value: account, label: "Account", hint: "Account settings and policies" }
96
+ - { value: analytics, label: "Analytics", hint: "Traffic and sales reports" }
97
+ - { value: marketing, label: "Marketing", hint: "Promotions and campaigns" }
98
+ - { value: finance, label: "Finance", hint: "Payouts and transactions" }
99
+ - { value: reputation, label: "Reputation", hint: "Seller feedback and ratings" }
100
+ - { value: commerce, label: "Commerce Services", hint: "Taxonomy and catalog APIs" }
101
+ min: 1
102
+
103
+ - id: view-scopes
104
+ type: confirm
105
+ group: "OAuth Scopes"
106
+ message: "Would you like to review the selected scope details?"
107
+ default: false
108
+
109
+ - id: token-method
110
+ type: select
111
+ group: "Authentication"
112
+ message: "How would you like to obtain your OAuth token?"
113
+ options:
114
+ - { value: interactive, label: "Interactive OAuth Flow", hint: "Recommended" }
115
+ - { value: manual, label: "Manual OAuth Flow", hint: "Get token yourself" }
116
+ - { value: existing, label: "I already have a refresh token" }
117
+ - { value: skip, label: "Skip (configure later)" }
118
+ routes:
119
+ existing: refresh-token
120
+ skip: configure-clients
121
+
122
+ - id: refresh-token
123
+ type: text
124
+ group: "Authentication"
125
+ message: "Enter your refresh token"
126
+ validate:
127
+ - rule: required
128
+ - rule: pattern
129
+ value: "^v\\^1\\.1#"
130
+ message: "Token should start with v^1.1#"
131
+
132
+ - id: configure-clients
133
+ type: multiselect
134
+ group: "MCP Clients"
135
+ message: "Select MCP clients to configure"
136
+ options:
137
+ - { value: claude-desktop, label: "Claude Desktop" }
138
+ - { value: cursor, label: "Cursor" }
139
+ - { value: cline, label: "Cline (VS Code)" }
140
+ - { value: windsurf, label: "Windsurf" }
141
+ - { value: zed, label: "Zed" }
142
+ - { value: continue, label: "Continue.dev" }
143
+ - { value: roo-code, label: "Roo Code" }
144
+ - { value: claude-code, label: "Claude Code CLI" }
145
+ - { value: amazon-q, label: "Amazon Q" }
146
+
147
+ - id: docker-setup
148
+ type: confirm
149
+ group: "Docker"
150
+ message: "Generate Docker configuration?"
151
+ default: false
152
+
153
+ - id: confirm-setup
154
+ type: confirm
155
+ group: "Review"
156
+ message: "Save this configuration and complete setup?"
157
+ default: true
158
+ next: __done__
159
+
160
+ output:
161
+ format: env
162
+ path: .env
163
+
164
+ actions:
165
+ - name: "Write environment file"
166
+ run: "echo 'Configuration saved successfully'"
167
+ - name: "Generate Docker files"
168
+ run: "echo 'Docker configuration generated'"
169
+ when:
170
+ field: docker-setup
171
+ equals: true
@@ -0,0 +1,34 @@
1
+ extends: ./base.yaml
2
+
3
+ meta:
4
+ name: "Extended Project Wizard"
5
+ description: "Extends base config with additional steps"
6
+
7
+ steps:
8
+ - id: name
9
+ type: text
10
+ message: "Project name?"
11
+ validate:
12
+ - rule: required
13
+
14
+ - id: language
15
+ type: select
16
+ message: "Language?"
17
+ options:
18
+ - { value: typescript, label: "TypeScript" }
19
+ - { value: javascript, label: "JavaScript" }
20
+ - { value: python, label: "Python" }
21
+
22
+ - id: description
23
+ type: text
24
+ message: "Description?"
25
+ required: false
26
+
27
+ - id: confirm
28
+ type: confirm
29
+ message: "Create project?"
30
+ next: __done__
31
+
32
+ output:
33
+ format: yaml
34
+ path: project-config.yaml
@@ -0,0 +1,92 @@
1
+ meta:
2
+ name: "Catppuccin Setup"
3
+ description: "A beautifully themed wizard"
4
+
5
+ theme:
6
+ tokens:
7
+ primary: "#89b4fa"
8
+ success: "#a6e3a1"
9
+ error: "#f38ba8"
10
+ warning: "#fab387"
11
+ info: "#74c7ec"
12
+ muted: "#6c7086"
13
+ accent: "#cba6f7"
14
+ icons:
15
+ step: "\u2B24"
16
+ stepDone: "\u2714"
17
+ stepPending: "\u25EF"
18
+ pointer: "\u276F"
19
+
20
+ steps:
21
+ - id: username
22
+ type: text
23
+ message: "Choose a username"
24
+ validate:
25
+ - rule: required
26
+ - rule: minLength
27
+ value: 3
28
+ - rule: maxLength
29
+ value: 20
30
+ - rule: pattern
31
+ value: "^[a-zA-Z][a-zA-Z0-9_]*$"
32
+ message: "Letters, numbers, underscores only. Must start with a letter."
33
+
34
+ - id: email
35
+ type: text
36
+ message: "Your email address"
37
+ validate:
38
+ - rule: required
39
+ - rule: pattern
40
+ value: "^[^@]+@[^@]+\\.[^@]+$"
41
+ message: "Enter a valid email address"
42
+
43
+ - id: role
44
+ type: select
45
+ message: "Select your role"
46
+ options:
47
+ - { value: developer, label: "Developer" }
48
+ - { value: designer, label: "Designer" }
49
+ - { value: manager, label: "Project Manager" }
50
+ - { value: devops, label: "DevOps Engineer" }
51
+
52
+ - id: experience
53
+ type: number
54
+ message: "Years of experience"
55
+ min: 0
56
+ max: 50
57
+ default: 3
58
+
59
+ - id: interests
60
+ type: multiselect
61
+ message: "Areas of interest"
62
+ options:
63
+ - { value: frontend, label: "Frontend Development" }
64
+ - { value: backend, label: "Backend Development" }
65
+ - { value: mobile, label: "Mobile Development" }
66
+ - { value: ai, label: "AI / Machine Learning" }
67
+ - { value: devops, label: "DevOps / Infrastructure" }
68
+ - { value: security, label: "Security" }
69
+ min: 1
70
+ max: 3
71
+
72
+ - id: newsletter
73
+ type: confirm
74
+ message: "Subscribe to our newsletter?"
75
+ default: true
76
+
77
+ - id: password
78
+ type: password
79
+ message: "Set a password"
80
+ validate:
81
+ - rule: minLength
82
+ value: 8
83
+ message: "Password must be at least 8 characters"
84
+
85
+ - id: confirm
86
+ type: confirm
87
+ message: "Create your account?"
88
+ next: __done__
89
+
90
+ output:
91
+ format: json
92
+ path: "account.json"
@@ -0,0 +1,34 @@
1
+ meta:
2
+ name: "Deployment Wizard"
3
+ description: "Deploy with pre-flight safety checks"
4
+
5
+ checks:
6
+ - name: Node.js installed
7
+ run: node --version
8
+ message: "Node.js is required. Install from https://nodejs.org"
9
+ - name: Git available
10
+ run: git --version
11
+ message: "Git is required. Install from https://git-scm.com"
12
+
13
+ steps:
14
+ - id: environment
15
+ type: select
16
+ message: "Deploy to which environment?"
17
+ options:
18
+ - { value: staging, label: "Staging" }
19
+ - { value: production, label: "Production" }
20
+
21
+ - id: version
22
+ type: text
23
+ message: "Version tag?"
24
+ default: "latest"
25
+ validate:
26
+ - rule: required
27
+
28
+ - id: confirm
29
+ type: confirm
30
+ message: "Deploy now?"
31
+ next: __done__
32
+
33
+ output:
34
+ format: json
package/package.json ADDED
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "grimoire-wizard",
3
+ "version": "0.3.0",
4
+ "description": "Config-driven CLI wizard framework. Define interactive terminal wizards in YAML/JSON with back-navigation, conditional branching, theming, and structured output.",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.js",
11
+ "types": "./dist/index.d.ts"
12
+ }
13
+ },
14
+ "bin": {
15
+ "grimoire": "./dist/cli.js"
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "examples",
20
+ "schema",
21
+ "README.md",
22
+ "LICENSE"
23
+ ],
24
+ "scripts": {
25
+ "build": "tsup",
26
+ "dev": "tsup --watch",
27
+ "typecheck": "tsc --noEmit",
28
+ "test": "vitest run",
29
+ "test:watch": "vitest",
30
+ "lint": "eslint src/",
31
+ "schema:generate": "echo \"Schema is hand-maintained\"",
32
+ "prepublishOnly": "npm run build"
33
+ },
34
+ "keywords": [
35
+ "cli",
36
+ "wizard",
37
+ "tui",
38
+ "terminal",
39
+ "prompt",
40
+ "interactive",
41
+ "yaml",
42
+ "json",
43
+ "config-driven",
44
+ "back-navigation",
45
+ "conditional",
46
+ "theming",
47
+ "inquirer",
48
+ "clack"
49
+ ],
50
+ "author": "Yosef Hayim (https://github.com/YosefHayim)",
51
+ "license": "MIT",
52
+ "engines": {
53
+ "node": ">=18"
54
+ },
55
+ "dependencies": {
56
+ "@inquirer/prompts": "^7.0.0",
57
+ "chalk": "^5.4.0",
58
+ "commander": "^13.0.0",
59
+ "cosmiconfig": "^9.0.0",
60
+ "figlet": "^1.10.0",
61
+ "gradient-string": "^3.0.0",
62
+ "yaml": "^2.7.0",
63
+ "zod": "^3.24.0"
64
+ },
65
+ "devDependencies": {
66
+ "@types/figlet": "^1.7.0",
67
+ "@types/gradient-string": "^1.1.6",
68
+ "@types/node": "^22.0.0",
69
+ "tsup": "^8.4.0",
70
+ "typescript": "^5.7.0",
71
+ "vitest": "^3.0.0"
72
+ }
73
+ }