workos 0.0.23 → 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.
- package/.claude-plugin/plugin.json +13 -0
- package/LICENSE +47 -0
- package/README.md +154 -1
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +163 -0
- package/dist/bin.js.map +1 -0
- package/dist/cli.config.d.ts +52 -0
- package/dist/cli.config.js +70 -0
- package/dist/cli.config.js.map +1 -0
- package/dist/package.json +87 -0
- package/dist/src/commands/install-skill.d.ts +20 -0
- package/dist/src/commands/install-skill.js +130 -0
- package/dist/src/commands/install-skill.js.map +1 -0
- package/dist/src/commands/install.d.ts +22 -0
- package/dist/src/commands/install.js +57 -0
- package/dist/src/commands/install.js.map +1 -0
- package/dist/src/commands/login.d.ts +1 -0
- package/dist/src/commands/login.js +141 -0
- package/dist/src/commands/login.js.map +1 -0
- package/dist/src/commands/logout.d.ts +1 -0
- package/dist/src/commands/logout.js +17 -0
- package/dist/src/commands/logout.js.map +1 -0
- package/dist/src/dashboard/components/AnimatedLogo.d.ts +8 -0
- package/dist/src/dashboard/components/AnimatedLogo.js +16 -0
- package/dist/src/dashboard/components/AnimatedLogo.js.map +1 -0
- package/dist/src/dashboard/components/CompletionView.d.ts +13 -0
- package/dist/src/dashboard/components/CompletionView.js +21 -0
- package/dist/src/dashboard/components/CompletionView.js.map +1 -0
- package/dist/src/dashboard/components/ConfirmPrompt.d.ts +9 -0
- package/dist/src/dashboard/components/ConfirmPrompt.js +25 -0
- package/dist/src/dashboard/components/ConfirmPrompt.js.map +1 -0
- package/dist/src/dashboard/components/CredentialsForm.d.ts +10 -0
- package/dist/src/dashboard/components/CredentialsForm.js +47 -0
- package/dist/src/dashboard/components/CredentialsForm.js.map +1 -0
- package/dist/src/dashboard/components/Dashboard.d.ts +3 -0
- package/dist/src/dashboard/components/Dashboard.js +100 -0
- package/dist/src/dashboard/components/Dashboard.js.map +1 -0
- package/dist/src/dashboard/components/DashboardLayout.d.ts +24 -0
- package/dist/src/dashboard/components/DashboardLayout.js +25 -0
- package/dist/src/dashboard/components/DashboardLayout.js.map +1 -0
- package/dist/src/dashboard/components/DiffPanel.d.ts +9 -0
- package/dist/src/dashboard/components/DiffPanel.js +136 -0
- package/dist/src/dashboard/components/DiffPanel.js.map +1 -0
- package/dist/src/dashboard/components/InlinePrompt.d.ts +8 -0
- package/dist/src/dashboard/components/InlinePrompt.js +19 -0
- package/dist/src/dashboard/components/InlinePrompt.js.map +1 -0
- package/dist/src/dashboard/components/OutputPanel.d.ts +10 -0
- package/dist/src/dashboard/components/OutputPanel.js +100 -0
- package/dist/src/dashboard/components/OutputPanel.js.map +1 -0
- package/dist/src/dashboard/components/Panel.d.ts +12 -0
- package/dist/src/dashboard/components/Panel.js +6 -0
- package/dist/src/dashboard/components/Panel.js.map +1 -0
- package/dist/src/dashboard/components/TextInput.d.ts +13 -0
- package/dist/src/dashboard/components/TextInput.js +57 -0
- package/dist/src/dashboard/components/TextInput.js.map +1 -0
- package/dist/src/dashboard/components/WelcomeArt.d.ts +2 -0
- package/dist/src/dashboard/components/WelcomeArt.js +9 -0
- package/dist/src/dashboard/components/WelcomeArt.js.map +1 -0
- package/dist/src/dashboard/hooks/useAnimation.d.ts +7 -0
- package/dist/src/dashboard/hooks/useAnimation.js +24 -0
- package/dist/src/dashboard/hooks/useAnimation.js.map +1 -0
- package/dist/src/dashboard/hooks/useKeyboard.d.ts +8 -0
- package/dist/src/dashboard/hooks/useKeyboard.js +18 -0
- package/dist/src/dashboard/hooks/useKeyboard.js.map +1 -0
- package/dist/src/dashboard/hooks/useTerminalSize.d.ts +8 -0
- package/dist/src/dashboard/hooks/useTerminalSize.js +23 -0
- package/dist/src/dashboard/hooks/useTerminalSize.js.map +1 -0
- package/dist/src/dashboard/index.d.ts +6 -0
- package/dist/src/dashboard/index.js +36 -0
- package/dist/src/dashboard/index.js.map +1 -0
- package/dist/src/dashboard/lib/diff-utils.d.ts +21 -0
- package/dist/src/dashboard/lib/diff-utils.js +271 -0
- package/dist/src/dashboard/lib/diff-utils.js.map +1 -0
- package/dist/src/dashboard/lib/logo-frames.d.ts +20 -0
- package/dist/src/dashboard/lib/logo-frames.js +109 -0
- package/dist/src/dashboard/lib/logo-frames.js.map +1 -0
- package/dist/src/dashboard/lib/welcome-art.d.ts +1 -0
- package/dist/src/dashboard/lib/welcome-art.js +5 -0
- package/dist/src/dashboard/lib/welcome-art.js.map +1 -0
- package/dist/src/dashboard/types.d.ts +5 -0
- package/dist/src/dashboard/types.js +2 -0
- package/dist/src/dashboard/types.js.map +1 -0
- package/dist/src/lib/__tests__/test-utils.d.ts +40 -0
- package/dist/src/lib/__tests__/test-utils.js +108 -0
- package/dist/src/lib/__tests__/test-utils.js.map +1 -0
- package/dist/src/lib/adapters/cli-adapter.d.ts +56 -0
- package/dist/src/lib/adapters/cli-adapter.js +318 -0
- package/dist/src/lib/adapters/cli-adapter.js.map +1 -0
- package/dist/src/lib/adapters/dashboard-adapter.d.ts +30 -0
- package/dist/src/lib/adapters/dashboard-adapter.js +97 -0
- package/dist/src/lib/adapters/dashboard-adapter.js.map +1 -0
- package/dist/src/lib/adapters/index.d.ts +3 -0
- package/dist/src/lib/adapters/index.js +3 -0
- package/dist/src/lib/adapters/index.js.map +1 -0
- package/dist/src/lib/adapters/types.d.ts +41 -0
- package/dist/src/lib/adapters/types.js +2 -0
- package/dist/src/lib/adapters/types.js.map +1 -0
- package/dist/src/lib/agent-interface.d.ts +75 -0
- package/dist/src/lib/agent-interface.js +563 -0
- package/dist/src/lib/agent-interface.js.map +1 -0
- package/dist/src/lib/agent-runner.d.ts +9 -0
- package/dist/src/lib/agent-runner.js +213 -0
- package/dist/src/lib/agent-runner.js.map +1 -0
- package/dist/src/lib/api.d.ts +25 -0
- package/dist/src/lib/api.js +120 -0
- package/dist/src/lib/api.js.map +1 -0
- package/dist/src/lib/config.d.ts +60 -0
- package/dist/src/lib/config.js +88 -0
- package/dist/src/lib/config.js.map +1 -0
- package/dist/src/lib/constants.d.ts +32 -0
- package/dist/src/lib/constants.js +53 -0
- package/dist/src/lib/constants.js.map +1 -0
- package/dist/src/lib/credentials.d.ts +19 -0
- package/dist/src/lib/credentials.js +55 -0
- package/dist/src/lib/credentials.js.map +1 -0
- package/dist/src/lib/env-writer.d.ts +14 -0
- package/dist/src/lib/env-writer.js +39 -0
- package/dist/src/lib/env-writer.js.map +1 -0
- package/dist/src/lib/events.d.ts +114 -0
- package/dist/src/lib/events.js +19 -0
- package/dist/src/lib/events.js.map +1 -0
- package/dist/src/lib/framework-config.d.ts +108 -0
- package/dist/src/lib/framework-config.js +11 -0
- package/dist/src/lib/framework-config.js.map +1 -0
- package/dist/src/lib/helper-functions.d.ts +1 -0
- package/dist/src/lib/helper-functions.js +2 -0
- package/dist/src/lib/helper-functions.js.map +1 -0
- package/dist/src/lib/port-detection.d.ts +7 -0
- package/dist/src/lib/port-detection.js +112 -0
- package/dist/src/lib/port-detection.js.map +1 -0
- package/dist/src/lib/progress-tracker.d.ts +22 -0
- package/dist/src/lib/progress-tracker.js +47 -0
- package/dist/src/lib/progress-tracker.js.map +1 -0
- package/dist/src/lib/run-with-core.d.ts +2 -0
- package/dist/src/lib/run-with-core.js +266 -0
- package/dist/src/lib/run-with-core.js.map +1 -0
- package/dist/src/lib/safe-tools.d.ts +2 -0
- package/dist/src/lib/safe-tools.js +212 -0
- package/dist/src/lib/safe-tools.js.map +1 -0
- package/dist/src/lib/settings.d.ts +59 -0
- package/dist/src/lib/settings.js +36 -0
- package/dist/src/lib/settings.js.map +1 -0
- package/dist/src/lib/token-refresh.d.ts +12 -0
- package/dist/src/lib/token-refresh.js +26 -0
- package/dist/src/lib/token-refresh.js.map +1 -0
- package/dist/src/lib/validation/build-validator.d.ts +9 -0
- package/dist/src/lib/validation/build-validator.js +118 -0
- package/dist/src/lib/validation/build-validator.js.map +1 -0
- package/dist/src/lib/validation/index.d.ts +3 -0
- package/dist/src/lib/validation/index.js +3 -0
- package/dist/src/lib/validation/index.js.map +1 -0
- package/dist/src/lib/validation/types.d.ts +41 -0
- package/dist/src/lib/validation/types.js +2 -0
- package/dist/src/lib/validation/types.js.map +1 -0
- package/dist/src/lib/validation/validator.d.ts +6 -0
- package/dist/src/lib/validation/validator.js +647 -0
- package/dist/src/lib/validation/validator.js.map +1 -0
- package/dist/src/lib/wizard-core.d.ts +200 -0
- package/dist/src/lib/wizard-core.js +392 -0
- package/dist/src/lib/wizard-core.js.map +1 -0
- package/dist/src/lib/wizard-core.types.d.ts +73 -0
- package/dist/src/lib/wizard-core.types.js +2 -0
- package/dist/src/lib/wizard-core.types.js.map +1 -0
- package/dist/src/lib/workos-management.d.ts +32 -0
- package/dist/src/lib/workos-management.js +142 -0
- package/dist/src/lib/workos-management.js.map +1 -0
- package/dist/src/nextjs/nextjs-wizard-agent.d.ts +6 -0
- package/dist/src/nextjs/nextjs-wizard-agent.js +97 -0
- package/dist/src/nextjs/nextjs-wizard-agent.js.map +1 -0
- package/dist/src/nextjs/utils.d.ts +8 -0
- package/dist/src/nextjs/utils.js +53 -0
- package/dist/src/nextjs/utils.js.map +1 -0
- package/dist/src/react/react-wizard-agent.d.ts +2 -0
- package/dist/src/react/react-wizard-agent.js +47 -0
- package/dist/src/react/react-wizard-agent.js.map +1 -0
- package/dist/src/react-router/react-router-wizard-agent.d.ts +6 -0
- package/dist/src/react-router/react-router-wizard-agent.js +103 -0
- package/dist/src/react-router/react-router-wizard-agent.js.map +1 -0
- package/dist/src/react-router/utils.d.ts +19 -0
- package/dist/src/react-router/utils.js +210 -0
- package/dist/src/react-router/utils.js.map +1 -0
- package/dist/src/run.d.ts +24 -0
- package/dist/src/run.js +48 -0
- package/dist/src/run.js.map +1 -0
- package/dist/src/steps/add-or-update-environment-variables.d.ts +10 -0
- package/dist/src/steps/add-or-update-environment-variables.js +155 -0
- package/dist/src/steps/add-or-update-environment-variables.js.map +1 -0
- package/dist/src/steps/index.d.ts +3 -0
- package/dist/src/steps/index.js +4 -0
- package/dist/src/steps/index.js.map +1 -0
- package/dist/src/steps/run-prettier.d.ts +5 -0
- package/dist/src/steps/run-prettier.js +54 -0
- package/dist/src/steps/run-prettier.js.map +1 -0
- package/dist/src/steps/upload-environment-variables/EnvironmentProvider.d.ts +8 -0
- package/dist/src/steps/upload-environment-variables/EnvironmentProvider.js +7 -0
- package/dist/src/steps/upload-environment-variables/EnvironmentProvider.js.map +1 -0
- package/dist/src/steps/upload-environment-variables/index.d.ts +6 -0
- package/dist/src/steps/upload-environment-variables/index.js +57 -0
- package/dist/src/steps/upload-environment-variables/index.js.map +1 -0
- package/dist/src/steps/upload-environment-variables/providers/vercel.d.ts +14 -0
- package/dist/src/steps/upload-environment-variables/providers/vercel.js +104 -0
- package/dist/src/steps/upload-environment-variables/providers/vercel.js.map +1 -0
- package/dist/src/tanstack-start/tanstack-start-wizard-agent.d.ts +2 -0
- package/dist/src/tanstack-start/tanstack-start-wizard-agent.js +49 -0
- package/dist/src/tanstack-start/tanstack-start-wizard-agent.js.map +1 -0
- package/dist/src/telemetry.d.ts +2 -0
- package/dist/src/telemetry.js +29 -0
- package/dist/src/telemetry.js.map +1 -0
- package/dist/src/utils/analytics.d.ts +24 -0
- package/dist/src/utils/analytics.js +139 -0
- package/dist/src/utils/analytics.js.map +1 -0
- package/dist/src/utils/bash.d.ts +2 -0
- package/dist/src/utils/bash.js +17 -0
- package/dist/src/utils/bash.js.map +1 -0
- package/dist/src/utils/clack-utils.d.ts +93 -0
- package/dist/src/utils/clack-utils.js +397 -0
- package/dist/src/utils/clack-utils.js.map +1 -0
- package/dist/src/utils/clack.d.ts +5 -0
- package/dist/src/utils/clack.js +34 -0
- package/dist/src/utils/clack.js.map +1 -0
- package/dist/src/utils/cli-symbols.d.ts +32 -0
- package/dist/src/utils/cli-symbols.js +46 -0
- package/dist/src/utils/cli-symbols.js.map +1 -0
- package/dist/src/utils/debug.d.ts +7 -0
- package/dist/src/utils/debug.js +88 -0
- package/dist/src/utils/debug.js.map +1 -0
- package/dist/src/utils/env-parser.d.ts +5 -0
- package/dist/src/utils/env-parser.js +18 -0
- package/dist/src/utils/env-parser.js.map +1 -0
- package/dist/src/utils/environment.d.ts +4 -0
- package/dist/src/utils/environment.js +69 -0
- package/dist/src/utils/environment.js.map +1 -0
- package/dist/src/utils/errors.d.ts +3 -0
- package/dist/src/utils/errors.js +7 -0
- package/dist/src/utils/errors.js.map +1 -0
- package/dist/src/utils/logging.d.ts +9 -0
- package/dist/src/utils/logging.js +36 -0
- package/dist/src/utils/logging.js.map +1 -0
- package/dist/src/utils/package-json.d.ts +25 -0
- package/dist/src/utils/package-json.js +21 -0
- package/dist/src/utils/package-json.js.map +1 -0
- package/dist/src/utils/package-manager.d.ts +21 -0
- package/dist/src/utils/package-manager.js +167 -0
- package/dist/src/utils/package-manager.js.map +1 -0
- package/dist/src/utils/redact.d.ts +5 -0
- package/dist/src/utils/redact.js +29 -0
- package/dist/src/utils/redact.js.map +1 -0
- package/dist/src/utils/semver.d.ts +10 -0
- package/dist/src/utils/semver.js +43 -0
- package/dist/src/utils/semver.js.map +1 -0
- package/dist/src/utils/string.d.ts +1 -0
- package/dist/src/utils/string.js +6 -0
- package/dist/src/utils/string.js.map +1 -0
- package/dist/src/utils/telemetry-client.d.ts +15 -0
- package/dist/src/utils/telemetry-client.js +57 -0
- package/dist/src/utils/telemetry-client.js.map +1 -0
- package/dist/src/utils/telemetry-types.d.ts +51 -0
- package/dist/src/utils/telemetry-types.js +6 -0
- package/dist/src/utils/telemetry-types.js.map +1 -0
- package/dist/src/utils/types.d.ts +80 -0
- package/dist/src/utils/types.js +2 -0
- package/dist/src/utils/types.js.map +1 -0
- package/dist/src/utils/urls.d.ts +7 -0
- package/dist/src/utils/urls.js +8 -0
- package/dist/src/utils/urls.js.map +1 -0
- package/dist/src/utils/vendor/is-unicorn-supported.d.ts +1 -0
- package/dist/src/utils/vendor/is-unicorn-supported.js +21 -0
- package/dist/src/utils/vendor/is-unicorn-supported.js.map +1 -0
- package/dist/src/vanilla-js/vanilla-js-wizard-agent.d.ts +2 -0
- package/dist/src/vanilla-js/vanilla-js-wizard-agent.js +47 -0
- package/dist/src/vanilla-js/vanilla-js-wizard-agent.js.map +1 -0
- package/package.json +76 -84
- package/skills/workos-authkit-base/SKILL.md +113 -0
- package/skills/workos-authkit-nextjs/SKILL.md +115 -0
- package/skills/workos-authkit-react/SKILL.md +91 -0
- package/skills/workos-authkit-react-router/SKILL.md +106 -0
- package/skills/workos-authkit-tanstack-start/SKILL.md +104 -0
- package/skills/workos-authkit-vanilla-js/SKILL.md +81 -0
- package/build/apps/index.js +0 -50
- package/build/apps/slack.js +0 -151
- package/build/cli.js +0 -42
- package/build/config.js +0 -34
- package/build/dev.js +0 -5
- package/build/enable-api-access.png +0 -0
- package/build/groups.js +0 -480
- package/build/index.js +0 -3
- package/build/info.js +0 -69
- package/build/login.js +0 -161
- package/build/main.js +0 -214
- package/build/users.js +0 -402
- package/build/util.js +0 -157
- package/coverage/clover.xml +0 -66
- package/coverage/coverage-final.json +0 -4
- package/coverage/lcov-report/base.css +0 -212
- package/coverage/lcov-report/cli.ts.html +0 -329
- package/coverage/lcov-report/config.ts.html +0 -152
- package/coverage/lcov-report/index.html +0 -119
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -1
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -158
- package/coverage/lcov-report/util.ts.html +0 -350
- package/coverage/lcov.info +0 -121
- package/package-lock.json +0 -7617
- 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
|
-
#
|
|
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
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
|
package/dist/bin.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../bin.ts"],"names":[],"mappings":"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","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>;
|