workos 0.15.2 → 0.17.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/README.md +44 -14
- package/dist/bin.js +1449 -1261
- package/dist/bin.js.map +1 -1
- package/dist/cli.config.d.ts +1 -0
- package/dist/cli.config.js +1 -0
- package/dist/cli.config.js.map +1 -1
- package/dist/commands/api/index.js +7 -2
- package/dist/commands/api/index.js.map +1 -1
- package/dist/commands/api/interactive.js +9 -3
- package/dist/commands/api/interactive.js.map +1 -1
- package/dist/commands/debug.d.ts +2 -1
- package/dist/commands/debug.js +43 -3
- package/dist/commands/debug.js.map +1 -1
- package/dist/commands/dev.js +5 -4
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/doctor.js +13 -4
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/emulate.js +2 -2
- package/dist/commands/emulate.js.map +1 -1
- package/dist/commands/env.js +5 -4
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/install-skill.js +4 -3
- package/dist/commands/install-skill.js.map +1 -1
- package/dist/commands/install.js +2 -2
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/login.js +3 -3
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/migrations.d.ts +1 -1
- package/dist/commands/migrations.js +4 -1
- package/dist/commands/migrations.js.map +1 -1
- package/dist/commands/telemetry.d.ts +3 -0
- package/dist/commands/telemetry.js +88 -0
- package/dist/commands/telemetry.js.map +1 -0
- package/dist/commands/uninstall-skill.js +3 -2
- package/dist/commands/uninstall-skill.js.map +1 -1
- package/dist/commands/vault-run.d.ts +13 -0
- package/dist/commands/vault-run.js +194 -0
- package/dist/commands/vault-run.js.map +1 -0
- package/dist/commands/vault.d.ts +3 -2
- package/dist/commands/vault.js +41 -8
- package/dist/commands/vault.js.map +1 -1
- package/dist/lib/adapters/cli-adapter.d.ts +7 -0
- package/dist/lib/adapters/cli-adapter.js +49 -0
- package/dist/lib/adapters/cli-adapter.js.map +1 -1
- package/dist/lib/adapters/dashboard-adapter.d.ts +4 -0
- package/dist/lib/adapters/dashboard-adapter.js +24 -0
- package/dist/lib/adapters/dashboard-adapter.js.map +1 -1
- package/dist/lib/adapters/headless-adapter.d.ts +6 -0
- package/dist/lib/adapters/headless-adapter.js +26 -1
- package/dist/lib/adapters/headless-adapter.js.map +1 -1
- package/dist/lib/api-error-handler.d.ts +15 -3
- package/dist/lib/api-error-handler.js +52 -34
- package/dist/lib/api-error-handler.js.map +1 -1
- package/dist/lib/command-aliases.d.ts +8 -0
- package/dist/lib/command-aliases.js +12 -0
- package/dist/lib/command-aliases.js.map +1 -0
- package/dist/lib/constants.d.ts +0 -1
- package/dist/lib/constants.js +0 -1
- package/dist/lib/constants.js.map +1 -1
- package/dist/lib/device-id.d.ts +25 -0
- package/dist/lib/device-id.js +102 -0
- package/dist/lib/device-id.js.map +1 -0
- package/dist/lib/events.d.ts +15 -0
- package/dist/lib/events.js.map +1 -1
- package/dist/lib/installer-core.d.ts +61 -1
- package/dist/lib/installer-core.js +132 -6
- package/dist/lib/installer-core.js.map +1 -1
- package/dist/lib/installer-core.types.d.ts +24 -0
- package/dist/lib/installer-core.types.js.map +1 -1
- package/dist/lib/preferences.d.ts +101 -0
- package/dist/lib/preferences.js +198 -0
- package/dist/lib/preferences.js.map +1 -0
- package/dist/lib/run-with-core.js +40 -15
- package/dist/lib/run-with-core.js.map +1 -1
- package/dist/lib/scaffold/index.d.ts +1 -0
- package/dist/lib/scaffold/index.js +2 -0
- package/dist/lib/scaffold/index.js.map +1 -0
- package/dist/lib/scaffold/scaffold.d.ts +66 -0
- package/dist/lib/scaffold/scaffold.js +156 -0
- package/dist/lib/scaffold/scaffold.js.map +1 -0
- package/dist/lib/settings.d.ts +6 -0
- package/dist/lib/settings.js +7 -0
- package/dist/lib/settings.js.map +1 -1
- package/dist/lib/telemetry-notice.d.ts +25 -0
- package/dist/lib/telemetry-notice.js +56 -0
- package/dist/lib/telemetry-notice.js.map +1 -0
- package/dist/run.d.ts +2 -2
- package/dist/run.js +2 -1
- package/dist/run.js.map +1 -1
- package/dist/test/force-insecure-storage.d.ts +1 -0
- package/dist/test/force-insecure-storage.js +9 -0
- package/dist/test/force-insecure-storage.js.map +1 -0
- package/dist/test/setup.d.ts +1 -0
- package/dist/test/setup.js +38 -0
- package/dist/test/setup.js.map +1 -0
- package/dist/utils/analytics.d.ts +41 -0
- package/dist/utils/analytics.js +199 -12
- package/dist/utils/analytics.js.map +1 -1
- package/dist/utils/box.d.ts +29 -1
- package/dist/utils/box.js +92 -4
- package/dist/utils/box.js.map +1 -1
- package/dist/utils/cli-exit.d.ts +15 -0
- package/dist/utils/cli-exit.js +11 -0
- package/dist/utils/cli-exit.js.map +1 -0
- package/dist/utils/cli-symbols.d.ts +1 -1
- package/dist/utils/command-telemetry.d.ts +17 -0
- package/dist/utils/command-telemetry.js +67 -0
- package/dist/utils/command-telemetry.js.map +1 -0
- package/dist/utils/crash-reporter.d.ts +13 -0
- package/dist/utils/crash-reporter.js +91 -0
- package/dist/utils/crash-reporter.js.map +1 -0
- package/dist/utils/debug.d.ts +1 -0
- package/dist/utils/debug.js +4 -1
- package/dist/utils/debug.js.map +1 -1
- package/dist/utils/exit-codes.d.ts +5 -0
- package/dist/utils/exit-codes.js +30 -1
- package/dist/utils/exit-codes.js.map +1 -1
- package/dist/utils/help-json.d.ts +6 -0
- package/dist/utils/help-json.js +87 -10
- package/dist/utils/help-json.js.map +1 -1
- package/dist/utils/output.d.ts +7 -2
- package/dist/utils/output.js +9 -2
- package/dist/utils/output.js.map +1 -1
- package/dist/utils/telemetry-client.d.ts +30 -2
- package/dist/utils/telemetry-client.js +122 -12
- package/dist/utils/telemetry-client.js.map +1 -1
- package/dist/utils/telemetry-store-forward.d.ts +11 -0
- package/dist/utils/telemetry-store-forward.js +94 -0
- package/dist/utils/telemetry-store-forward.js.map +1 -0
- package/dist/utils/telemetry-types.d.ts +58 -9
- package/dist/utils/telemetry-types.js.map +1 -1
- package/dist/utils/types.d.ts +10 -4
- package/dist/utils/types.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,6 +23,7 @@ shell command cache.
|
|
|
23
23
|
- **AI-Powered:** Uses Claude to intelligently adapt to your project structure
|
|
24
24
|
- **Security-First:** Masks API keys, redacts from logs, saves to .env.local
|
|
25
25
|
- **Smart Detection:** Auto-detects framework, package manager, router type
|
|
26
|
+
- **Greenfield Scaffolding:** Run in an empty directory to scaffold a new Next.js app (via `create-next-app`) before wiring AuthKit
|
|
26
27
|
- **Live Documentation:** Fetches latest SDK docs from WorkOS and GitHub
|
|
27
28
|
- **Full Integration:** Creates routes, middleware, environment vars, and UI
|
|
28
29
|
- **Agent & CI Ready:** Non-TTY auto-detection, JSON output, structured errors, headless installer with NDJSON streaming
|
|
@@ -81,6 +82,9 @@ Resource Management:
|
|
|
81
82
|
api-key Manage per-org API keys
|
|
82
83
|
org-domain Manage organization domains
|
|
83
84
|
|
|
85
|
+
Migrations:
|
|
86
|
+
migrations Migrate users and SSO connections into WorkOS
|
|
87
|
+
|
|
84
88
|
Workflows:
|
|
85
89
|
seed Declarative resource provisioning from YAML
|
|
86
90
|
setup-org One-shot organization onboarding
|
|
@@ -196,6 +200,27 @@ Inspects a directory's sync state, user/group counts, recent events, and detects
|
|
|
196
200
|
workos debug-sync directory_01ABC123
|
|
197
201
|
```
|
|
198
202
|
|
|
203
|
+
### Migrations
|
|
204
|
+
|
|
205
|
+
Migrate users and SSO connections from other identity providers into WorkOS. The `migrations` namespace passes through to `@workos/migrations`.
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
# Interactive migration wizard
|
|
209
|
+
workos migrations wizard
|
|
210
|
+
|
|
211
|
+
# Export a blank CSV template
|
|
212
|
+
workos migrations export-template saml_connections --output saml_connections.csv
|
|
213
|
+
workos migrations export-template oidc_connections --output oidc_connections.csv
|
|
214
|
+
|
|
215
|
+
# Export from Auth0
|
|
216
|
+
workos migrations export-auth0 --domain your-tenant.auth0.com --client-id <id> --client-secret <secret>
|
|
217
|
+
|
|
218
|
+
# Import users from CSV
|
|
219
|
+
workos migrations import --csv users.csv
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Run `workos migrations --help` for all available subcommands.
|
|
223
|
+
|
|
199
224
|
<!-- UNRELEASED: Local Development (emulator) — hidden until beta testing is complete.
|
|
200
225
|
To restore, uncomment this section and re-enable the `emulate` and `dev` commands
|
|
201
226
|
in src/bin.ts and src/utils/help-json.ts.
|
|
@@ -512,13 +537,14 @@ workos portal generate-link --intent <intent> --org <orgId> [--return-url] [--su
|
|
|
512
537
|
|
|
513
538
|
```bash
|
|
514
539
|
workos vault list [--limit]
|
|
515
|
-
workos vault get <id>
|
|
516
|
-
workos vault get-by-name <name>
|
|
517
|
-
workos vault create --name <name> --
|
|
518
|
-
workos vault update <id> --value <secret> [--version-check]
|
|
540
|
+
workos vault get <id> [--decrypt]
|
|
541
|
+
workos vault get-by-name <name> [--decrypt]
|
|
542
|
+
workos vault create --name <name> --org <orgId> [--value <secret>] # omit --value to read from stdin
|
|
543
|
+
workos vault update <id> [--value <secret>] [--version-check] # omit --value to read from stdin
|
|
519
544
|
workos vault delete <id>
|
|
520
545
|
workos vault describe <id>
|
|
521
546
|
workos vault list-versions <id>
|
|
547
|
+
workos vault run --secret ENV_VAR=vault-name [...] [--env <name>] [--dry-run] -- <command>
|
|
522
548
|
```
|
|
523
549
|
|
|
524
550
|
#### api-key
|
|
@@ -545,12 +571,13 @@ workos org-domain delete <id>
|
|
|
545
571
|
workos install [options]
|
|
546
572
|
|
|
547
573
|
--direct, -D Use your own Anthropic API key (bypass llm-gateway)
|
|
548
|
-
--integration <name> Framework: nextjs, react, react-router, tanstack-start, vanilla-js, sveltekit, node, python, ruby, go, dotnet, kotlin, elixir, php-laravel, php
|
|
549
574
|
--api-key <key> WorkOS API key (required in non-interactive mode)
|
|
550
575
|
--client-id <id> WorkOS client ID (required in non-interactive mode)
|
|
551
576
|
--redirect-uri <uri> Custom redirect URI
|
|
552
577
|
--homepage-url <url> Custom homepage URL
|
|
553
578
|
--install-dir <path> Installation directory
|
|
579
|
+
--scaffold Scaffold a new Next.js app when run in an empty directory
|
|
580
|
+
--pm <manager> Package manager for the scaffolded app: npm, pnpm, yarn, bun
|
|
554
581
|
--no-validate Skip post-installation validation
|
|
555
582
|
--no-branch Skip branch creation (use current branch)
|
|
556
583
|
--no-commit Skip auto-commit after installation
|
|
@@ -560,14 +587,16 @@ workos install [options]
|
|
|
560
587
|
--debug Enable verbose logging
|
|
561
588
|
```
|
|
562
589
|
|
|
590
|
+
**Empty directories:** Running `workos install` in an empty directory scaffolds a new Next.js app with `create-next-app` (App Router, TypeScript, Tailwind, `src/`) and then wires AuthKit into it. This only happens when the directory is empty or contains nothing but VCS/editor metadata (`.git`, `.gitignore`, `LICENSE`, `.idea`, and similar). Any project file — including a `README.md` or a `package.json` — opts out, and the installer treats the directory as an existing project. Interactive runs confirm first (default yes); non-interactive/headless runs (or `--scaffold`) scaffold automatically and report `"scaffolded": true`. The package manager is resolved from how you invoked the CLI (`npm_config_user_agent`) unless you pass `--pm`.
|
|
591
|
+
|
|
563
592
|
## Examples
|
|
564
593
|
|
|
565
594
|
```bash
|
|
566
595
|
# Interactive (recommended)
|
|
567
596
|
npx workos@latest install
|
|
568
597
|
|
|
569
|
-
#
|
|
570
|
-
npx workos@latest install
|
|
598
|
+
# Greenfield: scaffold a new Next.js app + AuthKit in an empty directory
|
|
599
|
+
mkdir my-app && cd my-app && npx workos@latest install
|
|
571
600
|
|
|
572
601
|
# With visual dashboard (experimental)
|
|
573
602
|
npx workos@latest dashboard
|
|
@@ -712,17 +741,18 @@ OAuth credentials are stored in the system keychain (with `~/.workos/credentials
|
|
|
712
741
|
|
|
713
742
|
## Telemetry
|
|
714
743
|
|
|
715
|
-
The
|
|
744
|
+
The CLI collects anonymous usage telemetry to help improve the product:
|
|
745
|
+
|
|
746
|
+
- **Command events** -- command name, duration, success/failure, termination reason, and which flags were used (for telemetry-enabled commands; `install` and `dashboard` use session events instead)
|
|
747
|
+
- **Session events** -- framework detected, step timing, token usage (installer only)
|
|
748
|
+
- **Crash events** -- sanitized error type and stack trace (no secrets, truncated to 4KB)
|
|
716
749
|
|
|
717
|
-
|
|
718
|
-
- Framework detected
|
|
719
|
-
- Duration and step timing
|
|
720
|
-
- Token usage (for capacity planning)
|
|
750
|
+
Environment fingerprint (OS, Node version, shell, CI detection) is included on all events. No code, credentials, or personal data is collected.
|
|
721
751
|
|
|
722
|
-
|
|
752
|
+
Disable with:
|
|
723
753
|
|
|
724
754
|
```bash
|
|
725
|
-
WORKOS_TELEMETRY=false
|
|
755
|
+
WORKOS_TELEMETRY=false workos <command>
|
|
726
756
|
```
|
|
727
757
|
|
|
728
758
|
## Logs
|