@hypercli/cli 0.1.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.
Files changed (89) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +26 -0
  3. package/bin/run.js +13 -0
  4. package/dist/autocomplete/base.d.ts +17 -0
  5. package/dist/autocomplete/base.d.ts.map +1 -0
  6. package/dist/autocomplete/base.js +58 -0
  7. package/dist/autocomplete/base.js.map +1 -0
  8. package/dist/autocomplete/completions/bash.d.ts +3 -0
  9. package/dist/autocomplete/completions/bash.d.ts.map +1 -0
  10. package/dist/autocomplete/completions/bash.js +94 -0
  11. package/dist/autocomplete/completions/bash.js.map +1 -0
  12. package/dist/autocomplete/completions/powershell.d.ts +9 -0
  13. package/dist/autocomplete/completions/powershell.d.ts.map +1 -0
  14. package/dist/autocomplete/completions/powershell.js +307 -0
  15. package/dist/autocomplete/completions/powershell.js.map +1 -0
  16. package/dist/autocomplete/completions/shared.d.ts +19 -0
  17. package/dist/autocomplete/completions/shared.d.ts.map +1 -0
  18. package/dist/autocomplete/completions/shared.js +89 -0
  19. package/dist/autocomplete/completions/shared.js.map +1 -0
  20. package/dist/autocomplete/completions/types.d.ts +20 -0
  21. package/dist/autocomplete/completions/types.d.ts.map +1 -0
  22. package/dist/autocomplete/completions/types.js +2 -0
  23. package/dist/autocomplete/completions/types.js.map +1 -0
  24. package/dist/autocomplete/completions/zsh.d.ts +15 -0
  25. package/dist/autocomplete/completions/zsh.d.ts.map +1 -0
  26. package/dist/autocomplete/completions/zsh.js +276 -0
  27. package/dist/autocomplete/completions/zsh.js.map +1 -0
  28. package/dist/autocomplete/dynamic/cache.d.ts +35 -0
  29. package/dist/autocomplete/dynamic/cache.d.ts.map +1 -0
  30. package/dist/autocomplete/dynamic/cache.js +163 -0
  31. package/dist/autocomplete/dynamic/cache.js.map +1 -0
  32. package/dist/autocomplete/dynamic/index.d.ts +10 -0
  33. package/dist/autocomplete/dynamic/index.d.ts.map +1 -0
  34. package/dist/autocomplete/dynamic/index.js +9 -0
  35. package/dist/autocomplete/dynamic/index.js.map +1 -0
  36. package/dist/autocomplete/dynamic/resolver.d.ts +40 -0
  37. package/dist/autocomplete/dynamic/resolver.d.ts.map +1 -0
  38. package/dist/autocomplete/dynamic/resolver.js +164 -0
  39. package/dist/autocomplete/dynamic/resolver.js.map +1 -0
  40. package/dist/autocomplete/dynamic/types.d.ts +39 -0
  41. package/dist/autocomplete/dynamic/types.d.ts.map +1 -0
  42. package/dist/autocomplete/dynamic/types.js +2 -0
  43. package/dist/autocomplete/dynamic/types.js.map +1 -0
  44. package/dist/commands/autocomplete/create.d.ts +30 -0
  45. package/dist/commands/autocomplete/create.d.ts.map +1 -0
  46. package/dist/commands/autocomplete/create.js +141 -0
  47. package/dist/commands/autocomplete/create.js.map +1 -0
  48. package/dist/commands/autocomplete/generate.d.ts +16 -0
  49. package/dist/commands/autocomplete/generate.d.ts.map +1 -0
  50. package/dist/commands/autocomplete/generate.js +59 -0
  51. package/dist/commands/autocomplete/generate.js.map +1 -0
  52. package/dist/commands/autocomplete/index.d.ts +14 -0
  53. package/dist/commands/autocomplete/index.d.ts.map +1 -0
  54. package/dist/commands/autocomplete/index.js +66 -0
  55. package/dist/commands/autocomplete/index.js.map +1 -0
  56. package/dist/commands/autocomplete/script.d.ts +12 -0
  57. package/dist/commands/autocomplete/script.d.ts.map +1 -0
  58. package/dist/commands/autocomplete/script.js +32 -0
  59. package/dist/commands/autocomplete/script.js.map +1 -0
  60. package/dist/commands/config/show.d.ts +12 -0
  61. package/dist/commands/config/show.d.ts.map +1 -0
  62. package/dist/commands/config/show.js +64 -0
  63. package/dist/commands/config/show.js.map +1 -0
  64. package/dist/commands/init.d.ts +11 -0
  65. package/dist/commands/init.d.ts.map +1 -0
  66. package/dist/commands/init.js +76 -0
  67. package/dist/commands/init.js.map +1 -0
  68. package/dist/help/custom-help.d.ts +14 -0
  69. package/dist/help/custom-help.d.ts.map +1 -0
  70. package/dist/help/custom-help.js +110 -0
  71. package/dist/help/custom-help.js.map +1 -0
  72. package/dist/help/theme.d.ts +7 -0
  73. package/dist/help/theme.d.ts.map +1 -0
  74. package/dist/help/theme.js +50 -0
  75. package/dist/help/theme.js.map +1 -0
  76. package/dist/hooks/refresh-cache.d.ts +4 -0
  77. package/dist/hooks/refresh-cache.d.ts.map +1 -0
  78. package/dist/hooks/refresh-cache.js +10 -0
  79. package/dist/hooks/refresh-cache.js.map +1 -0
  80. package/dist/index.d.ts +2 -0
  81. package/dist/index.d.ts.map +1 -0
  82. package/dist/index.js +6 -0
  83. package/dist/index.js.map +1 -0
  84. package/help/config/show.md +27 -0
  85. package/help/cookbook.md +19 -0
  86. package/help/recipe.md +32 -0
  87. package/help/root.md +49 -0
  88. package/oclif.manifest.json +214 -0
  89. package/package.json +126 -0
package/help/recipe.md ADDED
@@ -0,0 +1,32 @@
1
+ # hyper recipe
2
+
3
+ Recipes are the core unit of code generation in Hyper. A recipe is a YAML workflow that describes what files to create, what templates to render, and what prompts to ask the user. Recipes live inside kits and can be run directly or composed into cookbooks.
4
+
5
+ ## Usage
6
+
7
+ `hyper recipe <command>`
8
+
9
+ ## Quick Start
10
+
11
+ ```sh
12
+ # List all recipes available from installed kits
13
+ hyper recipe list
14
+
15
+ # Run a recipe by path
16
+ hyper recipe run my-recipe.yml --name=Button
17
+
18
+ # Validate a recipe without running it
19
+ hyper recipe validate my-recipe.yml
20
+ ```
21
+
22
+ ## Shorthand Syntax
23
+
24
+ When a kit is installed, you can run its recipes without the `recipe run` prefix:
25
+
26
+ ```sh
27
+ # These are equivalent
28
+ hyper recipe run nextjs/crud --entity=Post
29
+ hyper nextjs crud --entity=Post
30
+ ```
31
+
32
+ Run `hyper recipe <command> --help` for details on any subcommand.
package/help/root.md ADDED
@@ -0,0 +1,49 @@
1
+ # hyper
2
+
3
+ Modern, scalable code generator with AI integration.
4
+
5
+ ## Usage
6
+
7
+ `hyper <command> [options]`
8
+
9
+ ## Getting Started
10
+
11
+ ```sh
12
+ # Initialize Hyper in your project
13
+ hyper init
14
+
15
+ # Install a generator kit
16
+ hyper kit install nextjs
17
+
18
+ # Generate code from a recipe
19
+ hyper gen nextjs crud create
20
+ ```
21
+
22
+ ## Generation
23
+
24
+ | Command | Description |
25
+ |---------|-------------|
26
+ | `hyper gen <recipe>` | Execute a recipe to generate code |
27
+ | `hyper recipe list` | Browse available recipes |
28
+ | `hyper recipe run <file>` | Run a recipe by file path |
29
+ | `hyper cookbook list` | Explore multi-step cookbooks |
30
+
31
+ **Shorthand:** `hyper nextjs crud` is equivalent to `hyper gen nextjs crud`.
32
+
33
+ ## Session Management
34
+
35
+ | Command | Description |
36
+ |---------|-------------|
37
+ | `hyper hq start` | Start the always-on HQ control center |
38
+ | `hyper hq spawn <project>` | Spawn a Claude session for a project |
39
+ | `hyper hq status` | Check running sessions |
40
+
41
+ ## Kit Management
42
+
43
+ | Command | Description |
44
+ |---------|-------------|
45
+ | `hyper kit install <source>` | Install a kit from npm, GitHub, or local path |
46
+ | `hyper kit list` | List installed kits |
47
+ | `hyper kit update` | Update kits to latest versions |
48
+
49
+ Run `hyper help <topic>` to learn more about any topic, or `hyper <command> --help` for command details.
@@ -0,0 +1,214 @@
1
+ {
2
+ "commands": {
3
+ "init": {
4
+ "aliases": [],
5
+ "args": {},
6
+ "description": "Initialize Hyper in the current project",
7
+ "examples": [
8
+ "<%= config.bin %> init",
9
+ "<%= config.bin %> init --force",
10
+ "<%= config.bin %> init --cwd ./my-project"
11
+ ],
12
+ "flags": {
13
+ "cwd": {
14
+ "description": "Working directory",
15
+ "name": "cwd",
16
+ "default": "/work/hyper/packages/cli",
17
+ "hasDynamicHelp": false,
18
+ "multiple": false,
19
+ "type": "option"
20
+ },
21
+ "force": {
22
+ "char": "f",
23
+ "description": "Overwrite existing configuration",
24
+ "name": "force",
25
+ "allowNo": false,
26
+ "type": "boolean"
27
+ }
28
+ },
29
+ "hasDynamicHelp": false,
30
+ "hiddenAliases": [],
31
+ "id": "init",
32
+ "pluginAlias": "@hypercli/cli",
33
+ "pluginName": "@hypercli/cli",
34
+ "pluginType": "core",
35
+ "strict": true,
36
+ "enableJsonFlag": false,
37
+ "isESM": true,
38
+ "relativePath": [
39
+ "dist",
40
+ "commands",
41
+ "init.js"
42
+ ]
43
+ },
44
+ "autocomplete:create": {
45
+ "aliases": [],
46
+ "args": {},
47
+ "description": "create autocomplete setup scripts and completion functions",
48
+ "flags": {},
49
+ "hasDynamicHelp": false,
50
+ "hidden": true,
51
+ "hiddenAliases": [],
52
+ "id": "autocomplete:create",
53
+ "pluginAlias": "@hypercli/cli",
54
+ "pluginName": "@hypercli/cli",
55
+ "pluginType": "core",
56
+ "strict": true,
57
+ "isESM": true,
58
+ "relativePath": [
59
+ "dist",
60
+ "commands",
61
+ "autocomplete",
62
+ "create.js"
63
+ ]
64
+ },
65
+ "autocomplete:generate": {
66
+ "aliases": [],
67
+ "args": {},
68
+ "description": "Generate dynamic completions (called by shell scripts)",
69
+ "flags": {
70
+ "enum-values": {
71
+ "description": "Get enum values for a specific flag (kit:cookbook:recipe:flag)",
72
+ "name": "enum-values",
73
+ "hasDynamicHelp": false,
74
+ "multiple": false,
75
+ "type": "option"
76
+ }
77
+ },
78
+ "hasDynamicHelp": false,
79
+ "hidden": true,
80
+ "hiddenAliases": [],
81
+ "id": "autocomplete:generate",
82
+ "pluginAlias": "@hypercli/cli",
83
+ "pluginName": "@hypercli/cli",
84
+ "pluginType": "core",
85
+ "strict": false,
86
+ "isESM": true,
87
+ "relativePath": [
88
+ "dist",
89
+ "commands",
90
+ "autocomplete",
91
+ "generate.js"
92
+ ]
93
+ },
94
+ "autocomplete": {
95
+ "aliases": [],
96
+ "args": {
97
+ "shell": {
98
+ "description": "Shell type",
99
+ "name": "shell",
100
+ "options": [
101
+ "zsh",
102
+ "bash",
103
+ "powershell"
104
+ ],
105
+ "required": false
106
+ }
107
+ },
108
+ "description": "Display autocomplete installation instructions.",
109
+ "examples": [
110
+ "$ <%= config.bin %> autocomplete",
111
+ "$ <%= config.bin %> autocomplete bash",
112
+ "$ <%= config.bin %> autocomplete zsh",
113
+ "$ <%= config.bin %> autocomplete powershell",
114
+ "$ <%= config.bin %> autocomplete --refresh-cache"
115
+ ],
116
+ "flags": {
117
+ "refresh-cache": {
118
+ "char": "r",
119
+ "description": "Refresh cache (ignores displaying instructions)",
120
+ "name": "refresh-cache",
121
+ "allowNo": false,
122
+ "type": "boolean"
123
+ }
124
+ },
125
+ "hasDynamicHelp": false,
126
+ "hiddenAliases": [],
127
+ "id": "autocomplete",
128
+ "pluginAlias": "@hypercli/cli",
129
+ "pluginName": "@hypercli/cli",
130
+ "pluginType": "core",
131
+ "strict": true,
132
+ "isESM": true,
133
+ "relativePath": [
134
+ "dist",
135
+ "commands",
136
+ "autocomplete",
137
+ "index.js"
138
+ ]
139
+ },
140
+ "autocomplete:script": {
141
+ "aliases": [],
142
+ "args": {
143
+ "shell": {
144
+ "description": "Shell type",
145
+ "name": "shell",
146
+ "options": [
147
+ "zsh",
148
+ "bash",
149
+ "powershell"
150
+ ],
151
+ "required": false
152
+ }
153
+ },
154
+ "description": "outputs autocomplete config script for shells",
155
+ "flags": {},
156
+ "hasDynamicHelp": false,
157
+ "hidden": true,
158
+ "hiddenAliases": [],
159
+ "id": "autocomplete:script",
160
+ "pluginAlias": "@hypercli/cli",
161
+ "pluginName": "@hypercli/cli",
162
+ "pluginType": "core",
163
+ "strict": true,
164
+ "isESM": true,
165
+ "relativePath": [
166
+ "dist",
167
+ "commands",
168
+ "autocomplete",
169
+ "script.js"
170
+ ]
171
+ },
172
+ "config:show": {
173
+ "aliases": [],
174
+ "args": {},
175
+ "description": "Show the resolved Hypergen configuration",
176
+ "examples": [
177
+ "<%= config.bin %> config show",
178
+ "<%= config.bin %> config show --json"
179
+ ],
180
+ "flags": {
181
+ "json": {
182
+ "description": "Output raw JSON (no interactive viewer)",
183
+ "name": "json",
184
+ "allowNo": false,
185
+ "type": "boolean"
186
+ },
187
+ "cwd": {
188
+ "description": "Working directory",
189
+ "name": "cwd",
190
+ "default": "/work/hyper/packages/cli",
191
+ "hasDynamicHelp": false,
192
+ "multiple": false,
193
+ "type": "option"
194
+ }
195
+ },
196
+ "hasDynamicHelp": false,
197
+ "hiddenAliases": [],
198
+ "id": "config:show",
199
+ "pluginAlias": "@hypercli/cli",
200
+ "pluginName": "@hypercli/cli",
201
+ "pluginType": "core",
202
+ "strict": true,
203
+ "enableJsonFlag": false,
204
+ "isESM": true,
205
+ "relativePath": [
206
+ "dist",
207
+ "commands",
208
+ "config",
209
+ "show.js"
210
+ ]
211
+ }
212
+ },
213
+ "version": "0.1.1"
214
+ }
package/package.json ADDED
@@ -0,0 +1,126 @@
1
+ {
2
+ "name": "@hypercli/cli",
3
+ "version": "0.1.1",
4
+ "type": "module",
5
+ "description": "HyperDev CLI",
6
+ "keywords": [
7
+ "hyperdev",
8
+ "hypergen",
9
+ "cli"
10
+ ],
11
+ "author": "Saulo Vallory <saulo@toki.life>",
12
+ "license": "MIT",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "https://github.com/svallory/hyper-coding.git",
16
+ "directory": "packages/cli"
17
+ },
18
+ "homepage": "https://hyperdev.saulo.engineer",
19
+ "bugs": {
20
+ "url": "https://github.com/svallory/hyper-coding/issues"
21
+ },
22
+ "engines": {
23
+ "node": ">=20"
24
+ },
25
+ "bin": {
26
+ "hyper": "./bin/run.js"
27
+ },
28
+ "imports": {
29
+ "#commands/*": "./dist/commands/*.js",
30
+ "#help/*": "./dist/help/*.js",
31
+ "#tests/*": "./tests/*.ts",
32
+ "#fixtures/*": "./tests/fixtures/*.ts",
33
+ "#*": "./dist/*.js"
34
+ },
35
+ "exports": {
36
+ ".": {
37
+ "types": "./dist/index.d.ts",
38
+ "import": "./dist/index.js"
39
+ }
40
+ },
41
+ "main": "./dist/index.js",
42
+ "types": "./dist/index.d.ts",
43
+ "files": [
44
+ "dist",
45
+ "bin/run.js",
46
+ "help",
47
+ "oclif.manifest.json",
48
+ "README.md",
49
+ "LICENSE"
50
+ ],
51
+ "oclif": {
52
+ "bin": "hyper",
53
+ "dirname": "hyper",
54
+ "commands": "./dist/commands",
55
+ "helpClass": "./dist/help/custom-help",
56
+ "topics": {
57
+ "config": {
58
+ "description": "View and manage Hyper configuration"
59
+ },
60
+ "autocomplete": {
61
+ "description": "Set up shell tab completion",
62
+ "hidden": true
63
+ }
64
+ },
65
+ "plugins": [
66
+ "@hypercli/gen",
67
+ "@hypercli/hq",
68
+ "@hypercli/kit",
69
+ "@oclif/plugin-help",
70
+ "@oclif/plugin-commands",
71
+ "@oclif/plugin-version",
72
+ "@oclif/plugin-warn-if-update-available"
73
+ ],
74
+ "hooks": {
75
+ "plugins:postinstall": "./dist/hooks/refresh-cache.js",
76
+ "plugins:postuninstall": "./dist/hooks/refresh-cache.js"
77
+ },
78
+ "warn-if-update-available": {
79
+ "timeoutInDays": 7
80
+ },
81
+ "topicSeparator": " "
82
+ },
83
+ "scripts": {
84
+ "build": "tsc",
85
+ "postbuild": "bunx oclif manifest",
86
+ "dev": "bun run bin/dev.js",
87
+ "test": "vitest run",
88
+ "test:watch": "vitest",
89
+ "lint": "biome check .",
90
+ "format": "biome format . --write",
91
+ "typecheck": "tsc --noEmit",
92
+ "prepublishOnly": "bun run build"
93
+ },
94
+ "dependencies": {
95
+ "@hypercli/core": "^0.1.1",
96
+ "@hypercli/gen": "^0.1.1",
97
+ "@hypercli/hq": "^0.1.1",
98
+ "@hypercli/kit": "^0.1.1",
99
+ "@hypercli/ui": "^0.1.1",
100
+ "@oclif/core": "^4.8.0",
101
+ "@oclif/plugin-commands": "^4.1.40",
102
+ "debug": "^4.4.1",
103
+ "js-yaml": "^4.1.0",
104
+ "@oclif/plugin-help": "^6.2.37",
105
+ "@oclif/plugin-version": "^2.2.36",
106
+ "@oclif/plugin-warn-if-update-available": "^3.1.55",
107
+ "chalk": "^4.1.2",
108
+ "fx": "^39.2.0"
109
+ },
110
+ "devDependencies": {
111
+ "@biomejs/biome": "^1.9.4",
112
+ "@types/debug": "^4.1.12",
113
+ "@types/fs-extra": "^11.0.4",
114
+ "@types/js-yaml": "^4.0.9",
115
+ "@types/node": "^20.0.0",
116
+ "@vitest/coverage-v8": "^4.0.0",
117
+ "execa": "^9.6.1",
118
+ "fs-extra": "^11.3.3",
119
+ "typescript": "^5.4.0",
120
+ "vitest": "4.0.18"
121
+ },
122
+ "publishConfig": {
123
+ "access": "public",
124
+ "registry": "https://registry.npmjs.org/"
125
+ }
126
+ }