@posthog/wizard 2.79.1 → 2.80.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 (192) hide show
  1. package/dist/{PickerMenu-dG5DQCZA.js → PickerMenu-m4CCPX4f.js} +10 -10
  2. package/dist/PickerMenu-m4CCPX4f.js.map +1 -0
  3. package/dist/{agent-BWFhuLgo.js → agent-BkBbVuNq.js} +48 -37
  4. package/dist/agent-BkBbVuNq.js.map +1 -0
  5. package/dist/agent-QGK2YzlX.js +6 -0
  6. package/dist/{agent-interface-FkbaBJwz.js → agent-interface-CzyCmp7q.js} +68 -31
  7. package/dist/agent-interface-CzyCmp7q.js.map +1 -0
  8. package/dist/{agent-prompt-loader-D0weQ-7k.js → agent-prompt-loader-4wMxlYSX.js} +5 -5
  9. package/dist/{agent-prompt-loader-D0weQ-7k.js.map → agent-prompt-loader-4wMxlYSX.js.map} +1 -1
  10. package/dist/{analytics-DXK1gc12.js → analytics-B6q5PN7a.js} +5 -5
  11. package/dist/analytics-B6q5PN7a.js.map +1 -0
  12. package/dist/analytics-BXtfK9o7.js +2 -0
  13. package/dist/{api-CrbCIQOz.js → api-C3Dc4LFl.js} +3 -3
  14. package/dist/{api-CrbCIQOz.js.map → api-C3Dc4LFl.js.map} +1 -1
  15. package/dist/api-yNjrfZs2.js +2 -0
  16. package/dist/bin.js +1 -1
  17. package/dist/{bounded-fs-vAq-T-K7.js → bounded-fs-CC_NDtoP.js} +3 -3
  18. package/dist/{bounded-fs-vAq-T-K7.js.map → bounded-fs-CC_NDtoP.js.map} +1 -1
  19. package/dist/check-screens.tsx +5 -5
  20. package/dist/{ci-install-COcV8SY2.js → ci-install-DfcAMhlu.js} +7 -7
  21. package/dist/ci-install-DfcAMhlu.js.map +1 -0
  22. package/dist/{constants-DHCBSfnx.js → constants-DO4X70po.js} +3 -3
  23. package/dist/{constants-DHCBSfnx.js.map → constants-DO4X70po.js.map} +1 -1
  24. package/dist/{debug-BuYHGr6_.js → debug-BueK5mRR.js} +1 -1
  25. package/dist/{debug-kAHwWGg7.js → debug-DyARf5TF.js} +3 -3
  26. package/dist/debug-DyARf5TF.js.map +1 -0
  27. package/dist/{defaults-a9TelDhJ.js → defaults-DpfMnH2q.js} +2 -2
  28. package/dist/defaults-DpfMnH2q.js.map +1 -0
  29. package/dist/{endpoints-BVMYm9F4.js → endpoints-D-4KxZiB.js} +3 -3
  30. package/dist/{endpoints-BVMYm9F4.js.map → endpoints-D-4KxZiB.js.map} +1 -1
  31. package/dist/env-api-key-CHGLe0iz.js +2 -0
  32. package/dist/{env-api-key-BP-NFFXt.js → env-api-key-COf0U-Au.js} +2 -2
  33. package/dist/{env-api-key-BP-NFFXt.js.map → env-api-key-COf0U-Au.js.map} +1 -1
  34. package/dist/{environment-BATlQxcQ.js → environment-DrLaSsA8.js} +4 -4
  35. package/dist/{environment-BATlQxcQ.js.map → environment-DrLaSsA8.js.map} +1 -1
  36. package/dist/environment-hBj7ngmO.js +2 -0
  37. package/dist/{file-DcRKycV8.js → file-CVA9ocIC.js} +3 -3
  38. package/dist/file-CVA9ocIC.js.map +1 -0
  39. package/dist/file-CmoKK_Pp.js +2 -0
  40. package/dist/{file-watcher-Brq2nnHV.js → file-watcher-C3Su8vXm.js} +3 -3
  41. package/dist/file-watcher-C3Su8vXm.js.map +1 -0
  42. package/dist/{gateway-C9-GlLO9.js → gateway-BmjYUSua.js} +6 -6
  43. package/dist/{gateway-C9-GlLO9.js.map → gateway-BmjYUSua.js.map} +1 -1
  44. package/dist/{headless-ui-CqI2gXlD.js → headless-ui-CUbv12Yx.js} +3 -3
  45. package/dist/headless-ui-CUbv12Yx.js.map +1 -0
  46. package/dist/host-resolution-DVSb7kXb.js +114 -0
  47. package/dist/host-resolution-DVSb7kXb.js.map +1 -0
  48. package/dist/{add-mcp-server-to-clients-DIaTRWMY.js → install-Bk5TNk27.js} +15 -14
  49. package/dist/install-Bk5TNk27.js.map +1 -0
  50. package/dist/{add-mcp-server-to-clients-artmN7mz.js → install-F4wm3RSl.js} +1 -1
  51. package/dist/interactive-C5LNvDj6.js +11 -0
  52. package/dist/interactive-C5LNvDj6.js.map +1 -0
  53. package/dist/{telemetry-B7zJdRmA.js → links-9LWZPSCq.js} +4 -13
  54. package/dist/links-9LWZPSCq.js.map +1 -0
  55. package/dist/{logging-ui-Dza4D0MK.js → logging-ui-p6XKVmTx.js} +6 -6
  56. package/dist/logging-ui-p6XKVmTx.js.map +1 -0
  57. package/dist/{main-CgKxbwMP.js → main-DKPjFHEV.js} +149 -141
  58. package/dist/main-DKPjFHEV.js.map +1 -0
  59. package/dist/{mcp-DnAyW0-w.js → mcp-Co8VRF62.js} +4 -4
  60. package/dist/{mcp-DnAyW0-w.js.map → mcp-Co8VRF62.js.map} +1 -1
  61. package/dist/mcp-install-smoke-test.ts +1 -1
  62. package/dist/{mcp-prompt-streaming-DDWQ-FCA.js → mcp-prompt-streaming-ljCVoQ9I.js} +6 -6
  63. package/dist/{mcp-prompt-streaming-DDWQ-FCA.js.map → mcp-prompt-streaming-ljCVoQ9I.js.map} +1 -1
  64. package/dist/{mint-failure-u8xQKNOn.js → mint-failure-C0HyvEwO.js} +103 -92
  65. package/dist/mint-failure-C0HyvEwO.js.map +1 -0
  66. package/dist/{models-WcwUnSKb.js → models-Dba8ITeo.js} +2 -2
  67. package/dist/{models-WcwUnSKb.js.map → models-Dba8ITeo.js.map} +1 -1
  68. package/dist/{non-interactive-DyVC1AGc.js → non-interactive-CLMJrj_7.js} +3 -3
  69. package/dist/non-interactive-CLMJrj_7.js.map +1 -0
  70. package/dist/{oauth-session-DYM2Hrl2.js → oauth-session-D-RfcVmr.js} +2 -2
  71. package/dist/{oauth-session-DYM2Hrl2.js.map → oauth-session-D-RfcVmr.js.map} +1 -1
  72. package/dist/{orchestrator-tools-DbgNBFGA.js → orchestrator-tools-CVJ1F9Ub.js} +3 -3
  73. package/dist/{orchestrator-tools-DbgNBFGA.js.map → orchestrator-tools-CVJ1F9Ub.js.map} +1 -1
  74. package/dist/package-json--ppioh2F.js +2 -0
  75. package/dist/{package-json-Atg34fa4.js → package-json-Cowya9-3.js} +1 -1
  76. package/dist/{package-json-Atg34fa4.js.map → package-json-Cowya9-3.js.map} +1 -1
  77. package/dist/{pi-8KsYsPmM.js → pi-B5YTBRDv.js} +18 -17
  78. package/dist/pi-B5YTBRDv.js.map +1 -0
  79. package/dist/{playground-BlYRBMj7.js → playground-BLsCfHmQ.js} +33 -33
  80. package/dist/playground-BLsCfHmQ.js.map +1 -0
  81. package/dist/posthog-B2E0hpZt.js +2 -0
  82. package/dist/{posthog-Bt0Aplb8.js → posthog-B42rt_1S.js} +3 -3
  83. package/dist/posthog-B42rt_1S.js.map +1 -0
  84. package/dist/project-data--L-WZyvj.js +2 -0
  85. package/dist/{setup-utils-B26Lf2yF.js → project-data-BO9IXn9y.js} +566 -947
  86. package/dist/project-data-BO9IXn9y.js.map +1 -0
  87. package/dist/provisioning-C01REIU2.js +2 -0
  88. package/dist/{provisioning-Bo2NRxFz.js → provisioning-CLhuKqXH.js} +6 -67
  89. package/dist/provisioning-CLhuKqXH.js.map +1 -0
  90. package/dist/{queue-tools-C8mXOh7e.js → queue-tools-knnPQP0e.js} +4 -4
  91. package/dist/{queue-tools-C8mXOh7e.js.map → queue-tools-knnPQP0e.js.map} +1 -1
  92. package/dist/{registry-CD5RQt38.js → registry-B3rC5U4b.js} +6 -6
  93. package/dist/{registry-CD5RQt38.js.map → registry-B3rC5U4b.js.map} +1 -1
  94. package/dist/registry-BamsM7J9.js +2 -0
  95. package/dist/run-agent-legacy-CwUmPfQF.js +2 -0
  96. package/dist/{run-agent-legacy-DOlM6DQu.js → run-agent-legacy-DWBajsMh.js} +38 -111
  97. package/dist/run-agent-legacy-DWBajsMh.js.map +1 -0
  98. package/dist/{runners-ov3EXF1n.js → runners-D1PqqpjA.js} +38 -38
  99. package/dist/runners-D1PqqpjA.js.map +1 -0
  100. package/dist/{security-C71pkwqH.js → security-BvdSFDuM.js} +5 -5
  101. package/dist/{security-C71pkwqH.js.map → security-BvdSFDuM.js.map} +1 -1
  102. package/dist/setup-utils-ChXXTi1m.js +301 -0
  103. package/dist/setup-utils-ChXXTi1m.js.map +1 -0
  104. package/dist/{start-tui-Bo2L0bar.js → start-tui-DicLfgsj.js} +92 -90
  105. package/dist/start-tui-DicLfgsj.js.map +1 -0
  106. package/dist/{steps-BPcg3_3Q.js → steps-Hc28zVc_.js} +10 -10
  107. package/dist/steps-Hc28zVc_.js.map +1 -0
  108. package/dist/store-COCO6U0P.js +5 -0
  109. package/dist/{store-BTzcvRGT.js → store-D3509G87.js} +66 -28
  110. package/dist/store-D3509G87.js.map +1 -0
  111. package/dist/{subagent-D1TrTchE.js → subagent-D_Sqak94.js} +3 -3
  112. package/dist/{subagent-D1TrTchE.js.map → subagent-D_Sqak94.js.map} +1 -1
  113. package/dist/{task-DqRlQBfs.js → task-DiTI6Sak.js} +16 -16
  114. package/dist/task-DiTI6Sak.js.map +1 -0
  115. package/dist/{wizard-ui-DVqrYaOM.js → task-status-CmrrR7zo.js} +2 -2
  116. package/dist/task-status-CmrrR7zo.js.map +1 -0
  117. package/dist/{task-stream-Bw6JaLCX.js → task-stream-BckhG_cB.js} +10 -10
  118. package/dist/task-stream-BckhG_cB.js.map +1 -0
  119. package/dist/{tasks-ChWufsdO.js → tasks-ChZ_F1YP.js} +1 -1
  120. package/dist/{tasks-ChWufsdO.js.map → tasks-ChZ_F1YP.js.map} +1 -1
  121. package/dist/telemetry-BNKsDxNS.js +13 -0
  122. package/dist/telemetry-BNKsDxNS.js.map +1 -0
  123. package/dist/{terminal-zgkEfoCL.js → terminal-PK9bCLRi.js} +123 -97
  124. package/dist/terminal-PK9bCLRi.js.map +1 -0
  125. package/dist/{tools-CkJ2y9Wt.js → tools-C8LQ8QFz.js} +8 -8
  126. package/dist/{tools-CkJ2y9Wt.js.map → tools-C8LQ8QFz.js.map} +1 -1
  127. package/dist/{ui-Q6-RvERF.js → ui-tPNpM6vj.js} +3 -3
  128. package/dist/ui-tPNpM6vj.js.map +1 -0
  129. package/dist/urls-BI4kJ4qQ.js +67 -0
  130. package/dist/urls-BI4kJ4qQ.js.map +1 -0
  131. package/dist/{version-CHhJjz_H.js → version-5_ydHkM6.js} +2 -2
  132. package/dist/{version-CHhJjz_H.js.map → version-5_ydHkM6.js.map} +1 -1
  133. package/dist/{wizard-abort-Br1qMDNa.js → wizard-abort-BVjqLyeA.js} +1 -1
  134. package/dist/{wizard-abort-BPdv07np.js → wizard-abort-DBKtfnBR.js} +18 -16
  135. package/dist/wizard-abort-DBKtfnBR.js.map +1 -0
  136. package/dist/wizard-session-B7BHnay0.js +2 -0
  137. package/dist/{wizard-session-2w4Ru-Wz.js → wizard-session-BYw6LzpS.js} +30 -28
  138. package/dist/wizard-session-BYw6LzpS.js.map +1 -0
  139. package/dist/{yara-hooks-BnxejtXK.js → yara-hooks-C3L6lBij.js} +5 -5
  140. package/dist/{yara-hooks-BnxejtXK.js.map → yara-hooks-C3L6lBij.js.map} +1 -1
  141. package/dist/yara-hooks-CF_IsoaA.js +2 -0
  142. package/package.json +2 -3
  143. package/dist/PickerMenu-dG5DQCZA.js.map +0 -1
  144. package/dist/add-mcp-server-to-clients-DIaTRWMY.js.map +0 -1
  145. package/dist/agent-BEjARD2a.js +0 -6
  146. package/dist/agent-BWFhuLgo.js.map +0 -1
  147. package/dist/agent-interface-FkbaBJwz.js.map +0 -1
  148. package/dist/analytics-DFtbRjYh.js +0 -2
  149. package/dist/analytics-DXK1gc12.js.map +0 -1
  150. package/dist/api-Cm9UtKZh.js +0 -2
  151. package/dist/ci-install-COcV8SY2.js.map +0 -1
  152. package/dist/debug-kAHwWGg7.js.map +0 -1
  153. package/dist/defaults-a9TelDhJ.js.map +0 -1
  154. package/dist/env-api-key-CaWEDj_9.js +0 -2
  155. package/dist/environment-CwD8OPYj.js +0 -2
  156. package/dist/file-C5JMsyR1.js +0 -2
  157. package/dist/file-DcRKycV8.js.map +0 -1
  158. package/dist/file-watcher-Brq2nnHV.js.map +0 -1
  159. package/dist/headless-ui-CqI2gXlD.js.map +0 -1
  160. package/dist/interactive-B_Ti_CsS.js +0 -11
  161. package/dist/interactive-B_Ti_CsS.js.map +0 -1
  162. package/dist/logging-ui-Dza4D0MK.js.map +0 -1
  163. package/dist/main-CgKxbwMP.js.map +0 -1
  164. package/dist/mint-failure-u8xQKNOn.js.map +0 -1
  165. package/dist/non-interactive-DyVC1AGc.js.map +0 -1
  166. package/dist/package-json-D8Ga03tK.js +0 -2
  167. package/dist/pi-8KsYsPmM.js.map +0 -1
  168. package/dist/playground-BlYRBMj7.js.map +0 -1
  169. package/dist/posthog-Bt0Aplb8.js.map +0 -1
  170. package/dist/posthog-CUgCEhH0.js +0 -2
  171. package/dist/provisioning-Bo2NRxFz.js.map +0 -1
  172. package/dist/provisioning-OGFGlzf7.js +0 -2
  173. package/dist/registry-C06e_x-p.js +0 -2
  174. package/dist/run-agent-legacy-ChacZImU.js +0 -2
  175. package/dist/run-agent-legacy-DOlM6DQu.js.map +0 -1
  176. package/dist/runners-ov3EXF1n.js.map +0 -1
  177. package/dist/setup-utils-B26Lf2yF.js.map +0 -1
  178. package/dist/setup-utils-CVS86NYR.js +0 -2
  179. package/dist/start-tui-Bo2L0bar.js.map +0 -1
  180. package/dist/steps-BPcg3_3Q.js.map +0 -1
  181. package/dist/store-BTzcvRGT.js.map +0 -1
  182. package/dist/store-BpqySPXm.js +0 -5
  183. package/dist/task-DqRlQBfs.js.map +0 -1
  184. package/dist/task-stream-Bw6JaLCX.js.map +0 -1
  185. package/dist/telemetry-B7zJdRmA.js.map +0 -1
  186. package/dist/terminal-zgkEfoCL.js.map +0 -1
  187. package/dist/ui-Q6-RvERF.js.map +0 -1
  188. package/dist/wizard-abort-BPdv07np.js.map +0 -1
  189. package/dist/wizard-session-2w4Ru-Wz.js.map +0 -1
  190. package/dist/wizard-session-DGaUHOF3.js +0 -2
  191. package/dist/wizard-ui-DVqrYaOM.js.map +0 -1
  192. package/dist/yara-hooks-DSuExwb4.js +0 -2
@@ -1,21 +1,21 @@
1
- import { I as WIZARD_TOOL_NAMES, et as fetchSkillMenu, u as recoverOrphanedSettingsBackups } from "./agent-interface-FkbaBJwz.js";
1
+ import { I as WIZARD_TOOL_NAMES, et as fetchSkillMenu, u as recoverOrphanedSettingsBackups } from "./agent-interface-CzyCmp7q.js";
2
2
  import { n as ErrorCodes, t as emitWizardError } from "./emit-BSetXzDV.js";
3
- import { b as isHeadless, x as regionOption, y as headlessOption } from "./debug-kAHwWGg7.js";
4
- import { t as VERSION } from "./version-CHhJjz_H.js";
3
+ import { b as isHeadless, x as regionOption, y as headlessOption } from "./debug-DyARf5TF.js";
4
+ import { t as VERSION } from "./version-5_ydHkM6.js";
5
5
  import { o as initLocalDev, s as localMcpSkillsNotice } from "./local-dev-McsurOC-.js";
6
- import { $ as getSkillsBaseUrl, k as POSTHOG_DOCS_URL } from "./constants-DHCBSfnx.js";
7
- import { n as analytics } from "./analytics-DXK1gc12.js";
8
- import { r as setEntryCommand } from "./telemetry-B7zJdRmA.js";
6
+ import { $ as getSkillsBaseUrl, k as POSTHOG_DOCS_URL } from "./constants-DO4X70po.js";
7
+ import { n as analytics } from "./analytics-B6q5PN7a.js";
8
+ import { n as setEntryCommand } from "./links-9LWZPSCq.js";
9
9
  import "./errors-C2domSkK.js";
10
- import { t as LoggingUI } from "./logging-ui-Dza4D0MK.js";
11
- import { n as setUI, t as getUI } from "./ui-Q6-RvERF.js";
12
- import { t as isNonInteractiveEnvironment } from "./environment-BATlQxcQ.js";
13
- import "./agent-BWFhuLgo.js";
14
- import { h as AUDIT_CHECKS_FILE } from "./yara-hooks-BnxejtXK.js";
15
- import { A as installOrUpdatePostHogCli, B as webAnalyticsDoctorConfig, D as CLI_STEERING_TARGETS, E as errorTrackingUploadSourceMapsConfig, G as createSkillProgram, H as getKindMeta, K as warehouseSourceConfig, O as detectTargets, S as errorTrackingConfig, T as replayVisionConfig, U as fetchHealthIssues, V as posthogDoctorConfig, W as auditConfig, d as metricsConfig, f as aiObservabilityConfig, j as installSteeringSnippet, k as findTarget, m as selfDrivingConfig, o as Program, p as mcpAnalyticsConfig, q as revenueAnalyticsConfig, rt as Colors, s as agentSkillConfig, z as migrationConfig } from "./mint-failure-u8xQKNOn.js";
16
- import { i as runWizard, n as runWizardCI, t as runWizardHeadless } from "./runners-ov3EXF1n.js";
17
- import { t as PickerMenu } from "./PickerMenu-dG5DQCZA.js";
18
- import { t as readApiKeyFromEnv } from "./env-api-key-BP-NFFXt.js";
10
+ import { t as LoggingUI } from "./logging-ui-p6XKVmTx.js";
11
+ import { n as setUI, t as getUI } from "./ui-tPNpM6vj.js";
12
+ import { t as isNonInteractiveEnvironment } from "./environment-DrLaSsA8.js";
13
+ import "./agent-BkBbVuNq.js";
14
+ import { h as AUDIT_CHECKS_FILE } from "./yara-hooks-C3L6lBij.js";
15
+ import { A as installOrUpdatePostHogCli, B as webAnalyticsDoctorConfig, D as CLI_STEERING_TARGETS, E as errorTrackingUploadSourceMapsConfig, G as createSkillProgram, H as getKindMeta, K as warehouseSourceConfig, O as detectTargets, S as errorTrackingConfig, T as replayVisionConfig, U as fetchHealthIssues, V as posthogDoctorConfig, W as auditConfig, d as metricsConfig, f as aiObservabilityConfig, j as installSteeringSnippet, k as findTarget, m as selfDrivingConfig, o as Program, p as mcpAnalyticsConfig, q as revenueAnalyticsConfig, rt as Colors, s as agentSkillConfig, z as migrationConfig } from "./mint-failure-C0HyvEwO.js";
16
+ import { i as runWizard, n as runWizardCI, t as runWizardHeadless } from "./runners-D1PqqpjA.js";
17
+ import { t as PickerMenu } from "./PickerMenu-m4CCPX4f.js";
18
+ import { t as readApiKeyFromEnv } from "./env-api-key-COf0U-Au.js";
19
19
  import { Agent, setGlobalDispatcher } from "undici";
20
20
  import yargs from "yargs";
21
21
  import { hideBin } from "yargs/helpers";
@@ -23,7 +23,7 @@ import * as path$1 from "node:path";
23
23
  import { Box, Text, render } from "ink";
24
24
  import { createElement } from "react";
25
25
  import * as readline from "node:readline/promises";
26
- //#region src/commands/command.ts
26
+ //#region src/cli/commands/command.ts
27
27
  /** Extract the bare command word(s) from a yargs name spec, dropping positionals and aliases' arg syntax. */
28
28
  function commandKeys(name) {
29
29
  return (typeof name === "string" ? [name] : name).map((n) => n.trim().split(/\s+/)[0]);
@@ -50,7 +50,7 @@ function toCommandModule(cmd, parentPath) {
50
50
  };
51
51
  }
52
52
  //#endregion
53
- //#region src/wizard.ts
53
+ //#region src/cli/wizard.ts
54
54
  /**
55
55
  * Global yargs options applied to every command. These are read from the
56
56
  * `POSTHOG_WIZARD` env prefix as well as flags.
@@ -194,7 +194,7 @@ const LOCAL_TARGET_ENV_VARS = [
194
194
  "POSTHOG_WIZARD_LOCAL_POSTHOG"
195
195
  ];
196
196
  //#endregion
197
- //#region src/commands/provision.ts
197
+ //#region src/cli/commands/provision.ts
198
198
  const provisionCommand = {
199
199
  name: "provision",
200
200
  description: "Create a new PostHog account (headless, no TUI)",
@@ -235,7 +235,7 @@ function runProvision(argv) {
235
235
  }
236
236
  async function provision({ email, region, name, baseUrl, jsonMode }) {
237
237
  try {
238
- const { provisionNewAccount } = await import("./provisioning-OGFGlzf7.js");
238
+ const { provisionNewAccount } = await import("./provisioning-C01REIU2.js");
239
239
  if (!jsonMode) getUI().log.info(`Provisioning account for ${email} in ${region}...`);
240
240
  emitResult(await provisionNewAccount(email, name, region, { baseUrl }), jsonMode);
241
241
  process.exit(0);
@@ -271,7 +271,7 @@ function emitError(error, jsonMode) {
271
271
  getUI().log.error(`Provisioning failed: ${msg}`);
272
272
  }
273
273
  //#endregion
274
- //#region src/commands/basic-integration/index.ts
274
+ //#region src/cli/commands/basic-integration/index.ts
275
275
  const basicIntegrationCommand = {
276
276
  name: ["$0"],
277
277
  description: "Run the PostHog setup wizard",
@@ -302,28 +302,28 @@ const basicIntegrationCommand = {
302
302
  setEntryCommand("integrate");
303
303
  (async () => {
304
304
  if (isHeadless(argv)) {
305
- const { runHeadlessInstall } = await import("./ci-install-COcV8SY2.js");
305
+ const { runHeadlessInstall } = await import("./ci-install-DfcAMhlu.js");
306
306
  return runHeadlessInstall(argv);
307
307
  }
308
308
  if (argv.ci) {
309
- const { runCIInstall } = await import("./ci-install-COcV8SY2.js");
309
+ const { runCIInstall } = await import("./ci-install-DfcAMhlu.js");
310
310
  return runCIInstall(argv);
311
311
  }
312
312
  if (isNonInteractiveEnvironment()) {
313
- const { failNonInteractive } = await import("./non-interactive-DyVC1AGc.js");
313
+ const { failNonInteractive } = await import("./non-interactive-CLMJrj_7.js");
314
314
  return failNonInteractive();
315
315
  }
316
316
  if (argv.playground) {
317
- const { runPlayground } = await import("./playground-BlYRBMj7.js");
317
+ const { runPlayground } = await import("./playground-BLsCfHmQ.js");
318
318
  return runPlayground();
319
319
  }
320
- const { runInteractive } = await import("./interactive-B_Ti_CsS.js");
320
+ const { runInteractive } = await import("./interactive-C5LNvDj6.js");
321
321
  runInteractive(argv);
322
322
  })();
323
323
  }
324
324
  };
325
325
  //#endregion
326
- //#region src/commands/mcp/tui-availability.ts
326
+ //#region src/cli/commands/mcp/tui-availability.ts
327
327
  /**
328
328
  * startTUI throws CliInteractiveRequired, and Ink throws "Raw mode is not
329
329
  * supported", when stdin has no TTY (piped input, CI, some IDE terminals).
@@ -336,7 +336,7 @@ function isTUIUnavailable(error) {
336
336
  return error.code === ErrorCodes.CliInteractiveRequired || /raw mode is not supported/i.test(error.message);
337
337
  }
338
338
  //#endregion
339
- //#region src/commands/mcp/add.ts
339
+ //#region src/cli/commands/mcp/add.ts
340
340
  const mcpAddCommand = {
341
341
  name: "add",
342
342
  description: "Install PostHog MCP server to supported clients",
@@ -361,7 +361,7 @@ const mcpAddCommand = {
361
361
  function runMcpAdd(argv) {
362
362
  const features = parseFeatures(argv.features);
363
363
  (async () => {
364
- const { readApiKeyFromEnv } = await import("./env-api-key-CaWEDj_9.js");
364
+ const { readApiKeyFromEnv } = await import("./env-api-key-CHGLe0iz.js");
365
365
  const apiKey = argv.apiKey || readApiKeyFromEnv();
366
366
  const debug = argv.debug;
367
367
  const localMcp = argv.local;
@@ -375,8 +375,8 @@ function runMcpAdd(argv) {
375
375
  return;
376
376
  }
377
377
  try {
378
- const { startTUI } = await import("./start-tui-Bo2L0bar.js");
379
- const { buildSession } = await import("./wizard-session-DGaUHOF3.js");
378
+ const { startTUI } = await import("./start-tui-DicLfgsj.js");
379
+ const { buildSession } = await import("./wizard-session-B7BHnay0.js");
380
380
  const tui = startTUI(VERSION, Program.McpAdd);
381
381
  tui.store.session = buildSession({
382
382
  debug,
@@ -393,7 +393,7 @@ function runMcpAdd(argv) {
393
393
  }
394
394
  async function runHeadlessAdd(args) {
395
395
  setUI(new LoggingUI());
396
- const { addMCPServerToClientsStep } = await import("./add-mcp-server-to-clients-artmN7mz.js");
396
+ const { addMCPServerToClientsStep } = await import("./install-F4wm3RSl.js");
397
397
  const { installed, failed } = await addMCPServerToClientsStep(args);
398
398
  if (failed.length > 0 || installed.length === 0) process.exitCode = 1;
399
399
  }
@@ -402,7 +402,7 @@ function parseFeatures(raw) {
402
402
  return raw.split(",").map((s) => s.trim()).filter(Boolean);
403
403
  }
404
404
  //#endregion
405
- //#region src/commands/mcp/remove.ts
405
+ //#region src/cli/commands/mcp/remove.ts
406
406
  const mcpRemoveCommand = {
407
407
  name: "remove",
408
408
  description: "Remove PostHog MCP server from supported clients",
@@ -425,8 +425,8 @@ function runMcpRemove(argv) {
425
425
  return;
426
426
  }
427
427
  try {
428
- const { startTUI } = await import("./start-tui-Bo2L0bar.js");
429
- const { buildSession } = await import("./wizard-session-DGaUHOF3.js");
428
+ const { startTUI } = await import("./start-tui-DicLfgsj.js");
429
+ const { buildSession } = await import("./wizard-session-B7BHnay0.js");
430
430
  const tui = startTUI(VERSION, Program.McpRemove);
431
431
  tui.store.session = buildSession({
432
432
  debug,
@@ -442,11 +442,11 @@ function runMcpRemove(argv) {
442
442
  /** No exit code on an empty result: nothing to remove is the requested end state. */
443
443
  async function runHeadlessRemove(local) {
444
444
  setUI(new LoggingUI());
445
- const { removeMCPServerFromClientsStep } = await import("./add-mcp-server-to-clients-artmN7mz.js");
445
+ const { removeMCPServerFromClientsStep } = await import("./install-F4wm3RSl.js");
446
446
  await removeMCPServerFromClientsStep({ local });
447
447
  }
448
448
  //#endregion
449
- //#region src/commands/mcp/tutorial.ts
449
+ //#region src/cli/commands/mcp/tutorial.ts
450
450
  const mcpTutorialCommand = {
451
451
  name: "tutorial",
452
452
  description: "Try the PostHog MCP with your agent (no install needed)",
@@ -462,8 +462,8 @@ function runMcpTutorial(argv) {
462
462
  const debug = argv.debug;
463
463
  const localMcp = argv.local;
464
464
  try {
465
- const { startTUI } = await import("./start-tui-Bo2L0bar.js");
466
- const { buildSession } = await import("./wizard-session-DGaUHOF3.js");
465
+ const { startTUI } = await import("./start-tui-DicLfgsj.js");
466
+ const { buildSession } = await import("./wizard-session-B7BHnay0.js");
467
467
  const tui = startTUI(VERSION, Program.McpTutorial);
468
468
  tui.store.session = buildSession({
469
469
  debug,
@@ -482,7 +482,7 @@ function runMcpTutorial(argv) {
482
482
  })();
483
483
  }
484
484
  //#endregion
485
- //#region src/commands/mcp/index.ts
485
+ //#region src/cli/commands/mcp/index.ts
486
486
  const mcpCommand = {
487
487
  name: "mcp",
488
488
  description: "MCP server management commands",
@@ -493,7 +493,7 @@ const mcpCommand = {
493
493
  ]
494
494
  };
495
495
  //#endregion
496
- //#region src/commands/skill-program-options.ts
496
+ //#region src/cli/commands/skill-program-options.ts
497
497
  /**
498
498
  * Per-command options shared by every skill-based program command
499
499
  * (`audit events`, `migrate statsig`, `revenue`, `source-maps`, …).
@@ -507,7 +507,7 @@ const skillProgramOptions = { "install-dir": {
507
507
  type: "string"
508
508
  } };
509
509
  //#endregion
510
- //#region src/commands/factories/shared.ts
510
+ //#region src/cli/commands/factories/shared.ts
511
511
  /**
512
512
  * Dispatch a parsed yargs invocation to the wizard runner. Applies the
513
513
  * program's `mapCliOptions` transform, then routes to `runWizardHeadless`,
@@ -562,7 +562,7 @@ function mergeCommandOptions(config) {
562
562
  };
563
563
  }
564
564
  //#endregion
565
- //#region src/commands/factories/native-command-factory.ts
565
+ //#region src/cli/commands/factories/native-command-factory.ts
566
566
  /**
567
567
  * Build a yargs `Command` from a wizard-native `ProgramConfig`.
568
568
  *
@@ -581,7 +581,7 @@ function nativeCommandFactory(config, opts = {}) {
581
581
  };
582
582
  }
583
583
  //#endregion
584
- //#region src/commands/mcp-analytics.ts
584
+ //#region src/cli/commands/mcp-analytics.ts
585
585
  /**
586
586
  * `wizard mcp-analytics` — flat skill command, instrument-an-MCP-server today.
587
587
  *
@@ -591,7 +591,7 @@ function nativeCommandFactory(config, opts = {}) {
591
591
  */
592
592
  const mcpAnalyticsCommand = nativeCommandFactory(mcpAnalyticsConfig);
593
593
  //#endregion
594
- //#region src/commands/replay-vision.ts
594
+ //#region src/cli/commands/replay-vision.ts
595
595
  /**
596
596
  * `wizard replay-vision` — flat skill command, set up Replay vision today.
597
597
  *
@@ -602,7 +602,7 @@ const mcpAnalyticsCommand = nativeCommandFactory(mcpAnalyticsConfig);
602
602
  */
603
603
  const replayVisionCommand = nativeCommandFactory(replayVisionConfig);
604
604
  //#endregion
605
- //#region src/commands/ai-observability.ts
605
+ //#region src/cli/commands/ai-observability.ts
606
606
  /**
607
607
  * `wizard ai-observability` — flat skill command, wire AI Observability into a
608
608
  * project today.
@@ -616,7 +616,7 @@ const replayVisionCommand = nativeCommandFactory(replayVisionConfig);
616
616
  */
617
617
  const aiObservabilityCommand = nativeCommandFactory(aiObservabilityConfig);
618
618
  //#endregion
619
- //#region src/commands/metrics.ts
619
+ //#region src/cli/commands/metrics.ts
620
620
  /**
621
621
  * `wizard metrics` — flat skill command, wire PostHog application metrics
622
622
  * (counters, gauges, histograms via \`posthog.metrics\`) into a project.
@@ -629,7 +629,7 @@ const aiObservabilityCommand = nativeCommandFactory(aiObservabilityConfig);
629
629
  */
630
630
  const metricsCommand = nativeCommandFactory(metricsConfig);
631
631
  //#endregion
632
- //#region src/programs/dispatch-family.ts
632
+ //#region src/cli/commands/dispatch-family.ts
633
633
  /**
634
634
  * Capture a CLI dispatch error, flush analytics, and exit. The wizard never
635
635
  * starts a run from these paths — use flush() (not shutdown()) so we don't
@@ -766,7 +766,7 @@ function pickerChildrenToShow(children) {
766
766
  return defaults.length > 0 ? [...defaults] : [...children];
767
767
  }
768
768
  //#endregion
769
- //#region src/commands/factories/family-picker.tsx
769
+ //#region src/cli/commands/factories/family-picker.ts
770
770
  function FamilyPickerApp(props) {
771
771
  return createElement(Box, {
772
772
  flexDirection: "column",
@@ -852,7 +852,7 @@ function createFamilyPickerDefault(parentLabel, children, chooser = chooseFamily
852
852
  };
853
853
  }
854
854
  //#endregion
855
- //#region src/commands/factories/family-command-factory.ts
855
+ //#region src/cli/commands/factories/family-command-factory.ts
856
856
  /**
857
857
  * Build a yargs `Command` for a family parent (`wizard audit`, etc.).
858
858
  *
@@ -894,7 +894,7 @@ function familyCommandFactory({ family, description, optionsFrom }) {
894
894
  };
895
895
  }
896
896
  //#endregion
897
- //#region src/commands/audit.ts
897
+ //#region src/cli/commands/audit.ts
898
898
  /**
899
899
  * The `wizard audit` family.
900
900
  *
@@ -913,7 +913,7 @@ const auditCommand = familyCommandFactory({
913
913
  optionsFrom: auditConfig
914
914
  });
915
915
  //#endregion
916
- //#region src/commands/doctor.ts
916
+ //#region src/tools/doctor/report.ts
917
917
  const doctorCommand = {
918
918
  name: "doctor",
919
919
  description: posthogDoctorConfig.description,
@@ -951,7 +951,7 @@ async function runDoctorCI(options) {
951
951
  getUI().intro("Welcome to the PostHog setup wizard");
952
952
  getUI().log.info("Running posthog-doctor in CI mode");
953
953
  try {
954
- const { getOrAskForProjectData } = await import("./setup-utils-CVS86NYR.js");
954
+ const { getOrAskForProjectData } = await import("./project-data--L-WZyvj.js");
955
955
  const { host, accessToken, projectId } = await getOrAskForProjectData({
956
956
  signup: false,
957
957
  ci: true,
@@ -969,7 +969,7 @@ async function runDoctorCI(options) {
969
969
  for (const issue of sorted) getUI().log.info(` • [${issue.severity}] ${getKindMeta(issue.kind).title}`);
970
970
  process.exit(1);
971
971
  } catch (error) {
972
- const { ApiError } = await import("./api-Cm9UtKZh.js");
972
+ const { ApiError } = await import("./api-yNjrfZs2.js");
973
973
  const message = error instanceof ApiError && error.statusCode === 401 ? "Your PostHog API key is invalid or expired." : error instanceof Error ? error.message : String(error);
974
974
  getUI().log.error(`Doctor failed: ${message}`);
975
975
  emitWizardError({
@@ -980,7 +980,7 @@ async function runDoctorCI(options) {
980
980
  }
981
981
  }
982
982
  //#endregion
983
- //#region src/commands/migrate.ts
983
+ //#region src/cli/commands/migrate.ts
984
984
  /**
985
985
  * `wizard migrate` — flat skill command, Statsig today.
986
986
  *
@@ -993,7 +993,7 @@ async function runDoctorCI(options) {
993
993
  */
994
994
  const migrateCommand = nativeCommandFactory(migrationConfig);
995
995
  //#endregion
996
- //#region src/commands/revenue.ts
996
+ //#region src/cli/commands/revenue.ts
997
997
  /**
998
998
  * `wizard revenue-analytics` — flat skill command, Stripe today.
999
999
  *
@@ -1002,7 +1002,7 @@ const migrateCommand = nativeCommandFactory(migrationConfig);
1002
1002
  */
1003
1003
  const revenueCommand = nativeCommandFactory(revenueAnalyticsConfig);
1004
1004
  //#endregion
1005
- //#region src/commands/warehouse.ts
1005
+ //#region src/cli/commands/warehouse.ts
1006
1006
  /**
1007
1007
  * `wizard warehouse` — detect and connect a data warehouse source.
1008
1008
  *
@@ -1011,7 +1011,7 @@ const revenueCommand = nativeCommandFactory(revenueAnalyticsConfig);
1011
1011
  */
1012
1012
  const warehouseCommand = nativeCommandFactory(warehouseSourceConfig);
1013
1013
  //#endregion
1014
- //#region src/commands/self-driving.ts
1014
+ //#region src/cli/commands/self-driving.ts
1015
1015
  const selfDrivingCommand = {
1016
1016
  name: "self-driving",
1017
1017
  description: selfDrivingConfig.description,
@@ -1040,7 +1040,7 @@ const selfDrivingCommand = {
1040
1040
  }
1041
1041
  };
1042
1042
  //#endregion
1043
- //#region src/commands/slack.ts
1043
+ //#region src/cli/commands/slack.ts
1044
1044
  const slackCommand = {
1045
1045
  name: "slack",
1046
1046
  description: "Connect PostHog to your Slack",
@@ -1055,8 +1055,8 @@ function runSlackConnect(argv) {
1055
1055
  (async () => {
1056
1056
  const debug = argv.debug;
1057
1057
  try {
1058
- const { startTUI } = await import("./start-tui-Bo2L0bar.js");
1059
- const { buildSession } = await import("./wizard-session-DGaUHOF3.js");
1058
+ const { startTUI } = await import("./start-tui-DicLfgsj.js");
1059
+ const { buildSession } = await import("./wizard-session-B7BHnay0.js");
1060
1060
  const tui = startTUI(VERSION, Program.SlackConnect);
1061
1061
  tui.store.session = buildSession({
1062
1062
  debug,
@@ -1074,7 +1074,7 @@ function runSlackConnect(argv) {
1074
1074
  })();
1075
1075
  }
1076
1076
  //#endregion
1077
- //#region src/commands/upload-sourcemaps.ts
1077
+ //#region src/cli/commands/upload-sourcemaps.ts
1078
1078
  const uploadSourcemapsCommand = {
1079
1079
  name: [errorTrackingUploadSourceMapsConfig.command, "upload-sourcemaps"],
1080
1080
  description: errorTrackingUploadSourceMapsConfig.description,
@@ -1093,7 +1093,7 @@ const uploadSourcemapsCommand = {
1093
1093
  }
1094
1094
  };
1095
1095
  //#endregion
1096
- //#region src/commands/error-tracking.ts
1096
+ //#region src/cli/commands/error-tracking.ts
1097
1097
  /**
1098
1098
  * `wizard error-tracking` — flat skill command, set up error tracking today.
1099
1099
  *
@@ -1104,7 +1104,55 @@ const uploadSourcemapsCommand = {
1104
1104
  */
1105
1105
  const errorTrackingCommand = nativeCommandFactory(errorTrackingConfig);
1106
1106
  //#endregion
1107
- //#region src/commands/basic-integration/skill.ts
1107
+ //#region src/tools/skill-list/index.ts
1108
+ const BROWSABLE_ROLES = new Set(["command", "skill"]);
1109
+ function formatEntry(entry) {
1110
+ const path = entry.parentCommand ? `wizard ${entry.parentCommand} ${entry.command}` : entry.command ? `wizard ${entry.command}` : `wizard skill ${entry.skillId}`;
1111
+ return ` ${entry.skillId.padEnd(38)} ${path.padEnd(36)} ${entry.description}`;
1112
+ }
1113
+ /**
1114
+ * `wizard skill list` — fetch and print every browsable skill in the catalog.
1115
+ *
1116
+ * Reads the live `skill-menu.json` so new skills appear immediately after a
1117
+ * context-mill release. `internal` skills are excluded from the listing.
1118
+ */
1119
+ const listCommand = {
1120
+ name: "list",
1121
+ description: "List every browsable skill in the catalog",
1122
+ handler: () => {
1123
+ runCommandHandler(async () => {
1124
+ const skillsBaseUrl = getSkillsBaseUrl();
1125
+ const menu = await fetchSkillMenu(skillsBaseUrl);
1126
+ if (!menu) {
1127
+ analytics.wizardCapture("cli dispatch error", {
1128
+ reason: "registry unreachable",
1129
+ family: "skill",
1130
+ sub: "list",
1131
+ skillsBaseUrl
1132
+ });
1133
+ try {
1134
+ await analytics.flush();
1135
+ } catch {}
1136
+ process.stderr.write("\n\x1B[1;91m✖ Couldn't reach the skill registry.\x1B[0m\n Check your network connection and try again.\n\n");
1137
+ emitWizardError({
1138
+ code: ErrorCodes.SkillMenuFetchFailed,
1139
+ message: "Couldn't reach the skill registry."
1140
+ });
1141
+ process.exit(1);
1142
+ }
1143
+ const entries = (menu.cliEntries ?? []).filter((e) => BROWSABLE_ROLES.has(e.role));
1144
+ if (entries.length === 0) {
1145
+ process.stdout.write("No skills found.\n");
1146
+ return;
1147
+ }
1148
+ process.stdout.write(`${entries.length} skill${entries.length === 1 ? "" : "s"}:\n`);
1149
+ process.stdout.write(` ${"SKILL ID".padEnd(38)} ${"COMMAND".padEnd(36)} DESCRIPTION\n`);
1150
+ for (const entry of entries) process.stdout.write(`${formatEntry(entry)}\n`);
1151
+ });
1152
+ }
1153
+ };
1154
+ //#endregion
1155
+ //#region src/cli/commands/basic-integration/skill.ts
1108
1156
  /** Run an arbitrary context-mill skill by id (`wizard skill <id>`, headless with `--ci`). */
1109
1157
  function runSkillMode(argv) {
1110
1158
  const skillId = argv.skill;
@@ -1128,12 +1176,11 @@ function runSkillMode(argv) {
1128
1176
  else runWizard(config, options);
1129
1177
  }
1130
1178
  //#endregion
1131
- //#region src/commands/skill.ts
1179
+ //#region src/cli/commands/skill.ts
1132
1180
  /** Read the `<skill-name>` positional (yargs camelCases the hyphenated key). */
1133
1181
  function readSkillName(argv) {
1134
1182
  return String(argv.skillName ?? argv["skill-name"] ?? "").trim();
1135
1183
  }
1136
- const BROWSABLE_ROLES = new Set(["command", "skill"]);
1137
1184
  /**
1138
1185
  * Reject an unknown skill id before the wizard authenticates.
1139
1186
  *
@@ -1164,10 +1211,6 @@ async function assertSkillExists(skillName) {
1164
1211
  } catch {}
1165
1212
  throw new Error(`Unknown skill "${skillName}". Run \`wizard skill list\` to see available skills.`);
1166
1213
  }
1167
- function formatEntry(entry) {
1168
- const path = entry.parentCommand ? `wizard ${entry.parentCommand} ${entry.command}` : entry.command ? `wizard ${entry.command}` : `wizard skill ${entry.skillId}`;
1169
- return ` ${entry.skillId.padEnd(38)} ${path.padEnd(36)} ${entry.description}`;
1170
- }
1171
1214
  /**
1172
1215
  * `wizard skill <skill-name>` — run a single context-mill skill by id.
1173
1216
  * `wizard skill list` — list every browsable skill in the catalog.
@@ -1179,41 +1222,7 @@ function formatEntry(entry) {
1179
1222
  const skillCommand = {
1180
1223
  name: "skill <skill-name>",
1181
1224
  description: "Run a specific context-mill skill by name (or `list` them)",
1182
- children: [{
1183
- name: "list",
1184
- description: "List every browsable skill in the catalog",
1185
- handler: () => {
1186
- runCommandHandler(async () => {
1187
- const skillsBaseUrl = getSkillsBaseUrl();
1188
- const menu = await fetchSkillMenu(skillsBaseUrl);
1189
- if (!menu) {
1190
- analytics.wizardCapture("cli dispatch error", {
1191
- reason: "registry unreachable",
1192
- family: "skill",
1193
- sub: "list",
1194
- skillsBaseUrl
1195
- });
1196
- try {
1197
- await analytics.flush();
1198
- } catch {}
1199
- process.stderr.write("\n\x1B[1;91m✖ Couldn't reach the skill registry.\x1B[0m\n Check your network connection and try again.\n\n");
1200
- emitWizardError({
1201
- code: ErrorCodes.SkillMenuFetchFailed,
1202
- message: "Couldn't reach the skill registry."
1203
- });
1204
- process.exit(1);
1205
- }
1206
- const entries = (menu.cliEntries ?? []).filter((e) => BROWSABLE_ROLES.has(e.role));
1207
- if (entries.length === 0) {
1208
- process.stdout.write("No skills found.\n");
1209
- return;
1210
- }
1211
- process.stdout.write(`${entries.length} skill${entries.length === 1 ? "" : "s"}:\n`);
1212
- process.stdout.write(` ${"SKILL ID".padEnd(38)} ${"COMMAND".padEnd(36)} DESCRIPTION\n`);
1213
- for (const entry of entries) process.stdout.write(`${formatEntry(entry)}\n`);
1214
- });
1215
- }
1216
- }],
1225
+ children: [listCommand],
1217
1226
  options: { ...skillProgramOptions },
1218
1227
  positionals: { "skill-name": {
1219
1228
  type: "string",
@@ -1236,40 +1245,7 @@ const skillCommand = {
1236
1245
  }
1237
1246
  };
1238
1247
  //#endregion
1239
- //#region src/commands/cli/add.ts
1240
- const cliAddCommand = {
1241
- name: "add",
1242
- description: "Install or update PostHog CLI and add steering instructions to your coding agent's global instructions file",
1243
- options: {
1244
- agent: {
1245
- describe: "Agent to install the instructions for",
1246
- choices: CLI_STEERING_TARGETS.map((target) => target.id),
1247
- type: "string"
1248
- },
1249
- path: {
1250
- describe: "Write to an explicit instructions file instead of a detected agent",
1251
- type: "string"
1252
- },
1253
- all: {
1254
- default: false,
1255
- describe: "Install for every detected agent without prompting",
1256
- type: "boolean"
1257
- }
1258
- },
1259
- examples: [
1260
- ["wizard cli add", "Detect your coding agents and pick one"],
1261
- ["wizard cli add --agent claude-code", "Install for Claude Code (~/.claude/CLAUDE.md)"],
1262
- ["wizard cli add --all", "Install for every detected agent"],
1263
- ["wizard cli add --path ./AGENTS.md", "Install into a specific instructions file"]
1264
- ],
1265
- check: (argv) => {
1266
- if (argv.all && (argv.agent || argv.path)) throw new Error("--all cannot be combined with --agent or --path");
1267
- return true;
1268
- },
1269
- handler: (argv) => {
1270
- runCliAdd(argv);
1271
- }
1272
- };
1248
+ //#region src/tools/cli-steering/index.ts
1273
1249
  async function runCliAdd(argv) {
1274
1250
  setUI(new LoggingUI());
1275
1251
  const ui = getUI();
@@ -1371,11 +1347,43 @@ async function promptForTargets(detected) {
1371
1347
  }
1372
1348
  }
1373
1349
  //#endregion
1374
- //#region src/commands/cli/index.ts
1350
+ //#region src/cli/commands/cli/index.ts
1375
1351
  const cliCommand = {
1376
1352
  name: "cli",
1377
1353
  description: "PostHog CLI agent integration commands",
1378
- children: [cliAddCommand]
1354
+ children: [{
1355
+ name: "add",
1356
+ description: "Install or update PostHog CLI and add steering instructions to your coding agent's global instructions file",
1357
+ options: {
1358
+ agent: {
1359
+ describe: "Agent to install the instructions for",
1360
+ choices: CLI_STEERING_TARGETS.map((target) => target.id),
1361
+ type: "string"
1362
+ },
1363
+ path: {
1364
+ describe: "Write to an explicit instructions file instead of a detected agent",
1365
+ type: "string"
1366
+ },
1367
+ all: {
1368
+ default: false,
1369
+ describe: "Install for every detected agent without prompting",
1370
+ type: "boolean"
1371
+ }
1372
+ },
1373
+ examples: [
1374
+ ["wizard cli add", "Detect your coding agents and pick one"],
1375
+ ["wizard cli add --agent claude-code", "Install for Claude Code (~/.claude/CLAUDE.md)"],
1376
+ ["wizard cli add --all", "Install for every detected agent"],
1377
+ ["wizard cli add --path ./AGENTS.md", "Install into a specific instructions file"]
1378
+ ],
1379
+ check: (argv) => {
1380
+ if (argv.all && (argv.agent || argv.path)) throw new Error("--all cannot be combined with --agent or --path");
1381
+ return true;
1382
+ },
1383
+ handler: (argv) => {
1384
+ runCliAdd(argv);
1385
+ }
1386
+ }]
1379
1387
  };
1380
1388
  //#endregion
1381
1389
  //#region main.ts
@@ -1393,4 +1401,4 @@ Wizard.use(basicIntegrationCommand).use(mcpCommand).use(mcpAnalyticsCommand).use
1393
1401
  //#endregion
1394
1402
  export {};
1395
1403
 
1396
- //# sourceMappingURL=main-CgKxbwMP.js.map
1404
+ //# sourceMappingURL=main-DKPjFHEV.js.map