workos 0.0.24 → 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 (305) hide show
  1. package/.claude-plugin/plugin.json +13 -0
  2. package/LICENSE +47 -0
  3. package/README.md +154 -1
  4. package/dist/bin.d.ts +2 -0
  5. package/dist/bin.js +163 -0
  6. package/dist/bin.js.map +1 -0
  7. package/dist/cli.config.d.ts +52 -0
  8. package/dist/cli.config.js +70 -0
  9. package/dist/cli.config.js.map +1 -0
  10. package/dist/package.json +87 -0
  11. package/dist/src/commands/install-skill.d.ts +20 -0
  12. package/dist/src/commands/install-skill.js +130 -0
  13. package/dist/src/commands/install-skill.js.map +1 -0
  14. package/dist/src/commands/install.d.ts +22 -0
  15. package/dist/src/commands/install.js +57 -0
  16. package/dist/src/commands/install.js.map +1 -0
  17. package/dist/src/commands/login.d.ts +1 -0
  18. package/dist/src/commands/login.js +141 -0
  19. package/dist/src/commands/login.js.map +1 -0
  20. package/dist/src/commands/logout.d.ts +1 -0
  21. package/dist/src/commands/logout.js +17 -0
  22. package/dist/src/commands/logout.js.map +1 -0
  23. package/dist/src/dashboard/components/AnimatedLogo.d.ts +8 -0
  24. package/dist/src/dashboard/components/AnimatedLogo.js +16 -0
  25. package/dist/src/dashboard/components/AnimatedLogo.js.map +1 -0
  26. package/dist/src/dashboard/components/CompletionView.d.ts +13 -0
  27. package/dist/src/dashboard/components/CompletionView.js +21 -0
  28. package/dist/src/dashboard/components/CompletionView.js.map +1 -0
  29. package/dist/src/dashboard/components/ConfirmPrompt.d.ts +9 -0
  30. package/dist/src/dashboard/components/ConfirmPrompt.js +25 -0
  31. package/dist/src/dashboard/components/ConfirmPrompt.js.map +1 -0
  32. package/dist/src/dashboard/components/CredentialsForm.d.ts +10 -0
  33. package/dist/src/dashboard/components/CredentialsForm.js +47 -0
  34. package/dist/src/dashboard/components/CredentialsForm.js.map +1 -0
  35. package/dist/src/dashboard/components/Dashboard.d.ts +3 -0
  36. package/dist/src/dashboard/components/Dashboard.js +100 -0
  37. package/dist/src/dashboard/components/Dashboard.js.map +1 -0
  38. package/dist/src/dashboard/components/DashboardLayout.d.ts +24 -0
  39. package/dist/src/dashboard/components/DashboardLayout.js +25 -0
  40. package/dist/src/dashboard/components/DashboardLayout.js.map +1 -0
  41. package/dist/src/dashboard/components/DiffPanel.d.ts +9 -0
  42. package/dist/src/dashboard/components/DiffPanel.js +136 -0
  43. package/dist/src/dashboard/components/DiffPanel.js.map +1 -0
  44. package/dist/src/dashboard/components/InlinePrompt.d.ts +8 -0
  45. package/dist/src/dashboard/components/InlinePrompt.js +19 -0
  46. package/dist/src/dashboard/components/InlinePrompt.js.map +1 -0
  47. package/dist/src/dashboard/components/OutputPanel.d.ts +10 -0
  48. package/dist/src/dashboard/components/OutputPanel.js +100 -0
  49. package/dist/src/dashboard/components/OutputPanel.js.map +1 -0
  50. package/dist/src/dashboard/components/Panel.d.ts +12 -0
  51. package/dist/src/dashboard/components/Panel.js +6 -0
  52. package/dist/src/dashboard/components/Panel.js.map +1 -0
  53. package/dist/src/dashboard/components/TextInput.d.ts +13 -0
  54. package/dist/src/dashboard/components/TextInput.js +57 -0
  55. package/dist/src/dashboard/components/TextInput.js.map +1 -0
  56. package/dist/src/dashboard/components/WelcomeArt.d.ts +2 -0
  57. package/dist/src/dashboard/components/WelcomeArt.js +9 -0
  58. package/dist/src/dashboard/components/WelcomeArt.js.map +1 -0
  59. package/dist/src/dashboard/hooks/useAnimation.d.ts +7 -0
  60. package/dist/src/dashboard/hooks/useAnimation.js +24 -0
  61. package/dist/src/dashboard/hooks/useAnimation.js.map +1 -0
  62. package/dist/src/dashboard/hooks/useKeyboard.d.ts +8 -0
  63. package/dist/src/dashboard/hooks/useKeyboard.js +18 -0
  64. package/dist/src/dashboard/hooks/useKeyboard.js.map +1 -0
  65. package/dist/src/dashboard/hooks/useTerminalSize.d.ts +8 -0
  66. package/dist/src/dashboard/hooks/useTerminalSize.js +23 -0
  67. package/dist/src/dashboard/hooks/useTerminalSize.js.map +1 -0
  68. package/dist/src/dashboard/index.d.ts +6 -0
  69. package/dist/src/dashboard/index.js +36 -0
  70. package/dist/src/dashboard/index.js.map +1 -0
  71. package/dist/src/dashboard/lib/diff-utils.d.ts +21 -0
  72. package/dist/src/dashboard/lib/diff-utils.js +271 -0
  73. package/dist/src/dashboard/lib/diff-utils.js.map +1 -0
  74. package/dist/src/dashboard/lib/logo-frames.d.ts +20 -0
  75. package/dist/src/dashboard/lib/logo-frames.js +109 -0
  76. package/dist/src/dashboard/lib/logo-frames.js.map +1 -0
  77. package/dist/src/dashboard/lib/welcome-art.d.ts +1 -0
  78. package/dist/src/dashboard/lib/welcome-art.js +5 -0
  79. package/dist/src/dashboard/lib/welcome-art.js.map +1 -0
  80. package/dist/src/dashboard/types.d.ts +5 -0
  81. package/dist/src/dashboard/types.js +2 -0
  82. package/dist/src/dashboard/types.js.map +1 -0
  83. package/dist/src/lib/__tests__/test-utils.d.ts +40 -0
  84. package/dist/src/lib/__tests__/test-utils.js +108 -0
  85. package/dist/src/lib/__tests__/test-utils.js.map +1 -0
  86. package/dist/src/lib/adapters/cli-adapter.d.ts +56 -0
  87. package/dist/src/lib/adapters/cli-adapter.js +318 -0
  88. package/dist/src/lib/adapters/cli-adapter.js.map +1 -0
  89. package/dist/src/lib/adapters/dashboard-adapter.d.ts +30 -0
  90. package/dist/src/lib/adapters/dashboard-adapter.js +97 -0
  91. package/dist/src/lib/adapters/dashboard-adapter.js.map +1 -0
  92. package/dist/src/lib/adapters/index.d.ts +3 -0
  93. package/dist/src/lib/adapters/index.js +3 -0
  94. package/dist/src/lib/adapters/index.js.map +1 -0
  95. package/dist/src/lib/adapters/types.d.ts +41 -0
  96. package/dist/src/lib/adapters/types.js +2 -0
  97. package/dist/src/lib/adapters/types.js.map +1 -0
  98. package/dist/src/lib/agent-interface.d.ts +75 -0
  99. package/dist/src/lib/agent-interface.js +563 -0
  100. package/dist/src/lib/agent-interface.js.map +1 -0
  101. package/dist/src/lib/agent-runner.d.ts +9 -0
  102. package/dist/src/lib/agent-runner.js +213 -0
  103. package/dist/src/lib/agent-runner.js.map +1 -0
  104. package/dist/src/lib/api.d.ts +25 -0
  105. package/dist/src/lib/api.js +120 -0
  106. package/dist/src/lib/api.js.map +1 -0
  107. package/dist/src/lib/config.d.ts +60 -0
  108. package/dist/src/lib/config.js +88 -0
  109. package/dist/src/lib/config.js.map +1 -0
  110. package/dist/src/lib/constants.d.ts +32 -0
  111. package/dist/src/lib/constants.js +53 -0
  112. package/dist/src/lib/constants.js.map +1 -0
  113. package/dist/src/lib/credentials.d.ts +19 -0
  114. package/dist/src/lib/credentials.js +55 -0
  115. package/dist/src/lib/credentials.js.map +1 -0
  116. package/dist/src/lib/env-writer.d.ts +14 -0
  117. package/dist/src/lib/env-writer.js +39 -0
  118. package/dist/src/lib/env-writer.js.map +1 -0
  119. package/dist/src/lib/events.d.ts +114 -0
  120. package/dist/src/lib/events.js +19 -0
  121. package/dist/src/lib/events.js.map +1 -0
  122. package/dist/src/lib/framework-config.d.ts +108 -0
  123. package/dist/src/lib/framework-config.js +11 -0
  124. package/dist/src/lib/framework-config.js.map +1 -0
  125. package/dist/src/lib/helper-functions.d.ts +1 -0
  126. package/dist/src/lib/helper-functions.js +2 -0
  127. package/dist/src/lib/helper-functions.js.map +1 -0
  128. package/dist/src/lib/port-detection.d.ts +7 -0
  129. package/dist/src/lib/port-detection.js +112 -0
  130. package/dist/src/lib/port-detection.js.map +1 -0
  131. package/dist/src/lib/progress-tracker.d.ts +22 -0
  132. package/dist/src/lib/progress-tracker.js +47 -0
  133. package/dist/src/lib/progress-tracker.js.map +1 -0
  134. package/dist/src/lib/run-with-core.d.ts +2 -0
  135. package/dist/src/lib/run-with-core.js +266 -0
  136. package/dist/src/lib/run-with-core.js.map +1 -0
  137. package/dist/src/lib/safe-tools.d.ts +2 -0
  138. package/dist/src/lib/safe-tools.js +212 -0
  139. package/dist/src/lib/safe-tools.js.map +1 -0
  140. package/dist/src/lib/settings.d.ts +59 -0
  141. package/dist/src/lib/settings.js +36 -0
  142. package/dist/src/lib/settings.js.map +1 -0
  143. package/dist/src/lib/token-refresh.d.ts +12 -0
  144. package/dist/src/lib/token-refresh.js +26 -0
  145. package/dist/src/lib/token-refresh.js.map +1 -0
  146. package/dist/src/lib/validation/build-validator.d.ts +9 -0
  147. package/dist/src/lib/validation/build-validator.js +118 -0
  148. package/dist/src/lib/validation/build-validator.js.map +1 -0
  149. package/dist/src/lib/validation/index.d.ts +3 -0
  150. package/dist/src/lib/validation/index.js +3 -0
  151. package/dist/src/lib/validation/index.js.map +1 -0
  152. package/dist/src/lib/validation/types.d.ts +41 -0
  153. package/dist/src/lib/validation/types.js +2 -0
  154. package/dist/src/lib/validation/types.js.map +1 -0
  155. package/dist/src/lib/validation/validator.d.ts +6 -0
  156. package/dist/src/lib/validation/validator.js +647 -0
  157. package/dist/src/lib/validation/validator.js.map +1 -0
  158. package/dist/src/lib/wizard-core.d.ts +200 -0
  159. package/dist/src/lib/wizard-core.js +392 -0
  160. package/dist/src/lib/wizard-core.js.map +1 -0
  161. package/dist/src/lib/wizard-core.types.d.ts +73 -0
  162. package/dist/src/lib/wizard-core.types.js +2 -0
  163. package/dist/src/lib/wizard-core.types.js.map +1 -0
  164. package/dist/src/lib/workos-management.d.ts +32 -0
  165. package/dist/src/lib/workos-management.js +142 -0
  166. package/dist/src/lib/workos-management.js.map +1 -0
  167. package/dist/src/nextjs/nextjs-wizard-agent.d.ts +6 -0
  168. package/dist/src/nextjs/nextjs-wizard-agent.js +97 -0
  169. package/dist/src/nextjs/nextjs-wizard-agent.js.map +1 -0
  170. package/dist/src/nextjs/utils.d.ts +8 -0
  171. package/dist/src/nextjs/utils.js +53 -0
  172. package/dist/src/nextjs/utils.js.map +1 -0
  173. package/dist/src/react/react-wizard-agent.d.ts +2 -0
  174. package/dist/src/react/react-wizard-agent.js +47 -0
  175. package/dist/src/react/react-wizard-agent.js.map +1 -0
  176. package/dist/src/react-router/react-router-wizard-agent.d.ts +6 -0
  177. package/dist/src/react-router/react-router-wizard-agent.js +103 -0
  178. package/dist/src/react-router/react-router-wizard-agent.js.map +1 -0
  179. package/dist/src/react-router/utils.d.ts +19 -0
  180. package/dist/src/react-router/utils.js +210 -0
  181. package/dist/src/react-router/utils.js.map +1 -0
  182. package/dist/src/run.d.ts +24 -0
  183. package/dist/src/run.js +48 -0
  184. package/dist/src/run.js.map +1 -0
  185. package/dist/src/steps/add-or-update-environment-variables.d.ts +10 -0
  186. package/dist/src/steps/add-or-update-environment-variables.js +155 -0
  187. package/dist/src/steps/add-or-update-environment-variables.js.map +1 -0
  188. package/dist/src/steps/index.d.ts +3 -0
  189. package/dist/src/steps/index.js +4 -0
  190. package/dist/src/steps/index.js.map +1 -0
  191. package/dist/src/steps/run-prettier.d.ts +5 -0
  192. package/dist/src/steps/run-prettier.js +54 -0
  193. package/dist/src/steps/run-prettier.js.map +1 -0
  194. package/dist/src/steps/upload-environment-variables/EnvironmentProvider.d.ts +8 -0
  195. package/dist/src/steps/upload-environment-variables/EnvironmentProvider.js +7 -0
  196. package/dist/src/steps/upload-environment-variables/EnvironmentProvider.js.map +1 -0
  197. package/dist/src/steps/upload-environment-variables/index.d.ts +6 -0
  198. package/dist/src/steps/upload-environment-variables/index.js +57 -0
  199. package/dist/src/steps/upload-environment-variables/index.js.map +1 -0
  200. package/dist/src/steps/upload-environment-variables/providers/vercel.d.ts +14 -0
  201. package/dist/src/steps/upload-environment-variables/providers/vercel.js +104 -0
  202. package/dist/src/steps/upload-environment-variables/providers/vercel.js.map +1 -0
  203. package/dist/src/tanstack-start/tanstack-start-wizard-agent.d.ts +2 -0
  204. package/dist/src/tanstack-start/tanstack-start-wizard-agent.js +49 -0
  205. package/dist/src/tanstack-start/tanstack-start-wizard-agent.js.map +1 -0
  206. package/dist/src/telemetry.d.ts +2 -0
  207. package/dist/src/telemetry.js +29 -0
  208. package/dist/src/telemetry.js.map +1 -0
  209. package/dist/src/utils/analytics.d.ts +24 -0
  210. package/dist/src/utils/analytics.js +139 -0
  211. package/dist/src/utils/analytics.js.map +1 -0
  212. package/dist/src/utils/bash.d.ts +2 -0
  213. package/dist/src/utils/bash.js +17 -0
  214. package/dist/src/utils/bash.js.map +1 -0
  215. package/dist/src/utils/clack-utils.d.ts +93 -0
  216. package/dist/src/utils/clack-utils.js +397 -0
  217. package/dist/src/utils/clack-utils.js.map +1 -0
  218. package/dist/src/utils/clack.d.ts +5 -0
  219. package/dist/src/utils/clack.js +34 -0
  220. package/dist/src/utils/clack.js.map +1 -0
  221. package/dist/src/utils/cli-symbols.d.ts +32 -0
  222. package/dist/src/utils/cli-symbols.js +46 -0
  223. package/dist/src/utils/cli-symbols.js.map +1 -0
  224. package/dist/src/utils/debug.d.ts +7 -0
  225. package/dist/src/utils/debug.js +88 -0
  226. package/dist/src/utils/debug.js.map +1 -0
  227. package/dist/src/utils/env-parser.d.ts +5 -0
  228. package/dist/src/utils/env-parser.js +18 -0
  229. package/dist/src/utils/env-parser.js.map +1 -0
  230. package/dist/src/utils/environment.d.ts +4 -0
  231. package/dist/src/utils/environment.js +69 -0
  232. package/dist/src/utils/environment.js.map +1 -0
  233. package/dist/src/utils/errors.d.ts +3 -0
  234. package/dist/src/utils/errors.js +7 -0
  235. package/dist/src/utils/errors.js.map +1 -0
  236. package/dist/src/utils/logging.d.ts +9 -0
  237. package/dist/src/utils/logging.js +36 -0
  238. package/dist/src/utils/logging.js.map +1 -0
  239. package/dist/src/utils/package-json.d.ts +25 -0
  240. package/dist/src/utils/package-json.js +21 -0
  241. package/dist/src/utils/package-json.js.map +1 -0
  242. package/dist/src/utils/package-manager.d.ts +21 -0
  243. package/dist/src/utils/package-manager.js +167 -0
  244. package/dist/src/utils/package-manager.js.map +1 -0
  245. package/dist/src/utils/redact.d.ts +5 -0
  246. package/dist/src/utils/redact.js +29 -0
  247. package/dist/src/utils/redact.js.map +1 -0
  248. package/dist/src/utils/semver.d.ts +10 -0
  249. package/dist/src/utils/semver.js +43 -0
  250. package/dist/src/utils/semver.js.map +1 -0
  251. package/dist/src/utils/string.d.ts +1 -0
  252. package/dist/src/utils/string.js +6 -0
  253. package/dist/src/utils/string.js.map +1 -0
  254. package/dist/src/utils/telemetry-client.d.ts +15 -0
  255. package/dist/src/utils/telemetry-client.js +57 -0
  256. package/dist/src/utils/telemetry-client.js.map +1 -0
  257. package/dist/src/utils/telemetry-types.d.ts +51 -0
  258. package/dist/src/utils/telemetry-types.js +6 -0
  259. package/dist/src/utils/telemetry-types.js.map +1 -0
  260. package/dist/src/utils/types.d.ts +80 -0
  261. package/dist/src/utils/types.js +2 -0
  262. package/dist/src/utils/types.js.map +1 -0
  263. package/dist/src/utils/urls.d.ts +7 -0
  264. package/dist/src/utils/urls.js +8 -0
  265. package/dist/src/utils/urls.js.map +1 -0
  266. package/dist/src/utils/vendor/is-unicorn-supported.d.ts +1 -0
  267. package/dist/src/utils/vendor/is-unicorn-supported.js +21 -0
  268. package/dist/src/utils/vendor/is-unicorn-supported.js.map +1 -0
  269. package/dist/src/vanilla-js/vanilla-js-wizard-agent.d.ts +2 -0
  270. package/dist/src/vanilla-js/vanilla-js-wizard-agent.js +47 -0
  271. package/dist/src/vanilla-js/vanilla-js-wizard-agent.js.map +1 -0
  272. package/package.json +76 -84
  273. package/skills/workos-authkit-base/SKILL.md +113 -0
  274. package/skills/workos-authkit-nextjs/SKILL.md +115 -0
  275. package/skills/workos-authkit-react/SKILL.md +91 -0
  276. package/skills/workos-authkit-react-router/SKILL.md +106 -0
  277. package/skills/workos-authkit-tanstack-start/SKILL.md +104 -0
  278. package/skills/workos-authkit-vanilla-js/SKILL.md +81 -0
  279. package/build/apps/index.js +0 -50
  280. package/build/apps/slack.js +0 -151
  281. package/build/cli.js +0 -42
  282. package/build/config.js +0 -34
  283. package/build/dev.js +0 -5
  284. package/build/enable-api-access.png +0 -0
  285. package/build/groups.js +0 -480
  286. package/build/index.js +0 -3
  287. package/build/info.js +0 -69
  288. package/build/login.js +0 -161
  289. package/build/main.js +0 -214
  290. package/build/users.js +0 -402
  291. package/build/util.js +0 -157
  292. package/coverage/clover.xml +0 -66
  293. package/coverage/coverage-final.json +0 -4
  294. package/coverage/lcov-report/base.css +0 -212
  295. package/coverage/lcov-report/cli.ts.html +0 -329
  296. package/coverage/lcov-report/config.ts.html +0 -152
  297. package/coverage/lcov-report/index.html +0 -119
  298. package/coverage/lcov-report/prettify.css +0 -1
  299. package/coverage/lcov-report/prettify.js +0 -1
  300. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  301. package/coverage/lcov-report/sorter.js +0 -158
  302. package/coverage/lcov-report/util.ts.html +0 -350
  303. package/coverage/lcov.info +0 -121
  304. package/package-lock.json +0 -7617
  305. package/tests/util.test.ts +0 -35
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "workos-authkit-wizard",
3
+ "version": "1.0.0",
4
+ "description": "WorkOS AuthKit integration skills for multiple frameworks",
5
+ "author": {
6
+ "name": "WorkOS",
7
+ "url": "https://workos.com"
8
+ },
9
+ "homepage": "https://workos.com/docs/user-management/authkit",
10
+ "repository": "https://github.com/workos/authkit-wizard",
11
+ "license": "MIT",
12
+ "keywords": ["workos", "authkit", "authentication", "wizard"]
13
+ }
package/LICENSE ADDED
@@ -0,0 +1,47 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 WorkOS
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
13
+ all 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.
22
+
23
+ --------------------------------------------------------------------------------
24
+
25
+ Portions of this software are derived from Sentry’s codebase located at https://github.com/getsentry/sentry-wizard and are used under the terms of the MIT License provided below:
26
+
27
+ The MIT License (MIT)
28
+
29
+ Copyright (c) 2017 Sentry
30
+
31
+ Permission is hereby granted, free of charge, to any person obtaining a copy
32
+ of this software and associated documentation files (the "Software"), to deal
33
+ in the Software without restriction, including without limitation the rights
34
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
35
+ copies of the Software, and to permit persons to whom the Software is
36
+ furnished to do so, subject to the following conditions:
37
+
38
+ The above copyright notice and this permission notice shall be included in all
39
+ copies or substantial portions of the Software.
40
+
41
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
42
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
43
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
44
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
45
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
46
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
47
+ SOFTWARE.
package/README.md CHANGED
@@ -1 +1,154 @@
1
- # WorkOS CLI
1
+ # workos
2
+
3
+ AI-powered CLI that automatically integrates WorkOS AuthKit into web applications.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ # Run directly with npx (recommended)
9
+ npx workos
10
+
11
+ # Or install globally
12
+ npm install -g workos
13
+ workos
14
+ ```
15
+
16
+ ## Features
17
+
18
+ - **5 Framework Support:** Next.js, React Router, TanStack Start, React SPA, Vanilla JS
19
+ - **AI-Powered:** Uses Claude to intelligently adapt to your project structure
20
+ - **Security-First:** Masks API keys, redacts from logs, saves to .env.local
21
+ - **Smart Detection:** Auto-detects framework, package manager, router type
22
+ - **Live Documentation:** Fetches latest SDK docs from WorkOS and GitHub
23
+ - **Full Integration:** Creates routes, middleware, environment vars, and UI
24
+
25
+ ## What It Creates
26
+
27
+ Depending on your framework, the wizard creates:
28
+
29
+ - ✅ Authentication routes (callback, sign-in, sign-out)
30
+ - ✅ Middleware for route protection
31
+ - ✅ Environment variable configuration
32
+ - ✅ SDK installation with correct package manager
33
+ - ✅ UI components showing login status
34
+ - ✅ User info display (name, email)
35
+
36
+ ## Credentials
37
+
38
+ Get your credentials from [dashboard.workos.com](https://dashboard.workos.com):
39
+
40
+ - **API Key** (sk_test_xxx or sk_live_xxx) - For server-side frameworks only
41
+ - **Client ID** (client_xxx) - Required for all frameworks
42
+
43
+ **Security:** API keys are masked during input and redacted in logs.
44
+
45
+ ## CLI Options
46
+
47
+ ```bash
48
+ workos [options] [command]
49
+
50
+ Commands:
51
+ dashboard Run with visual TUI dashboard (experimental)
52
+ login Authenticate with WorkOS via Connect OAuth device flow
53
+ logout Remove stored credentials
54
+ install-skill Install AuthKit skills to coding agents (Claude Code, Codex, etc.)
55
+ --list, -l List available skills without installing
56
+ --skill, -s Install specific skill(s)
57
+ --agent, -a Target agent(s): claude-code, codex, cursor, goose
58
+
59
+ Options:
60
+ --integration <name> Framework: nextjs, react, react-router, tanstack-start, vanilla-js
61
+ --redirect-uri <uri> Custom redirect URI (defaults to framework convention)
62
+ --homepage-url <url> Custom homepage URL (defaults to http://localhost:{port})
63
+ --install-dir <path> Installation directory
64
+ --no-validate Skip post-installation validation (includes build check)
65
+ --force-install Force install packages even if peer dependency checks fail
66
+ --debug Enable verbose logging
67
+
68
+ Environment Variables:
69
+ WORKOS_TELEMETRY=false Disable telemetry collection
70
+ ```
71
+
72
+ ## Examples
73
+
74
+ ```bash
75
+ # Interactive (recommended)
76
+ npx workos
77
+
78
+ # Specify framework
79
+ npx workos --integration react-router
80
+
81
+ # With visual dashboard (experimental)
82
+ npx workos dashboard
83
+ ```
84
+
85
+ ## Authentication
86
+
87
+ The CLI uses WorkOS Connect OAuth device flow for authentication:
88
+
89
+ ```bash
90
+ # Login (opens browser for authentication)
91
+ workos login
92
+
93
+ # Logout (clears stored credentials)
94
+ workos logout
95
+ ```
96
+
97
+ Credentials are stored in `~/.workos/credentials.json`. Access tokens are not persisted long-term for security - users re-authenticate when tokens expire.
98
+
99
+ ## How It Works
100
+
101
+ 1. **Detects** your framework and project structure
102
+ 2. **Prompts** for WorkOS credentials (API key masked)
103
+ 3. **Auto-configures** WorkOS dashboard (redirect URI, CORS, homepage URL)
104
+ 4. **Fetches** latest SDK documentation from workos.com
105
+ 5. **Uses AI** (Claude) to generate integration code
106
+ 6. **Installs** SDK with detected package manager
107
+ 7. **Creates** auth routes, middleware, and UI
108
+ 8. **Configures** environment variables securely
109
+
110
+ ## Telemetry
111
+
112
+ The wizard collects anonymous usage telemetry to help improve the product:
113
+
114
+ - Session outcome (success/error/cancelled)
115
+ - Framework detected
116
+ - Duration and step timing
117
+ - Token usage (for capacity planning)
118
+
119
+ No code, credentials, or personal data is collected. Disable with:
120
+
121
+ ```bash
122
+ WORKOS_TELEMETRY=false npx workos
123
+ ```
124
+
125
+ ## Logs
126
+
127
+ Detailed logs (with redacted credentials) are saved to:
128
+
129
+ ```
130
+ ~/.workos/logs/workos-{timestamp}.log
131
+ ```
132
+
133
+ Up to 10 session log files are retained. Use `--debug` flag for verbose terminal output.
134
+
135
+ ## Development
136
+
137
+ See [DEVELOPMENT.md](./DEVELOPMENT.md) for development setup.
138
+
139
+ Build:
140
+
141
+ ```bash
142
+ pnpm build
143
+ ```
144
+
145
+ Run locally:
146
+
147
+ ```bash
148
+ pnpm dev # Watch mode
149
+ ./dist/bin.js --help
150
+ ```
151
+
152
+ ## License
153
+
154
+ MIT © WorkOS
package/dist/bin.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/bin.js ADDED
@@ -0,0 +1,163 @@
1
+ #!/usr/bin/env node
2
+ // Load .env.local for local development when --local flag is used
3
+ if (process.argv.includes('--local') || process.env.WIZARD_DEV) {
4
+ const { config } = await import('dotenv');
5
+ // bin.ts compiles to dist/bin.js, so go up one level to find .env.local
6
+ config({ path: new URL('../.env.local', import.meta.url).pathname });
7
+ }
8
+ import { satisfies } from 'semver';
9
+ import { red } from './src/utils/logging.js';
10
+ import { getConfig } from './src/lib/settings.js';
11
+ import yargs from 'yargs';
12
+ import { hideBin } from 'yargs/helpers';
13
+ const NODE_VERSION_RANGE = getConfig().nodeVersion;
14
+ // Have to run this above the other imports because they are importing clack that
15
+ // has the problematic imports.
16
+ if (!satisfies(process.version, NODE_VERSION_RANGE)) {
17
+ red(`WorkOS AuthKit wizard requires Node.js ${NODE_VERSION_RANGE}. You are using Node.js ${process.version}. Please upgrade your Node.js version.`);
18
+ process.exit(1);
19
+ }
20
+ import { isNonInteractiveEnvironment } from './src/utils/environment.js';
21
+ import clack from './src/utils/clack.js';
22
+ // Shared options for wizard commands (default and dashboard)
23
+ const wizardOptions = {
24
+ debug: {
25
+ default: false,
26
+ describe: 'Enable verbose logging',
27
+ type: 'boolean',
28
+ },
29
+ // Hidden dev/automation flags (use env vars)
30
+ local: {
31
+ default: false,
32
+ type: 'boolean',
33
+ hidden: true,
34
+ },
35
+ ci: {
36
+ default: false,
37
+ type: 'boolean',
38
+ hidden: true,
39
+ },
40
+ 'skip-auth': {
41
+ default: false,
42
+ type: 'boolean',
43
+ hidden: true,
44
+ },
45
+ 'api-key': {
46
+ type: 'string',
47
+ hidden: true,
48
+ },
49
+ 'client-id': {
50
+ type: 'string',
51
+ hidden: true,
52
+ },
53
+ inspect: {
54
+ default: false,
55
+ type: 'boolean',
56
+ hidden: true,
57
+ },
58
+ // User-facing flags
59
+ 'homepage-url': {
60
+ describe: 'App homepage URL for WorkOS (defaults to http://localhost:{port})',
61
+ type: 'string',
62
+ },
63
+ 'redirect-uri': {
64
+ describe: 'Redirect URI for WorkOS callback (defaults to framework convention)',
65
+ type: 'string',
66
+ },
67
+ 'no-validate': {
68
+ default: false,
69
+ describe: 'Skip post-installation validation (includes build check)',
70
+ type: 'boolean',
71
+ },
72
+ 'install-dir': {
73
+ describe: 'Directory to install WorkOS AuthKit in',
74
+ type: 'string',
75
+ },
76
+ integration: {
77
+ describe: 'Integration to set up',
78
+ choices: ['nextjs', 'react', 'tanstack-start', 'react-router', 'vanilla-js'],
79
+ type: 'string',
80
+ },
81
+ 'force-install': {
82
+ default: false,
83
+ describe: 'Force install packages even if peer dependency checks fail',
84
+ type: 'boolean',
85
+ },
86
+ dashboard: {
87
+ alias: 'd',
88
+ default: false,
89
+ describe: 'Run with visual dashboard mode',
90
+ type: 'boolean',
91
+ },
92
+ };
93
+ yargs(hideBin(process.argv))
94
+ .env('WORKOS_WIZARD')
95
+ .command('login', 'Authenticate with WorkOS', {}, async () => {
96
+ const { runLogin } = await import('./src/commands/login.js');
97
+ await runLogin();
98
+ process.exit(0);
99
+ })
100
+ .command('logout', 'Remove stored credentials', {}, async () => {
101
+ const { runLogout } = await import('./src/commands/logout.js');
102
+ await runLogout();
103
+ })
104
+ .command('install-skill', 'Install bundled AuthKit skills to coding agents', (yargs) => {
105
+ return yargs
106
+ .option('list', {
107
+ alias: 'l',
108
+ type: 'boolean',
109
+ description: 'List available skills without installing',
110
+ })
111
+ .option('skill', {
112
+ alias: 's',
113
+ type: 'array',
114
+ string: true,
115
+ description: 'Install specific skill(s)',
116
+ })
117
+ .option('agent', {
118
+ alias: 'a',
119
+ type: 'array',
120
+ string: true,
121
+ description: 'Target specific agent(s): claude-code, codex, cursor, goose',
122
+ });
123
+ }, async (argv) => {
124
+ const { runInstallSkill } = await import('./src/commands/install-skill.js');
125
+ await runInstallSkill({
126
+ list: argv.list,
127
+ skill: argv.skill,
128
+ agent: argv.agent,
129
+ });
130
+ })
131
+ .command('install', 'Install WorkOS AuthKit into your project', (yargs) => yargs.options(wizardOptions), async (argv) => {
132
+ const { handleInstall } = await import('./src/commands/install.js');
133
+ await handleInstall(argv);
134
+ })
135
+ .command('dashboard', false, // hidden from help
136
+ (yargs) => yargs.options(wizardOptions), async (argv) => {
137
+ const { handleInstall } = await import('./src/commands/install.js');
138
+ await handleInstall({ ...argv, dashboard: true });
139
+ })
140
+ .command(['$0'], 'WorkOS AuthKit CLI', (yargs) => yargs, async () => {
141
+ // Non-TTY: show help
142
+ if (isNonInteractiveEnvironment()) {
143
+ yargs(hideBin(process.argv)).showHelp();
144
+ return;
145
+ }
146
+ // TTY: ask if user wants to run installer
147
+ const shouldInstall = await clack.confirm({
148
+ message: 'Run the AuthKit installer?',
149
+ });
150
+ if (clack.isCancel(shouldInstall) || !shouldInstall) {
151
+ process.exit(0);
152
+ }
153
+ const { handleInstall } = await import('./src/commands/install.js');
154
+ await handleInstall({ dashboard: false });
155
+ process.exit(0);
156
+ })
157
+ .strict()
158
+ .help()
159
+ .alias('help', 'h')
160
+ .version()
161
+ .alias('version', 'v')
162
+ .wrap(process.stdout.isTTY && process.stdout.columns ? process.stdout.columns : 80).argv;
163
+ //# sourceMappingURL=bin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.js","sourceRoot":"","sources":["../bin.ts"],"names":[],"mappings":";AAEA,kEAAkE;AAClE,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;IAC/D,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC1C,wEAAwE;IACxE,MAAM,CAAC,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G,CAAC;KACrB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC","sourcesContent":["#!/usr/bin/env node\n\n// Load .env.local for local development when --local flag is used\nif (process.argv.includes('--local') || process.env.WIZARD_DEV) {\n const { config } = await import('dotenv');\n // bin.ts compiles to dist/bin.js, so go up one level to find .env.local\n config({ path: new URL('../.env.local', import.meta.url).pathname });\n}\n\nimport { satisfies } from 'semver';\nimport { red } from './src/utils/logging.js';\nimport { getConfig } from './src/lib/settings.js';\n\nimport yargs from 'yargs';\nimport { hideBin } from 'yargs/helpers';\nimport chalk from 'chalk';\n\nconst NODE_VERSION_RANGE = getConfig().nodeVersion;\n\n// Have to run this above the other imports because they are importing clack that\n// has the problematic imports.\nif (!satisfies(process.version, NODE_VERSION_RANGE)) {\n red(\n `WorkOS AuthKit wizard requires Node.js ${NODE_VERSION_RANGE}. You are using Node.js ${process.version}. Please upgrade your Node.js version.`,\n );\n process.exit(1);\n}\n\nimport { isNonInteractiveEnvironment } from './src/utils/environment.js';\nimport clack from './src/utils/clack.js';\n\n// Shared options for wizard commands (default and dashboard)\nconst wizardOptions = {\n debug: {\n default: false,\n describe: 'Enable verbose logging',\n type: 'boolean' as const,\n },\n // Hidden dev/automation flags (use env vars)\n local: {\n default: false,\n type: 'boolean' as const,\n hidden: true,\n },\n ci: {\n default: false,\n type: 'boolean' as const,\n hidden: true,\n },\n 'skip-auth': {\n default: false,\n type: 'boolean' as const,\n hidden: true,\n },\n 'api-key': {\n type: 'string' as const,\n hidden: true,\n },\n 'client-id': {\n type: 'string' as const,\n hidden: true,\n },\n inspect: {\n default: false,\n type: 'boolean' as const,\n hidden: true,\n },\n // User-facing flags\n 'homepage-url': {\n describe: 'App homepage URL for WorkOS (defaults to http://localhost:{port})',\n type: 'string' as const,\n },\n 'redirect-uri': {\n describe: 'Redirect URI for WorkOS callback (defaults to framework convention)',\n type: 'string' as const,\n },\n 'no-validate': {\n default: false,\n describe: 'Skip post-installation validation (includes build check)',\n type: 'boolean' as const,\n },\n 'install-dir': {\n describe: 'Directory to install WorkOS AuthKit in',\n type: 'string' as const,\n },\n integration: {\n describe: 'Integration to set up',\n choices: ['nextjs', 'react', 'tanstack-start', 'react-router', 'vanilla-js'] as const,\n type: 'string' as const,\n },\n 'force-install': {\n default: false,\n describe: 'Force install packages even if peer dependency checks fail',\n type: 'boolean' as const,\n },\n dashboard: {\n alias: 'd',\n default: false,\n describe: 'Run with visual dashboard mode',\n type: 'boolean' as const,\n },\n};\n\nyargs(hideBin(process.argv))\n .env('WORKOS_WIZARD')\n .command('login', 'Authenticate with WorkOS', {}, async () => {\n const { runLogin } = await import('./src/commands/login.js');\n await runLogin();\n process.exit(0);\n })\n .command('logout', 'Remove stored credentials', {}, async () => {\n const { runLogout } = await import('./src/commands/logout.js');\n await runLogout();\n })\n .command(\n 'install-skill',\n 'Install bundled AuthKit skills to coding agents',\n (yargs) => {\n return yargs\n .option('list', {\n alias: 'l',\n type: 'boolean',\n description: 'List available skills without installing',\n })\n .option('skill', {\n alias: 's',\n type: 'array',\n string: true,\n description: 'Install specific skill(s)',\n })\n .option('agent', {\n alias: 'a',\n type: 'array',\n string: true,\n description: 'Target specific agent(s): claude-code, codex, cursor, goose',\n });\n },\n async (argv) => {\n const { runInstallSkill } = await import('./src/commands/install-skill.js');\n await runInstallSkill({\n list: argv.list as boolean | undefined,\n skill: argv.skill as string[] | undefined,\n agent: argv.agent as string[] | undefined,\n });\n },\n )\n .command(\n 'install',\n 'Install WorkOS AuthKit into your project',\n (yargs) => yargs.options(wizardOptions),\n async (argv) => {\n const { handleInstall } = await import('./src/commands/install.js');\n await handleInstall(argv);\n },\n )\n .command(\n 'dashboard',\n false, // hidden from help\n (yargs) => yargs.options(wizardOptions),\n async (argv) => {\n const { handleInstall } = await import('./src/commands/install.js');\n await handleInstall({ ...argv, dashboard: true });\n },\n )\n .command(\n ['$0'],\n 'WorkOS AuthKit CLI',\n (yargs) => yargs,\n async () => {\n // Non-TTY: show help\n if (isNonInteractiveEnvironment()) {\n yargs(hideBin(process.argv)).showHelp();\n return;\n }\n\n // TTY: ask if user wants to run installer\n const shouldInstall = await clack.confirm({\n message: 'Run the AuthKit installer?',\n });\n\n if (clack.isCancel(shouldInstall) || !shouldInstall) {\n process.exit(0);\n }\n\n const { handleInstall } = await import('./src/commands/install.js');\n await handleInstall({ dashboard: false } as any);\n process.exit(0);\n },\n )\n .strict()\n .help()\n .alias('help', 'h')\n .version()\n .alias('version', 'v')\n .wrap(process.stdout.isTTY && process.stdout.columns ? process.stdout.columns : 80).argv;\n"]}
@@ -0,0 +1,52 @@
1
+ export declare const config: {
2
+ readonly model: "claude-opus-4-5-20251101";
3
+ readonly workos: {
4
+ readonly clientId: "client_01KFKHSZWK9ADVJV854PDFQCCR";
5
+ readonly authkitDomain: "https://signin.workos.com";
6
+ readonly llmGatewayUrl: "https://api.workos.com/llm-gateway";
7
+ };
8
+ readonly telemetry: {
9
+ readonly enabled: true;
10
+ readonly eventName: "wizard interaction";
11
+ };
12
+ readonly nodeVersion: ">=20.20";
13
+ readonly logging: {
14
+ readonly debugMode: false;
15
+ };
16
+ readonly documentation: {
17
+ readonly workosDocsUrl: "https://workos.com/docs/authkit";
18
+ readonly dashboardUrl: "https://dashboard.workos.com";
19
+ readonly issuesUrl: "https://github.com/workos/installer/issues";
20
+ };
21
+ readonly frameworks: {
22
+ readonly nextjs: {
23
+ readonly port: 3000;
24
+ readonly callbackPath: "/auth/callback";
25
+ };
26
+ readonly react: {
27
+ readonly port: 5173;
28
+ readonly callbackPath: "/callback";
29
+ };
30
+ readonly tanstackStart: {
31
+ readonly port: 3000;
32
+ readonly callbackPath: "/api/auth/callback";
33
+ };
34
+ readonly reactRouter: {
35
+ readonly port: 5173;
36
+ readonly callbackPath: "/callback";
37
+ };
38
+ readonly vanillaJs: {
39
+ readonly port: 5173;
40
+ readonly callbackPath: "/callback";
41
+ };
42
+ };
43
+ readonly legacy: {
44
+ readonly oauthPort: 8239;
45
+ };
46
+ readonly branding: {
47
+ readonly showAsciiArt: true;
48
+ readonly useCompact: false;
49
+ readonly compactAsciiArt: "⚡ WorkOS AuthKit Wizard";
50
+ readonly asciiArt: "░██ ░██ ░██ ░██████ ░██████\n░██ ░██ ░██ ░██ ░██ ░██ ░██\n░██ ░██ ░██ ░███████ ░██░████ ░██ ░██░██ ░██ ░██\n░██ ░████ ░██ ░██ ░██ ░███ ░██ ░██ ░██ ░██ ░████████\n░██░██ ░██░██ ░██ ░██ ░██ ░███████ ░██ ░██ ░██\n░████ ░████ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██\n░███ ░███ ░███████ ░██ ░██ ░██ ░██████ ░██████\n\n\n\n ░███ ░██ ░██ ░██ ░██ ░██ ░██\n ░██░██ ░██ ░██ ░██ ░██ ░██\n ░██ ░██ ░██ ░██ ░████████ ░████████ ░██ ░██ ░██░████████\n░█████████ ░██ ░██ ░██ ░██ ░██ ░███████ ░██ ░██\n░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██\n░██ ░██ ░██ ░███ ░██ ░██ ░██ ░██ ░██ ░██ ░██\n░██ ░██ ░█████░██ ░████ ░██ ░██ ░██ ░██ ░██ ░████ ";
51
+ };
52
+ };
@@ -0,0 +1,70 @@
1
+ export const config = {
2
+ model: 'claude-opus-4-5-20251101',
3
+ // Production defaults - override via env vars for local dev
4
+ workos: {
5
+ clientId: 'client_01KFKHSZWK9ADVJV854PDFQCCR',
6
+ authkitDomain: 'https://signin.workos.com',
7
+ llmGatewayUrl: 'https://api.workos.com/llm-gateway',
8
+ },
9
+ telemetry: {
10
+ enabled: true,
11
+ eventName: 'wizard interaction',
12
+ },
13
+ nodeVersion: '>=20.20',
14
+ logging: {
15
+ debugMode: false,
16
+ },
17
+ documentation: {
18
+ workosDocsUrl: 'https://workos.com/docs/authkit',
19
+ dashboardUrl: 'https://dashboard.workos.com',
20
+ issuesUrl: 'https://github.com/workos/installer/issues',
21
+ },
22
+ frameworks: {
23
+ nextjs: {
24
+ port: 3000,
25
+ callbackPath: '/auth/callback',
26
+ },
27
+ react: {
28
+ port: 5173,
29
+ callbackPath: '/callback',
30
+ },
31
+ tanstackStart: {
32
+ port: 3000,
33
+ callbackPath: '/api/auth/callback',
34
+ },
35
+ reactRouter: {
36
+ port: 5173,
37
+ callbackPath: '/callback',
38
+ },
39
+ vanillaJs: {
40
+ port: 5173,
41
+ callbackPath: '/callback',
42
+ },
43
+ },
44
+ legacy: {
45
+ oauthPort: 8239,
46
+ },
47
+ branding: {
48
+ showAsciiArt: true,
49
+ useCompact: false,
50
+ compactAsciiArt: `⚡ WorkOS AuthKit Wizard`,
51
+ asciiArt: `░██ ░██ ░██ ░██████ ░██████
52
+ ░██ ░██ ░██ ░██ ░██ ░██ ░██
53
+ ░██ ░██ ░██ ░███████ ░██░████ ░██ ░██░██ ░██ ░██
54
+ ░██ ░████ ░██ ░██ ░██ ░███ ░██ ░██ ░██ ░██ ░████████
55
+ ░██░██ ░██░██ ░██ ░██ ░██ ░███████ ░██ ░██ ░██
56
+ ░████ ░████ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██
57
+ ░███ ░███ ░███████ ░██ ░██ ░██ ░██████ ░██████
58
+
59
+
60
+
61
+ ░███ ░██ ░██ ░██ ░██ ░██ ░██
62
+ ░██░██ ░██ ░██ ░██ ░██ ░██
63
+ ░██ ░██ ░██ ░██ ░████████ ░████████ ░██ ░██ ░██░████████
64
+ ░█████████ ░██ ░██ ░██ ░██ ░██ ░███████ ░██ ░██
65
+ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██
66
+ ░██ ░██ ░██ ░███ ░██ ░██ ░██ ░██ ░██ ░██ ░██
67
+ ░██ ░██ ░█████░██ ░████ ░██ ░██ ░██ ░██ ░██ ░████ `,
68
+ },
69
+ };
70
+ //# sourceMappingURL=cli.config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.config.js","sourceRoot":"","sources":["../cli.config.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,KAAK,EAAE,0BAA0B;IAEjC,4DAA4D;IAC5D,MAAM,EAAE;QACN,QAAQ,EAAE,mCAAmC;QAC7C,aAAa,EAAE,2BAA2B;QAC1C,aAAa,EAAE,oCAAoC;KACpD;IAED,SAAS,EAAE;QACT,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,oBAAoB;KAChC;IAED,WAAW,EAAE,SAAS;IAEtB,OAAO,EAAE;QACP,SAAS,EAAE,KAAK;KACjB;IAED,aAAa,EAAE;QACb,aAAa,EAAE,iCAAiC;QAChD,YAAY,EAAE,8BAA8B;QAC5C,SAAS,EAAE,4CAA4C;KACxD;IAED,UAAU,EAAE;QACV,MAAM,EAAE;YACN,IAAI,EAAE,IAAI;YACV,YAAY,EAAE,gBAAgB;SAC/B;QACD,KAAK,EAAE;YACL,IAAI,EAAE,IAAI;YACV,YAAY,EAAE,WAAW;SAC1B;QACD,aAAa,EAAE;YACb,IAAI,EAAE,IAAI;YACV,YAAY,EAAE,oBAAoB;SACnC;QACD,WAAW,EAAE;YACX,IAAI,EAAE,IAAI;YACV,YAAY,EAAE,WAAW;SAC1B;QACD,SAAS,EAAE;YACT,IAAI,EAAE,IAAI;YACV,YAAY,EAAE,WAAW;SAC1B;KACF;IAED,MAAM,EAAE;QACN,SAAS,EAAE,IAAI;KAChB;IAED,QAAQ,EAAE;QACR,YAAY,EAAE,IAAI;QAClB,UAAU,EAAE,KAAK;QACjB,eAAe,EAAE,yBAAyB;QAC1C,QAAQ,EAAE;;;;;;;;;;;;;;;;wEAgB0D;KACrE;CACiC,CAAC","sourcesContent":["import type { InstallerConfig } from './src/lib/settings.js';\n\nexport const config = {\n model: 'claude-opus-4-5-20251101',\n\n // Production defaults - override via env vars for local dev\n workos: {\n clientId: 'client_01KFKHSZWK9ADVJV854PDFQCCR',\n authkitDomain: 'https://signin.workos.com',\n llmGatewayUrl: 'https://api.workos.com/llm-gateway',\n },\n\n telemetry: {\n enabled: true,\n eventName: 'wizard interaction',\n },\n\n nodeVersion: '>=20.20',\n\n logging: {\n debugMode: false,\n },\n\n documentation: {\n workosDocsUrl: 'https://workos.com/docs/authkit',\n dashboardUrl: 'https://dashboard.workos.com',\n issuesUrl: 'https://github.com/workos/installer/issues',\n },\n\n frameworks: {\n nextjs: {\n port: 3000,\n callbackPath: '/auth/callback',\n },\n react: {\n port: 5173,\n callbackPath: '/callback',\n },\n tanstackStart: {\n port: 3000,\n callbackPath: '/api/auth/callback',\n },\n reactRouter: {\n port: 5173,\n callbackPath: '/callback',\n },\n vanillaJs: {\n port: 5173,\n callbackPath: '/callback',\n },\n },\n\n legacy: {\n oauthPort: 8239,\n },\n\n branding: {\n showAsciiArt: true,\n useCompact: false,\n compactAsciiArt: `⚡ WorkOS AuthKit Wizard`,\n asciiArt: `░██ ░██ ░██ ░██████ ░██████\n░██ ░██ ░██ ░██ ░██ ░██ ░██\n░██ ░██ ░██ ░███████ ░██░████ ░██ ░██░██ ░██ ░██\n░██ ░████ ░██ ░██ ░██ ░███ ░██ ░██ ░██ ░██ ░████████\n░██░██ ░██░██ ░██ ░██ ░██ ░███████ ░██ ░██ ░██\n░████ ░████ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██\n░███ ░███ ░███████ ░██ ░██ ░██ ░██████ ░██████\n\n\n\n ░███ ░██ ░██ ░██ ░██ ░██ ░██\n ░██░██ ░██ ░██ ░██ ░██ ░██\n ░██ ░██ ░██ ░██ ░████████ ░████████ ░██ ░██ ░██░████████\n░█████████ ░██ ░██ ░██ ░██ ░██ ░███████ ░██ ░██\n░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██\n░██ ░██ ░██ ░███ ░██ ░██ ░██ ░██ ░██ ░██ ░██\n░██ ░██ ░█████░██ ░████ ░██ ░██ ░██ ░██ ░██ ░████ `,\n },\n} as const satisfies InstallerConfig;\n"]}
@@ -0,0 +1,87 @@
1
+ {
2
+ "name": "workos",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "description": "The Official Workos CLI",
6
+ "keywords": [
7
+ "workos",
8
+ "authkit",
9
+ "authentication",
10
+ "wizard",
11
+ "cli",
12
+ "setup",
13
+ "install",
14
+ "oauth",
15
+ "sso"
16
+ ],
17
+ "bin": {
18
+ "workos": "dist/bin.js"
19
+ },
20
+ "publishConfig": {
21
+ "access": "public"
22
+ },
23
+ "files": [
24
+ "dist/bin.*",
25
+ "dist/src",
26
+ "dist/cli.config.*",
27
+ ".claude-plugin",
28
+ "skills",
29
+ "package.json",
30
+ "README.md"
31
+ ],
32
+ "main": "dist/index.js",
33
+ "typings": "dist/index.d.ts",
34
+ "typescript": {
35
+ "definition": "dist/index.d.ts"
36
+ },
37
+ "dependencies": {
38
+ "@anthropic-ai/claude-agent-sdk": "~0.2.19",
39
+ "@clack/core": "^0.5.0",
40
+ "@clack/prompts": "0.11.0",
41
+ "chalk": "^5.6.2",
42
+ "diff": "^8.0.3",
43
+ "fast-glob": "^3.3.3",
44
+ "ink": "^6.6.0",
45
+ "opn": "^5.4.0",
46
+ "react": "^19.2.3",
47
+ "semver": "^7.7.3",
48
+ "uuid": "^13.0.0",
49
+ "xstate": "^5.25.1",
50
+ "yargs": "^18.0.0",
51
+ "zod": "^4.3.5"
52
+ },
53
+ "devDependencies": {
54
+ "@statelyai/inspect": "^0.4.0",
55
+ "@types/node": "~22.19.7",
56
+ "@types/opn": "5.1.0",
57
+ "@types/react": "^19.2.9",
58
+ "@types/semver": "^7.7.1",
59
+ "@types/yargs": "^17.0.35",
60
+ "@vitest/ui": "^4.0.17",
61
+ "dotenv": "^17.2.3",
62
+ "prettier": "^3.8.0",
63
+ "tsx": "^4.20.3",
64
+ "typescript": "^5.9.3",
65
+ "vitest": "^4.0.17"
66
+ },
67
+ "engines": {
68
+ "node": ">=20.20"
69
+ },
70
+ "packageManager": "pnpm@10.23.0+sha512.21c4e5698002ade97e4efe8b8b4a89a8de3c85a37919f957e7a0f30f38fbc5bbdd05980ffe29179b2fb6e6e691242e098d945d1601772cad0fef5fb6411e2a4b",
71
+ "scripts": {
72
+ "clean": "rm -rf ./dist",
73
+ "prebuild": "pnpm clean",
74
+ "build:watch": "pnpm tsc -w",
75
+ "build": "pnpm tsc",
76
+ "postbuild": "chmod +x ./dist/bin.js && cp -r scripts/** dist",
77
+ "lint": "prettier --check \"{lib,src,test}/**/*.ts\"",
78
+ "format": "prettier --write .",
79
+ "try": "tsx dev.ts",
80
+ "dev": "pnpm build && pnpm link --global && pnpm build:watch",
81
+ "test": "vitest run",
82
+ "test:watch": "vitest",
83
+ "typecheck": "tsc --noEmit"
84
+ },
85
+ "author": "WorkOS",
86
+ "license": "MIT"
87
+ }
@@ -0,0 +1,20 @@
1
+ export interface AgentConfig {
2
+ name: string;
3
+ displayName: string;
4
+ globalSkillsDir: string;
5
+ detect: () => boolean;
6
+ }
7
+ export declare function createAgents(home: string): Record<string, AgentConfig>;
8
+ export interface InstallSkillOptions {
9
+ list?: boolean;
10
+ skill?: string[];
11
+ agent?: string[];
12
+ }
13
+ export declare function getSkillsDir(): string;
14
+ export declare function discoverSkills(skillsDir: string): Promise<string[]>;
15
+ export declare function detectAgents(agents: Record<string, AgentConfig>, filter?: string[]): AgentConfig[];
16
+ export declare function installSkill(skillsDir: string, skillName: string, agent: AgentConfig): Promise<{
17
+ success: boolean;
18
+ error?: string;
19
+ }>;
20
+ export declare function runInstallSkill(options: InstallSkillOptions): Promise<void>;