@posthog/wizard 2.10.4 → 2.12.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 (90) hide show
  1. package/README.md +48 -7
  2. package/dist/{McpScreen-LqnNwEfV.js → AuditChecksViewer-DsfXIO9e.js} +475 -36
  3. package/dist/AuditChecksViewer-DsfXIO9e.js.map +1 -0
  4. package/dist/{add-mcp-server-to-clients-lfUH2pdU.js → add-mcp-server-to-clients-BKoew3aT.js} +157 -125
  5. package/dist/add-mcp-server-to-clients-BKoew3aT.js.map +1 -0
  6. package/dist/{readiness-Cep84RsR.js → agent-interface-D5W9BAB2.js} +329 -464
  7. package/dist/agent-interface-D5W9BAB2.js.map +1 -0
  8. package/dist/{agent-runner-DHtcWn15.js → agent-runner-B8Cx6X6x.js} +22 -31
  9. package/dist/agent-runner-B8Cx6X6x.js.map +1 -0
  10. package/dist/analytics-DmD31Ssc.js +123 -0
  11. package/dist/analytics-DmD31Ssc.js.map +1 -0
  12. package/dist/analytics-JDitS2JI.js +2 -0
  13. package/dist/bin.js +521 -46
  14. package/dist/bin.js.map +1 -1
  15. package/dist/debug-Bkaqv1ab.js +686 -0
  16. package/dist/debug-Bkaqv1ab.js.map +1 -0
  17. package/dist/{debug-CIyf0ZGx.js → debug-I5sRZubJ.js} +1 -1
  18. package/dist/{defaults-DoVkE0gW.js → defaults-GbLPuHxj.js} +8 -8
  19. package/dist/defaults-GbLPuHxj.js.map +1 -0
  20. package/dist/detection-C_RfYYDe.js +206 -0
  21. package/dist/detection-C_RfYYDe.js.map +1 -0
  22. package/dist/{env-api-key-K8TdTDII.js → env-api-key-D5G2PrXW.js} +1 -1
  23. package/dist/{env-api-key-K8TdTDII.js.map → env-api-key-D5G2PrXW.js.map} +1 -1
  24. package/dist/file-8iNrXHkG.js +16 -0
  25. package/dist/file-8iNrXHkG.js.map +1 -0
  26. package/dist/{file-utils-BWneZy6p.js → file-utils-DnTSiTJw.js} +1 -1
  27. package/dist/{file-utils-BWneZy6p.js.map → file-utils-DnTSiTJw.js.map} +1 -1
  28. package/dist/package-json-BzVey4Bd.js +2 -0
  29. package/dist/{package-json-Ctq6LSl8.js → package-json-F_7oktsp.js} +1 -1
  30. package/dist/{package-json-Ctq6LSl8.js.map → package-json-F_7oktsp.js.map} +1 -1
  31. package/dist/{package-manager-CwU26DwX.js → package-manager-qxP2PpM_.js} +2 -2
  32. package/dist/{package-manager-CwU26DwX.js.map → package-manager-qxP2PpM_.js.map} +1 -1
  33. package/dist/paths-DJS47p5x.js +26 -0
  34. package/dist/paths-DJS47p5x.js.map +1 -0
  35. package/dist/{posthog-integration-HBDZrREG.js → posthog-integration-DX77Msto.js} +43 -14
  36. package/dist/posthog-integration-DX77Msto.js.map +1 -0
  37. package/dist/posthog-vm0k9PKS.js +11 -0
  38. package/dist/posthog-vm0k9PKS.js.map +1 -0
  39. package/dist/provisioning-CHfTOEvg.js +2 -0
  40. package/dist/provisioning-DUj285NO.js +166 -0
  41. package/dist/provisioning-DUj285NO.js.map +1 -0
  42. package/dist/{registry-BIV1wRpo.js → registry-CCtIsqb8.js} +5 -6
  43. package/dist/{registry-BIV1wRpo.js.map → registry-CCtIsqb8.js.map} +1 -1
  44. package/dist/{router-CXjdWNh2.js → router-BTfmEDDJ.js} +4 -3
  45. package/dist/router-BTfmEDDJ.js.map +1 -0
  46. package/dist/{setup-utils-CHojnr4N.js → setup-utils-Bv8z6HMb.js} +17 -150
  47. package/dist/setup-utils-Bv8z6HMb.js.map +1 -0
  48. package/dist/setup-utils-CoX-vLgw.js +2 -0
  49. package/dist/{start-playground-D1iLBvqF.js → start-playground-DYNQ8rOz.js} +181 -9
  50. package/dist/start-playground-DYNQ8rOz.js.map +1 -0
  51. package/dist/{start-tui-DkT_H5zx.js → start-tui-DleQG3La.js} +1290 -163
  52. package/dist/start-tui-DleQG3La.js.map +1 -0
  53. package/dist/{steps-zpqG7W08.js → steps-C-syS8if.js} +8 -8
  54. package/dist/steps-C-syS8if.js.map +1 -0
  55. package/dist/task-stream-CX7Uf6EM.js +61 -0
  56. package/dist/task-stream-CX7Uf6EM.js.map +1 -0
  57. package/dist/{telemetry-CPoSyK0a.js → telemetry-DHZfjgqx.js} +2 -2
  58. package/dist/{telemetry-CPoSyK0a.js.map → telemetry-DHZfjgqx.js.map} +1 -1
  59. package/dist/{wizard-abort-BcEPhAxY.js → wizard-abort-DIhFXJ5N.js} +1 -1
  60. package/dist/{wizard-abort-DKctLd33.js → wizard-abort-DfhWuzaw.js} +6 -4
  61. package/dist/{wizard-abort-DKctLd33.js.map → wizard-abort-DfhWuzaw.js.map} +1 -1
  62. package/dist/wizard-session-BQC9vy9Z.js +2 -0
  63. package/dist/{wizard-session-Db6R023m.js → wizard-session-BcNJTl2I.js} +1 -1
  64. package/dist/{wizard-session-Db6R023m.js.map → wizard-session-BcNJTl2I.js.map} +1 -1
  65. package/dist/wizard-ui-YdGFRyu_.js +14 -0
  66. package/dist/wizard-ui-YdGFRyu_.js.map +1 -0
  67. package/npm-shrinkwrap.json +2 -2
  68. package/package.json +1 -1
  69. package/dist/McpScreen-LqnNwEfV.js.map +0 -1
  70. package/dist/add-mcp-server-to-clients-lfUH2pdU.js.map +0 -1
  71. package/dist/agent-runner-DHtcWn15.js.map +0 -1
  72. package/dist/agent-skill-BVjJqol6.js +0 -59
  73. package/dist/agent-skill-BVjJqol6.js.map +0 -1
  74. package/dist/analytics-Cm6i5_gc.js +0 -207
  75. package/dist/analytics-Cm6i5_gc.js.map +0 -1
  76. package/dist/analytics-CviQ_A9M.js +0 -2
  77. package/dist/debug-CyJ_3dTP.js +0 -201
  78. package/dist/debug-CyJ_3dTP.js.map +0 -1
  79. package/dist/defaults-DoVkE0gW.js.map +0 -1
  80. package/dist/detection-gcQwPKPu.js +0 -122
  81. package/dist/detection-gcQwPKPu.js.map +0 -1
  82. package/dist/package-json-BQgl5C3Z.js +0 -2
  83. package/dist/posthog-integration-HBDZrREG.js.map +0 -1
  84. package/dist/readiness-Cep84RsR.js.map +0 -1
  85. package/dist/router-CXjdWNh2.js.map +0 -1
  86. package/dist/setup-utils-CHojnr4N.js.map +0 -1
  87. package/dist/start-playground-D1iLBvqF.js.map +0 -1
  88. package/dist/start-tui-DkT_H5zx.js.map +0 -1
  89. package/dist/steps-zpqG7W08.js.map +0 -1
  90. package/dist/wizard-session-y7nf6aKH.js +0 -2
package/README.md CHANGED
@@ -2,11 +2,14 @@
2
2
  <img alt="posthoglogo" src="https://user-images.githubusercontent.com/65415371/205059737-c8a4f836-4889-4654-902e-f302b187b6a0.png">
3
3
  </p>
4
4
 
5
- > **⚠️ Experimental:** This wizard is still in an experimental phase. If you
5
+
6
6
  > have any feedback, please drop an email to **[wizard@posthog.com](mailto:wizard@posthog.com)**.
7
7
 
8
8
  <h1>PostHog wizard ✨</h1>
9
- <h4>The PostHog wizard helps you quickly add PostHog to your project using AI.</h4>
9
+
10
+ The PostHog wizard helps you quickly add PostHog to your project using AI.
11
+
12
+ ![Wizard clip](https://res.cloudinary.com/dmukukwp6/image/upload/q_auto,f_auto/pasted_image_2026_05_01_T19_53_26_002_Z_398f697f5c.png)
10
13
 
11
14
  # Usage
12
15
 
@@ -16,10 +19,11 @@ To use the wizard, you can run it directly using:
16
19
  npx @posthog/wizard
17
20
  ```
18
21
 
19
- Currently the wizard can be used for **React, NextJS, Svelte, Astro and React
20
- Native** projects. If you have other integrations you would like the wizard to
22
+ Currently the wizard can be used for over 16 frameworks for frontend, backend, and mobile applications. If you have other integrations you would like the wizard to
21
23
  support, please open a [GitHub issue](https://github.com/posthog/wizard/issues)!
22
24
 
25
+ Visit our [docs](https://posthog.com/docs/ai-engineering/ai-wizard) to learn more.
26
+
23
27
  ## MCP Commands
24
28
 
25
29
  The wizard also includes commands for managing PostHog MCP (Model Context
@@ -44,6 +48,46 @@ npx @posthog/wizard revenue
44
48
  Requires PostHog and Stripe SDKs already installed. Supports `--ci` with the
45
49
  same flags as the main wizard.
46
50
 
51
+ ## Headless signup + install (agents / CI)
52
+
53
+ For a fully non-interactive first-run (no existing PostHog account, no TTY,
54
+ no browser), combine `--ci --signup --email`. The wizard provisions a new
55
+ account, uses the returned personal API key to run the normal CI install,
56
+ and wires PostHog into the project at `--install-dir`:
57
+
58
+ ```bash
59
+ npx @posthog/wizard --ci --signup \
60
+ --email you@example.com \
61
+ --install-dir .
62
+ ```
63
+
64
+ Optional flags: `--name "Your Name"`, `--region eu` (default `us`),
65
+ `--integration nextjs` (else auto-detected).
66
+
67
+ ### Provision only
68
+
69
+ If you just want credentials — for tests, pre-flight checks, or wiring up
70
+ PostHog yourself — use the `provision` subcommand, which emits a structured
71
+ `ProvisioningResult` and does nothing else:
72
+
73
+ ```bash
74
+ # Human-readable (when stdout is a TTY)
75
+ npx @posthog/wizard provision --email user@example.com --region us
76
+
77
+ # Machine-readable — auto when stdout is piped, or force with --json
78
+ npx @posthog/wizard provision --email user@example.com --region eu --json
79
+ ```
80
+
81
+ Success prints the full `ProvisioningResult` (`projectApiKey`, `host`,
82
+ `projectId`, `accountId`, `accessToken`, `refreshToken`, and
83
+ `personalApiKey` if present). Failure exits 1; in `--json` mode the error
84
+ is emitted to stderr as `{"error":"...","code":"..."}`, with `code` set to
85
+ `email_exists` when the address is already registered.
86
+
87
+ > ⚠️ **Output contains live credentials.** Pipe it into a secrets store —
88
+ > do not let it be captured by shared CI logs. Mask the step output or
89
+ > redirect stdout to a file your job reads and discards.
90
+
47
91
  # Options
48
92
 
49
93
  The following CLI arguments are available:
@@ -62,9 +106,6 @@ The following CLI arguments are available:
62
106
  | `--ci` | Enable CI mode for non-interactive execution | boolean | `false` | | `POSTHOG_WIZARD_CI` |
63
107
  | `--api-key` | PostHog personal API key (phx_xxx) for authentication | string | | | `POSTHOG_WIZARD_API_KEY` |
64
108
 
65
- > Note: A large amount of the scaffolding for this came from the amazing Sentry
66
- > wizard, which you can find [here](https://github.com/getsentry/sentry-wizard)
67
- > 💖
68
109
 
69
110
  # CI Mode
70
111