vibedgames 0.6.2 → 0.7.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 (140) hide show
  1. package/README.md +14 -9
  2. package/dist/THIRD_PARTY_NOTICES.txt +383 -0
  3. package/dist/chunk-2GL2WJZX.js +172 -0
  4. package/dist/chunk-2QBYTIMH.js +511 -0
  5. package/dist/chunk-34AHIMX7.js +466 -0
  6. package/dist/chunk-6FZPPUQH.js +107 -0
  7. package/dist/chunk-BVVYDSFJ.js +99 -0
  8. package/dist/chunk-CAKBGDCY.js +47 -0
  9. package/dist/chunk-CBKOPVU6.js +1780 -0
  10. package/dist/chunk-CU7UY5YJ.js +1108 -0
  11. package/dist/chunk-CZPKN32Z.js +257 -0
  12. package/dist/chunk-DHEXGWJY.js +111 -0
  13. package/dist/chunk-FL6IFBUF.js +22 -0
  14. package/dist/chunk-FLUXEHMU.js +1360 -0
  15. package/dist/chunk-FNYBZNW2.js +165 -0
  16. package/dist/chunk-G5FRIFA3.js +22 -0
  17. package/dist/chunk-HCMTSR7E.js +69 -0
  18. package/dist/chunk-HKA5LBYW.js +159 -0
  19. package/dist/chunk-I6O4HIDY.js +1063 -0
  20. package/dist/chunk-J6PKNPI2.js +26 -0
  21. package/dist/chunk-JT2AU24K.js +759 -0
  22. package/dist/chunk-MBXCVCC4.js +478 -0
  23. package/dist/chunk-MJQSHP3Y.js +415 -0
  24. package/dist/chunk-MYFLYNPO.js +68 -0
  25. package/dist/chunk-PEUP4MZR.js +59 -0
  26. package/dist/chunk-PHEDW6C7.js +32 -0
  27. package/dist/chunk-PQDBCZRT.js +2017 -0
  28. package/dist/chunk-QGEITHUP.js +395 -0
  29. package/dist/chunk-QIVCBUYD.js +273 -0
  30. package/dist/chunk-RYFO3ZPO.js +71 -0
  31. package/dist/chunk-RZ4DIJQW.js +68 -0
  32. package/dist/chunk-SAANBZ25.js +118 -0
  33. package/dist/chunk-VFFOT7KD.js +2980 -0
  34. package/dist/chunk-Y552BNFZ.js +41 -0
  35. package/dist/chunk-Z4Z24FWO.js +39 -0
  36. package/dist/chunk-ZI6PKVXG.js +64 -0
  37. package/dist/chunk-ZYCSYJWX.js +87 -0
  38. package/dist/index.js +67 -60
  39. package/package.json +13 -16
  40. package/templates/none/_gitignore +3 -0
  41. package/templates/none/index.html +29 -0
  42. package/templates/none/package.json +16 -0
  43. package/templates/none/src/main.ts +16 -0
  44. package/templates/none/tsconfig.json +18 -0
  45. package/templates/none/vite.config.ts +8 -0
  46. package/templates/phaser/_gitignore +3 -0
  47. package/templates/phaser/index.html +24 -0
  48. package/templates/phaser/package.json +19 -0
  49. package/templates/phaser/src/main.ts +16 -0
  50. package/templates/phaser/src/scenes/game-scene.ts +65 -0
  51. package/templates/phaser/tsconfig.json +18 -0
  52. package/templates/phaser/vite.config.ts +8 -0
  53. package/templates/react-r3f/_gitignore +3 -0
  54. package/templates/react-r3f/index.html +24 -0
  55. package/templates/react-r3f/package.json +27 -0
  56. package/templates/react-r3f/src/app.tsx +33 -0
  57. package/templates/react-r3f/src/main.tsx +15 -0
  58. package/templates/react-r3f/tsconfig.json +19 -0
  59. package/templates/react-r3f/vite.config.ts +10 -0
  60. package/templates/threejs/_gitignore +3 -0
  61. package/templates/threejs/index.html +36 -0
  62. package/templates/threejs/package.json +20 -0
  63. package/templates/threejs/src/main.ts +44 -0
  64. package/templates/threejs/tsconfig.json +18 -0
  65. package/templates/threejs/vite.config.ts +8 -0
  66. package/dist/commands/completions.d.ts +0 -7
  67. package/dist/commands/completions.js +0 -145
  68. package/dist/commands/credits.d.ts +0 -10
  69. package/dist/commands/credits.js +0 -136
  70. package/dist/commands/deploy.d.ts +0 -26
  71. package/dist/commands/deploy.js +0 -257
  72. package/dist/commands/factory.d.ts +0 -3
  73. package/dist/commands/factory.js +0 -73
  74. package/dist/commands/fork.d.ts +0 -29
  75. package/dist/commands/fork.js +0 -124
  76. package/dist/commands/generate.d.ts +0 -1
  77. package/dist/commands/generate.js +0 -565
  78. package/dist/commands/init.d.ts +0 -20
  79. package/dist/commands/init.js +0 -105
  80. package/dist/commands/login.d.ts +0 -1
  81. package/dist/commands/login.js +0 -45
  82. package/dist/commands/logout.d.ts +0 -1
  83. package/dist/commands/logout.js +0 -13
  84. package/dist/commands/new.d.ts +0 -26
  85. package/dist/commands/new.js +0 -318
  86. package/dist/commands/playtest-run.d.ts +0 -66
  87. package/dist/commands/playtest-run.js +0 -268
  88. package/dist/commands/playtest.d.ts +0 -76
  89. package/dist/commands/playtest.js +0 -372
  90. package/dist/commands/update.d.ts +0 -13
  91. package/dist/commands/update.js +0 -82
  92. package/dist/commands/whoami.d.ts +0 -10
  93. package/dist/commands/whoami.js +0 -44
  94. package/dist/index.d.ts +0 -2
  95. package/dist/lib/api.d.ts +0 -18
  96. package/dist/lib/api.js +0 -27
  97. package/dist/lib/archive.d.ts +0 -17
  98. package/dist/lib/archive.js +0 -228
  99. package/dist/lib/codex.d.ts +0 -117
  100. package/dist/lib/codex.js +0 -426
  101. package/dist/lib/config-file.d.ts +0 -16
  102. package/dist/lib/config-file.js +0 -54
  103. package/dist/lib/config.d.ts +0 -11
  104. package/dist/lib/config.js +0 -54
  105. package/dist/lib/manifest.d.ts +0 -10
  106. package/dist/lib/manifest.js +0 -91
  107. package/dist/lib/media-args.d.ts +0 -30
  108. package/dist/lib/media-args.js +0 -219
  109. package/dist/lib/media-download.d.ts +0 -37
  110. package/dist/lib/media-download.js +0 -268
  111. package/dist/lib/media-poll.d.ts +0 -18
  112. package/dist/lib/media-poll.js +0 -86
  113. package/dist/lib/media-upload.d.ts +0 -12
  114. package/dist/lib/media-upload.js +0 -52
  115. package/dist/lib/output.d.ts +0 -68
  116. package/dist/lib/output.js +0 -102
  117. package/dist/lib/package-manager.d.ts +0 -25
  118. package/dist/lib/package-manager.js +0 -77
  119. package/dist/lib/playtest/agent.d.ts +0 -192
  120. package/dist/lib/playtest/agent.js +0 -652
  121. package/dist/lib/playtest/browser.d.ts +0 -109
  122. package/dist/lib/playtest/browser.js +0 -219
  123. package/dist/lib/playtest/controls.d.ts +0 -47
  124. package/dist/lib/playtest/controls.js +0 -218
  125. package/dist/lib/playtest/errors.d.ts +0 -9
  126. package/dist/lib/playtest/errors.js +0 -12
  127. package/dist/lib/playtest/keys.d.ts +0 -41
  128. package/dist/lib/playtest/keys.js +0 -157
  129. package/dist/lib/playtest/run.d.ts +0 -195
  130. package/dist/lib/playtest/run.js +0 -409
  131. package/dist/lib/run.d.ts +0 -19
  132. package/dist/lib/run.js +0 -23
  133. package/dist/lib/strict-args.d.ts +0 -27
  134. package/dist/lib/strict-args.js +0 -78
  135. package/dist/lib/types.d.ts +0 -16
  136. package/dist/lib/types.js +0 -10
  137. package/dist/lib/update.d.ts +0 -10
  138. package/dist/lib/update.js +0 -110
  139. package/dist/lib/upload.d.ts +0 -16
  140. package/dist/lib/upload.js +0 -41
package/README.md CHANGED
@@ -16,14 +16,15 @@ npm i -g vibedgames
16
16
  ## Commands
17
17
 
18
18
  ```sh
19
- vg new <slug> # scaffold a Phaser 4 + Vite + TS game (official template)
19
+ vg new <slug> # scaffold a Phaser 4 + Vite + TS game
20
20
  vg new <slug> --engine threejs # scaffold a Three.js + Vite + TS starter
21
21
  vg new <slug> --engine react-r3f # scaffold a React + R3F + drei + Vite + TS starter
22
- vg new <slug> --engine none # minimal Vite + TS + canvas (offline; inline)
23
- vg new <slug> --template owner/repo # any github degit spec
22
+ vg new <slug> --engine none # minimal Vite + TS + canvas
23
+ vg new <slug> --template owner/repo # a third-party GitHub template instead (owner/repo[/sub/dir][#ref])
24
24
  vg new <slug> --here # scaffold into the current directory
25
- vg init [--global] [--agents …] # install/update the vibedgames skills + CLI
25
+ vg init [--global] [--agent …] # install/update the vibedgames skills + CLI
26
26
  vg update # update the CLI and installed skills to latest
27
+ vg config [list|get|set|unset] # saved settings, e.g. vg config set generate.provider codex
27
28
  vg login # authenticate via browser
28
29
  vg logout # clear credentials
29
30
  vg whoami # show current user
@@ -48,11 +49,15 @@ bare URL, ready for `$(...)` capture, so no JSON processor is needed. The path i
48
49
  dotted, takes `images[0]` or `images.0`, and counts negative indices from the
49
50
  end; a path that doesn't resolve is an error rather than an empty line.
50
51
 
51
- `vg init` shells out to `npx skills add kyh/vibedgames` and installs for Claude
52
- Code, Cursor and Codex by default (symlinked from a shared `.agents/skills/`);
53
- `--agents` narrows or widens that, `--global` targets the user directory instead
54
- of the project. `vg update` runs automatically once a day — disable with
55
- `VG_NO_AUTO_UPDATE=1`.
52
+ `vg init` downloads the skills from `kyh/vibedgames-plugins` and installs one copy
53
+ of each in `.agents/skills/`, which Codex, Cursor and most other agents read
54
+ directly; Claude Code (and agents with a skills dir of their own) gets a symlink
55
+ per skill. `--agent` narrows or widens the set (`'*'` for every supported agent),
56
+ `--global` targets your home directory instead of the project. Re-running it, or
57
+ `vg update`, refreshes the skills and removes any dropped upstream. Nothing but
58
+ the download leaves your machine. `VG_SKILLS_SOURCE` points it at a local checkout
59
+ (any directory with the same `plugins/` layout) instead. `vg update` runs
60
+ automatically once a day — turn that off with `vg config set update.auto false`.
56
61
 
57
62
  Both self-update with whichever package manager installed the CLI, detected
58
63
  from its install path (npm, pnpm, yarn or bun) — installing with a different
@@ -0,0 +1,383 @@
1
+ The vg CLI bundles the packages below; each one's licence follows its name.
2
+
3
+ ========================================================================
4
+ @orpc/client@2.0.0-beta.42 (MIT)
5
+ ========================================================================
6
+
7
+ MIT License
8
+
9
+ Copyright (c) 2023 oRPC
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
28
+
29
+ ========================================================================
30
+ @orpc/shared@2.0.0-beta.42 (MIT)
31
+ ========================================================================
32
+
33
+ MIT License
34
+
35
+ Copyright (c) 2023 oRPC
36
+
37
+ Permission is hereby granted, free of charge, to any person obtaining a copy
38
+ of this software and associated documentation files (the "Software"), to deal
39
+ in the Software without restriction, including without limitation the rights
40
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
41
+ copies of the Software, and to permit persons to whom the Software is
42
+ furnished to do so, subject to the following conditions:
43
+
44
+ The above copyright notice and this permission notice shall be included in all
45
+ copies or substantial portions of the Software.
46
+
47
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
48
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
49
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
50
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
51
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
52
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
53
+ SOFTWARE.
54
+
55
+ ========================================================================
56
+ @standard-server/core@0.10.1 (MIT)
57
+ ========================================================================
58
+
59
+ MIT License
60
+
61
+ Copyright (c) 2025 Standard Server
62
+
63
+ Permission is hereby granted, free of charge, to any person obtaining a copy
64
+ of this software and associated documentation files (the "Software"), to deal
65
+ in the Software without restriction, including without limitation the rights
66
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
67
+ copies of the Software, and to permit persons to whom the Software is
68
+ furnished to do so, subject to the following conditions:
69
+
70
+ The above copyright notice and this permission notice shall be included in all
71
+ copies or substantial portions of the Software.
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
75
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
76
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
77
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
78
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
79
+ SOFTWARE.
80
+
81
+ ========================================================================
82
+ @standard-server/fetch@0.10.1 (MIT)
83
+ ========================================================================
84
+
85
+ MIT License
86
+
87
+ Copyright (c) 2025 Standard Server
88
+
89
+ Permission is hereby granted, free of charge, to any person obtaining a copy
90
+ of this software and associated documentation files (the "Software"), to deal
91
+ in the Software without restriction, including without limitation the rights
92
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
93
+ copies of the Software, and to permit persons to whom the Software is
94
+ furnished to do so, subject to the following conditions:
95
+
96
+ The above copyright notice and this permission notice shall be included in all
97
+ copies or substantial portions of the Software.
98
+
99
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
100
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
101
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
102
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
103
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
104
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
105
+ SOFTWARE.
106
+
107
+ ========================================================================
108
+ @standard-server/shared@0.10.1 (MIT)
109
+ ========================================================================
110
+
111
+ MIT License
112
+
113
+ Copyright (c) 2025 Standard Server
114
+
115
+ Permission is hereby granted, free of charge, to any person obtaining a copy
116
+ of this software and associated documentation files (the "Software"), to deal
117
+ in the Software without restriction, including without limitation the rights
118
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
119
+ copies of the Software, and to permit persons to whom the Software is
120
+ furnished to do so, subject to the following conditions:
121
+
122
+ The above copyright notice and this permission notice shall be included in all
123
+ copies or substantial portions of the Software.
124
+
125
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
126
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
127
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
128
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
129
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
130
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
131
+ SOFTWARE.
132
+
133
+ ========================================================================
134
+ citty@0.2.2 (MIT)
135
+ ========================================================================
136
+
137
+ MIT License
138
+
139
+ Copyright (c) Pooya Parsa <pooya@pi0.io>
140
+
141
+ Permission is hereby granted, free of charge, to any person obtaining a copy
142
+ of this software and associated documentation files (the "Software"), to deal
143
+ in the Software without restriction, including without limitation the rights
144
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
145
+ copies of the Software, and to permit persons to whom the Software is
146
+ furnished to do so, subject to the following conditions:
147
+
148
+ The above copyright notice and this permission notice shall be included in all
149
+ copies or substantial portions of the Software.
150
+
151
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
152
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
153
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
154
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
155
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
156
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
157
+ SOFTWARE.
158
+
159
+ ========================================================================
160
+ consola@3.4.2 (MIT)
161
+ ========================================================================
162
+
163
+ MIT License
164
+
165
+ Copyright (c) Pooya Parsa <pooya@pi0.io>
166
+
167
+ Permission is hereby granted, free of charge, to any person obtaining a copy
168
+ of this software and associated documentation files (the "Software"), to deal
169
+ in the Software without restriction, including without limitation the rights
170
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
171
+ copies of the Software, and to permit persons to whom the Software is
172
+ furnished to do so, subject to the following conditions:
173
+
174
+ The above copyright notice and this permission notice shall be included in all
175
+ copies or substantial portions of the Software.
176
+
177
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
178
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
179
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
180
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
181
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
182
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
183
+ SOFTWARE.
184
+
185
+ ---
186
+
187
+ Prompt support is based on https://github.com/bombshell-dev/clack
188
+
189
+ MIT License
190
+
191
+ Copyright (c) Nate Moore
192
+
193
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
194
+
195
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
196
+
197
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
198
+
199
+ ---
200
+
201
+ Color support is based on https://github.com/jorgebucaran/colorette
202
+
203
+ Copyright © Jorge Bucaran <https://jorgebucaran.com>
204
+
205
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
206
+
207
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
208
+
209
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
210
+
211
+ ========================================================================
212
+ cross-spawn@7.0.6 (MIT)
213
+ ========================================================================
214
+
215
+ The MIT License (MIT)
216
+
217
+ Copyright (c) 2018 Made With MOXY Lda <hello@moxy.studio>
218
+
219
+ Permission is hereby granted, free of charge, to any person obtaining a copy
220
+ of this software and associated documentation files (the "Software"), to deal
221
+ in the Software without restriction, including without limitation the rights
222
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
223
+ copies of the Software, and to permit persons to whom the Software is
224
+ furnished to do so, subject to the following conditions:
225
+
226
+ The above copyright notice and this permission notice shall be included in
227
+ all copies or substantial portions of the Software.
228
+
229
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
230
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
231
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
232
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
233
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
234
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
235
+ THE SOFTWARE.
236
+
237
+ ========================================================================
238
+ ignore@7.0.12 (MIT)
239
+ ========================================================================
240
+
241
+ Licensed MIT; the package ships no licence file.
242
+
243
+ ========================================================================
244
+ isexe@2.0.0 (ISC)
245
+ ========================================================================
246
+
247
+ The ISC License
248
+
249
+ Copyright (c) Isaac Z. Schlueter and Contributors
250
+
251
+ Permission to use, copy, modify, and/or distribute this software for any
252
+ purpose with or without fee is hereby granted, provided that the above
253
+ copyright notice and this permission notice appear in all copies.
254
+
255
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
256
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
257
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
258
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
259
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
260
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
261
+ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
262
+
263
+ ========================================================================
264
+ path-key@3.1.1 (MIT)
265
+ ========================================================================
266
+
267
+ MIT License
268
+
269
+ Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
270
+
271
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
272
+
273
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
274
+
275
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
276
+
277
+ ========================================================================
278
+ shebang-command@2.0.0 (MIT)
279
+ ========================================================================
280
+
281
+ MIT License
282
+
283
+ Copyright (c) Kevin Mårtensson <kevinmartensson@gmail.com> (github.com/kevva)
284
+
285
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
286
+
287
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
288
+
289
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
290
+
291
+ ========================================================================
292
+ shebang-regex@3.0.0 (MIT)
293
+ ========================================================================
294
+
295
+ MIT License
296
+
297
+ Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
298
+
299
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
300
+
301
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
302
+
303
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
304
+
305
+ ========================================================================
306
+ tar@7.5.22 (BlueOak-1.0.0)
307
+ ========================================================================
308
+
309
+ # Blue Oak Model License
310
+
311
+ Version 1.0.0
312
+
313
+ ## Purpose
314
+
315
+ This license gives everyone as much permission to work with
316
+ this software as possible, while protecting contributors
317
+ from liability.
318
+
319
+ ## Acceptance
320
+
321
+ In order to receive this license, you must agree to its
322
+ rules. The rules of this license are both obligations
323
+ under that agreement and conditions to your license.
324
+ You must not do anything with this software that triggers
325
+ a rule that you cannot or will not follow.
326
+
327
+ ## Copyright
328
+
329
+ Each contributor licenses you to do everything with this
330
+ software that would otherwise infringe that contributor's
331
+ copyright in it.
332
+
333
+ ## Notices
334
+
335
+ You must ensure that everyone who gets a copy of
336
+ any part of this software from you, with or without
337
+ changes, also gets the text of this license or a link to
338
+ <https://blueoakcouncil.org/license/1.0.0>.
339
+
340
+ ## Excuse
341
+
342
+ If anyone notifies you in writing that you have not
343
+ complied with [Notices](#notices), you can keep your
344
+ license by taking all practical steps to comply within 30
345
+ days after the notice. If you do not do so, your license
346
+ ends immediately.
347
+
348
+ ## Patent
349
+
350
+ Each contributor licenses you to do everything with this
351
+ software that would otherwise infringe any patent claims
352
+ they can license or become able to license.
353
+
354
+ ## Reliability
355
+
356
+ No contributor can revoke this license.
357
+
358
+ ## No Liability
359
+
360
+ ***As far as the law allows, this software comes as is,
361
+ without any warranty or condition, and no contributor
362
+ will be liable to anyone for any damages related to this
363
+ software or this license, under any kind of legal claim.***
364
+
365
+ ========================================================================
366
+ which@2.0.2 (ISC)
367
+ ========================================================================
368
+
369
+ The ISC License
370
+
371
+ Copyright (c) Isaac Z. Schlueter and Contributors
372
+
373
+ Permission to use, copy, modify, and/or distribute this software for any
374
+ purpose with or without fee is hereby granted, provided that the above
375
+ copyright notice and this permission notice appear in all copies.
376
+
377
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
378
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
379
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
380
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
381
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
382
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
383
+ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,172 @@
1
+ import { createRequire as __createRequire } from "node:module";
2
+ import { dirname as __pathDirname } from "node:path";
3
+ import { fileURLToPath as __fileURLToPath } from "node:url";
4
+ const require = __createRequire(import.meta.url);
5
+ var __filename = __fileURLToPath(import.meta.url);
6
+ var __dirname = __pathDirname(__filename);
7
+ import {
8
+ SETTINGS,
9
+ SETTING_KEYS,
10
+ isSettingKey,
11
+ removeSetting,
12
+ resolveSetting,
13
+ saveSetting,
14
+ settingsPath,
15
+ validate
16
+ } from "./chunk-6FZPPUQH.js";
17
+ import {
18
+ outputArgs,
19
+ writeStructured
20
+ } from "./chunk-ZYCSYJWX.js";
21
+ import {
22
+ assertKnownFlags
23
+ } from "./chunk-RZ4DIJQW.js";
24
+ import "./chunk-RYFO3ZPO.js";
25
+ import {
26
+ consola
27
+ } from "./chunk-CU7UY5YJ.js";
28
+ import "./chunk-J6PKNPI2.js";
29
+ import {
30
+ defineCommand
31
+ } from "./chunk-MBXCVCC4.js";
32
+ import "./chunk-CAKBGDCY.js";
33
+
34
+ // src/commands/config.ts
35
+ var keyArg = {
36
+ description: `Setting name: ${SETTING_KEYS.join(", ")}.`,
37
+ required: true,
38
+ type: "positional"
39
+ };
40
+ var requireKey = (key) => {
41
+ if (isSettingKey(key)) {
42
+ return key;
43
+ }
44
+ consola.error(`Unknown setting: ${key}. Settings: ${SETTING_KEYS.join(", ")}.`);
45
+ process.exit(1);
46
+ };
47
+ var describeSource = (setting) => {
48
+ if (setting.source === "env") {
49
+ return `from ${SETTINGS[setting.key].env.name}`;
50
+ }
51
+ return setting.source === "config" ? "saved" : "default";
52
+ };
53
+ var warnIfEnvWins = (setting) => {
54
+ if (setting.source === "env") {
55
+ consola.warn(
56
+ `${SETTINGS[setting.key].env.name} is set in this environment, so ${setting.key} is ${setting.value} here.`
57
+ );
58
+ }
59
+ };
60
+ var listArgs = { ...outputArgs };
61
+ var listCommand = defineCommand({
62
+ args: listArgs,
63
+ meta: {
64
+ description: "Show every setting, its value, and where the value comes from.",
65
+ name: "list"
66
+ },
67
+ run: ({ args, rawArgs }) => {
68
+ assertKnownFlags(rawArgs, listArgs);
69
+ const settings = SETTING_KEYS.map((key) => {
70
+ const setting = resolveSetting(key);
71
+ const spec = SETTINGS[key];
72
+ return {
73
+ description: spec.description,
74
+ env: spec.env.name,
75
+ key,
76
+ source: setting.source,
77
+ value: setting.value,
78
+ values: spec.values ? [...spec.values] : null
79
+ };
80
+ });
81
+ if (writeStructured({ path: settingsPath(), settings }, args)) {
82
+ return;
83
+ }
84
+ for (const setting of settings) {
85
+ consola.log(
86
+ `${setting.key} = ${setting.value} (${describeSource(resolveSetting(setting.key))})`
87
+ );
88
+ }
89
+ consola.log(`
90
+ Saved settings live in ${settingsPath()}`);
91
+ }
92
+ });
93
+ var getArgs = { ...outputArgs, key: keyArg };
94
+ var getCommand = defineCommand({
95
+ args: getArgs,
96
+ meta: { description: "Print one setting's effective value.", name: "get" },
97
+ run: ({ args, rawArgs }) => {
98
+ assertKnownFlags(rawArgs, getArgs);
99
+ const setting = resolveSetting(requireKey(args.key));
100
+ if (writeStructured({ key: setting.key, source: setting.source, value: setting.value }, args)) {
101
+ return;
102
+ }
103
+ process.stdout.write(`${setting.value}
104
+ `);
105
+ }
106
+ });
107
+ var setArgs = {
108
+ ...outputArgs,
109
+ key: keyArg,
110
+ value: { description: "The value to save.", required: true, type: "positional" }
111
+ };
112
+ var setCommand = defineCommand({
113
+ args: setArgs,
114
+ meta: {
115
+ description: "Save a setting for every later vg run (e.g. vg config set generate.provider codex).",
116
+ name: "set"
117
+ },
118
+ run: ({ args, rawArgs }) => {
119
+ assertKnownFlags(rawArgs, setArgs);
120
+ const key = requireKey(args.key);
121
+ const value = args.value.trim();
122
+ const problem = validate(key, value);
123
+ if (problem) {
124
+ consola.error(problem);
125
+ process.exit(1);
126
+ }
127
+ saveSetting(key, value);
128
+ const setting = resolveSetting(key);
129
+ if (writeStructured(
130
+ { effective: setting.value, key, path: settingsPath(), source: setting.source, value },
131
+ args
132
+ )) {
133
+ return;
134
+ }
135
+ consola.success(`${key} = ${value}`);
136
+ warnIfEnvWins(setting);
137
+ }
138
+ });
139
+ var unsetArgs = { ...outputArgs, key: keyArg };
140
+ var unsetCommand = defineCommand({
141
+ args: unsetArgs,
142
+ meta: { description: "Remove a saved setting, back to its default.", name: "unset" },
143
+ run: ({ args, rawArgs }) => {
144
+ assertKnownFlags(rawArgs, unsetArgs);
145
+ const key = requireKey(args.key);
146
+ const removed = removeSetting(key);
147
+ const setting = resolveSetting(key);
148
+ if (writeStructured({ key, removed, source: setting.source, value: setting.value }, args)) {
149
+ return;
150
+ }
151
+ consola.success(`${key} = ${setting.value} (${describeSource(setting)})`);
152
+ warnIfEnvWins(setting);
153
+ }
154
+ });
155
+ var configCommand = defineCommand({
156
+ // Declared so citty skips `--field <value>` when looking for a subcommand.
157
+ args: outputArgs,
158
+ default: "list",
159
+ meta: {
160
+ description: "Show and change saved vg settings, e.g. `vg config set generate.provider codex` to send OpenAI image generation through your own Codex plan.",
161
+ name: "config"
162
+ },
163
+ subCommands: {
164
+ get: getCommand,
165
+ list: listCommand,
166
+ set: setCommand,
167
+ unset: unsetCommand
168
+ }
169
+ });
170
+ export {
171
+ configCommand
172
+ };