vybekiit 0.7.25 → 0.7.27

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 (247) hide show
  1. package/dist/bin.js +3891 -1301
  2. package/dist/global-skills/aws-cdk/SKILL.md +19 -5
  3. package/dist/global-skills/aws-cdk/references/fast-deployments.md +191 -0
  4. package/dist/global-skills/aws-cdk/references/troubleshooting-deployment.md +16 -0
  5. package/dist/global-skills/aws-cloudformation/SKILL.md +16 -26
  6. package/dist/global-skills/aws-cloudformation/references/check-cloudformation-template-compliance.script.md +7 -3
  7. package/dist/global-skills/aws-cloudformation/references/cloudformation-language-server.md +177 -0
  8. package/dist/global-skills/aws-cloudformation/references/cloudformation-pre-deploy-validation.script.md +8 -2
  9. package/dist/global-skills/aws-cloudformation/references/persist-template-context.script.md +5 -8
  10. package/dist/global-skills/aws-cloudformation/references/retrieve-template-context.script.md +1 -1
  11. package/dist/global-skills/aws-cloudformation/references/security-considerations.md +51 -0
  12. package/dist/global-skills/aws-cloudformation/references/troubleshoot-failed-stack.script.md +138 -0
  13. package/dist/global-skills/aws-cloudformation/references/{validate-cloudformation-template.script.md → validate-with-cfn-lint.script.md} +15 -27
  14. package/dist/global-skills/aws-cloudformation/references/validate-with-cloudformation-validate.script.md +181 -0
  15. package/dist/global-skills/aws-cloudformation/references/validation-tool-selection.md +44 -0
  16. package/dist/global-skills/aws-serverless/SKILL.md +9 -1
  17. package/dist/global-skills/aws-serverless/references/architecture.md +3 -1
  18. package/dist/global-skills/aws-serverless/references/lambda.md +3 -1
  19. package/dist/global-skills/aws-serverless/references/orchestration.md +1 -0
  20. package/dist/global-skills/better-auth-best-practices/SKILL.md +18 -8
  21. package/dist/global-skills/eas-app-stores/SKILL.md +31 -15
  22. package/dist/global-skills/eas-app-stores/agents/openai.yaml +2 -2
  23. package/dist/global-skills/eas-app-stores/references/ios-app-store.md +37 -32
  24. package/dist/global-skills/eas-app-stores/references/native-ios.md +167 -0
  25. package/dist/global-skills/eas-app-stores/references/play-store.md +3 -7
  26. package/dist/global-skills/eas-app-stores/references/testflight.md +39 -35
  27. package/dist/global-skills/eas-simulator/SKILL.md +48 -26
  28. package/dist/global-skills/eas-simulator/references/controllers.md +32 -3
  29. package/dist/global-skills/eas-simulator/references/run-your-app.md +34 -4
  30. package/dist/global-skills/eas-simulator/references/troubleshooting.md +8 -4
  31. package/dist/global-skills/eas-update/SKILL.md +146 -0
  32. package/dist/global-skills/eas-update/agents/openai.yaml +4 -0
  33. package/dist/global-skills/expo-animation/RECIPES.md +2 -2
  34. package/dist/global-skills/expo-animation/SKILL.md +9 -2
  35. package/dist/global-skills/expo-brownfield/SKILL.md +18 -11
  36. package/dist/global-skills/expo-brownfield/agents/openai.yaml +2 -2
  37. package/dist/global-skills/expo-brownfield/references/brownfield-integrated.md +94 -69
  38. package/dist/global-skills/expo-brownfield/references/brownfield-isolated.md +40 -42
  39. package/dist/global-skills/expo-brownfield/references/comparison.md +5 -5
  40. package/dist/global-skills/expo-brownfield/references/feature-integration.md +163 -0
  41. package/dist/global-skills/expo-brownfield/references/troubleshooting.md +17 -17
  42. package/dist/global-skills/expo-brownfield/references/version-compatibility.md +40 -0
  43. package/dist/global-skills/expo-data-fetching/SKILL.md +27 -6
  44. package/dist/global-skills/expo-design-system/SKILL.md +27 -7
  45. package/dist/global-skills/expo-design-system/references/audit.md +7 -2
  46. package/dist/global-skills/expo-design-system/references/native-slop.md +74 -0
  47. package/dist/global-skills/expo-examples/SKILL.md +0 -1
  48. package/dist/global-skills/expo-examples/references/catalog.md +1 -1
  49. package/dist/global-skills/expo-migrate-module/SKILL.md +21 -10
  50. package/dist/global-skills/expo-migrate-module/references/compatibility.md +80 -23
  51. package/dist/global-skills/expo-migrate-module/references/migration-map.md +162 -11
  52. package/dist/global-skills/expo-native-ui/SKILL.md +25 -16
  53. package/dist/global-skills/expo-native-ui/agents/openai.yaml +2 -2
  54. package/dist/global-skills/expo-native-ui/references/controls.md +5 -46
  55. package/dist/global-skills/expo-native-ui/references/icons.md +21 -2
  56. package/dist/global-skills/expo-native-ui/references/media.md +15 -20
  57. package/dist/global-skills/expo-native-ui/references/visual-effects.md +12 -11
  58. package/dist/global-skills/expo-overview/SKILL.md +17 -12
  59. package/dist/global-skills/expo-router/SKILL.md +5 -3
  60. package/dist/global-skills/expo-router/references/tabs.md +5 -5
  61. package/dist/global-skills/expo-skill-eval/scripts/check-static.sh +0 -0
  62. package/dist/global-skills/expo-skill-eval/scripts/clean-fixture.sh +0 -0
  63. package/dist/global-skills/expo-skill-eval/scripts/latest-sdk.sh +0 -0
  64. package/dist/global-skills/expo-skill-eval/scripts/make-fixture.sh +0 -0
  65. package/dist/global-skills/expo-skill-eval/scripts/make-workspace.sh +0 -0
  66. package/dist/global-skills/expo-skill-eval/scripts/snapshot-android.sh +0 -0
  67. package/dist/global-skills/expo-skill-eval/scripts/snapshot-ios.sh +0 -0
  68. package/dist/global-skills/expo-skill-eval/scripts/snapshot-web.sh +0 -0
  69. package/dist/global-skills/expo-upgrade/SKILL.md +3 -1
  70. package/dist/global-skills/expo-web-to-native/references/false-friends.md +2 -2
  71. package/dist/global-skills/expo-web-to-native/references/native-patterns.md +1 -1
  72. package/dist/global-skills/firebase-ai-logic-basics/SKILL.md +13 -16
  73. package/dist/global-skills/firebase-ai-logic-basics/references/ios_setup.md +4 -5
  74. package/dist/global-skills/firebase-ai-logic-basics/references/usage_patterns_android.md +4 -4
  75. package/dist/global-skills/firebase-ai-logic-basics/references/usage_patterns_web.md +3 -3
  76. package/dist/global-skills/firebase-auth-basics/SKILL.md +11 -6
  77. package/dist/global-skills/firebase-auth-basics/references/client_sdk_android.md +4 -5
  78. package/dist/global-skills/firebase-auth-basics/references/client_sdk_web.md +3 -3
  79. package/dist/global-skills/firebase-auth-basics/references/flutter_setup.md +24 -25
  80. package/dist/global-skills/firebase-auth-basics/references/security_rules.md +4 -2
  81. package/dist/global-skills/firebase-crashlytics/references/android_setup.md +7 -4
  82. package/dist/global-skills/firebase-crashlytics/references/ios_setup.md +2 -3
  83. package/dist/global-skills/firebase-data-connect/SKILL.md +2 -1
  84. package/dist/global-skills/firebase-data-connect/examples.md +4 -4
  85. package/dist/global-skills/firebase-data-connect/reference/config.md +5 -4
  86. package/dist/global-skills/firebase-data-connect/reference/realtime.md +1 -2
  87. package/dist/global-skills/firebase-data-connect/reference/sdk_flutter.md +2 -2
  88. package/dist/global-skills/firebase-data-connect/reference/sdk_ios.md +2 -2
  89. package/dist/global-skills/firebase-data-connect/reference/sdk_web.md +17 -6
  90. package/dist/global-skills/firebase-data-connect/reference/security.md +5 -5
  91. package/dist/global-skills/firebase-data-connect/templates.md +2 -1
  92. package/dist/global-skills/firebase-firestore/SKILL.md +20 -8
  93. package/dist/global-skills/firebase-firestore/references/enterprise/android_sdk_usage.md +5 -4
  94. package/dist/global-skills/firebase-firestore/references/enterprise/data_model.md +12 -3
  95. package/dist/global-skills/firebase-firestore/references/enterprise/indexes.md +16 -18
  96. package/dist/global-skills/firebase-firestore/references/enterprise/provisioning.md +1 -1
  97. package/dist/global-skills/firebase-firestore/references/enterprise/python_sdk_usage.md +5 -1
  98. package/dist/global-skills/firebase-firestore/references/enterprise/web_sdk_usage.md +7 -7
  99. package/dist/global-skills/firebase-firestore/references/standard/android_sdk_usage.md +5 -5
  100. package/dist/global-skills/firebase-firestore/references/standard/flutter_setup.md +4 -4
  101. package/dist/global-skills/firebase-firestore/references/standard/indexes.md +16 -18
  102. package/dist/global-skills/firebase-firestore/references/standard/provisioning.md +1 -1
  103. package/dist/global-skills/firebase-remote-config-basics/SKILL.md +0 -5
  104. package/dist/global-skills/firebase-remote-config-basics/references/android_setup.md +36 -8
  105. package/dist/global-skills/firebase-remote-config-basics/references/ios_setup.md +1 -7
  106. package/dist/global-skills/firebase-security-rules-auditor/SKILL.md +17 -6
  107. package/dist/global-skills/{firebase-firestore/references/standard/security_rules.md → firestore-rules-creation/SKILL.md} +24 -13
  108. package/dist/global-skills/grow-my-customers/SKILL.md +23 -0
  109. package/dist/global-skills/instrument-feature-flags/SKILL.md +25 -25
  110. package/dist/global-skills/instrument-feature-flags/references/adding-feature-flag-code.md +141 -285
  111. package/dist/global-skills/instrument-feature-flags/references/android.md +6 -15
  112. package/dist/global-skills/instrument-feature-flags/references/api.md +4 -11
  113. package/dist/global-skills/instrument-feature-flags/references/best-practices.md +1 -13
  114. package/dist/global-skills/instrument-feature-flags/references/django.md +14 -27
  115. package/dist/global-skills/instrument-feature-flags/references/dotnet.md +20 -79
  116. package/dist/global-skills/instrument-feature-flags/references/elixir.md +1 -9
  117. package/dist/global-skills/instrument-feature-flags/references/flask.md +13 -13
  118. package/dist/global-skills/instrument-feature-flags/references/flutter.md +3 -24
  119. package/dist/global-skills/instrument-feature-flags/references/go.md +3 -15
  120. package/dist/global-skills/instrument-feature-flags/references/ios.md +4 -17
  121. package/dist/global-skills/instrument-feature-flags/references/java.md +5 -13
  122. package/dist/global-skills/instrument-feature-flags/references/laravel.md +13 -17
  123. package/dist/global-skills/instrument-feature-flags/references/next-js.md +25 -32
  124. package/dist/global-skills/instrument-feature-flags/references/nodejs.md +8 -15
  125. package/dist/global-skills/instrument-feature-flags/references/php.md +1 -15
  126. package/dist/global-skills/instrument-feature-flags/references/python.md +2 -15
  127. package/dist/global-skills/instrument-feature-flags/references/react-native.md +13 -15
  128. package/dist/global-skills/instrument-feature-flags/references/react.md +17 -21
  129. package/dist/global-skills/instrument-feature-flags/references/ruby-on-rails.md +37 -83
  130. package/dist/global-skills/instrument-feature-flags/references/ruby.md +2 -15
  131. package/dist/global-skills/instrument-feature-flags/references/rust.md +13 -25
  132. package/dist/global-skills/instrument-feature-flags/references/usage.md +14 -63
  133. package/dist/global-skills/instrument-feature-flags/references/web.md +9 -14
  134. package/dist/global-skills/instrument-product-analytics/SKILL.md +29 -29
  135. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-hybrid.md +3 -1
  136. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-ssr.md +3 -1
  137. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-static.md +3 -1
  138. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-view-transitions.md +3 -1
  139. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-ruby-on-rails.md +3 -1
  140. package/dist/global-skills/instrument-product-analytics/references/android.md +72 -107
  141. package/dist/global-skills/instrument-product-analytics/references/angular.md +26 -28
  142. package/dist/global-skills/instrument-product-analytics/references/astro.md +13 -24
  143. package/dist/global-skills/instrument-product-analytics/references/configuration.md +45 -63
  144. package/dist/global-skills/instrument-product-analytics/references/django.md +14 -27
  145. package/dist/global-skills/instrument-product-analytics/references/dotnet.md +20 -79
  146. package/dist/global-skills/instrument-product-analytics/references/elixir.md +47 -49
  147. package/dist/global-skills/instrument-product-analytics/references/flask.md +13 -13
  148. package/dist/global-skills/instrument-product-analytics/references/flutter.md +60 -90
  149. package/dist/global-skills/instrument-product-analytics/references/go.md +17 -56
  150. package/dist/global-skills/instrument-product-analytics/references/identify-users.md +15 -15
  151. package/dist/global-skills/instrument-product-analytics/references/ios.md +11 -15
  152. package/dist/global-skills/instrument-product-analytics/references/laravel.md +13 -17
  153. package/dist/global-skills/instrument-product-analytics/references/next-js.md +25 -32
  154. package/dist/global-skills/instrument-product-analytics/references/nuxt-js-3-6.md +13 -27
  155. package/dist/global-skills/instrument-product-analytics/references/nuxt-js.md +14 -28
  156. package/dist/global-skills/instrument-product-analytics/references/php.md +33 -84
  157. package/dist/global-skills/instrument-product-analytics/references/posthog-python.md +229 -9
  158. package/dist/global-skills/instrument-product-analytics/references/python.md +415 -106
  159. package/dist/global-skills/instrument-product-analytics/references/react-native.md +161 -155
  160. package/dist/global-skills/instrument-product-analytics/references/react-router-v6.md +12 -33
  161. package/dist/global-skills/instrument-product-analytics/references/react-router-v7-data-mode.md +15 -33
  162. package/dist/global-skills/instrument-product-analytics/references/react-router-v7-declarative-mode.md +12 -33
  163. package/dist/global-skills/instrument-product-analytics/references/react-router-v7-framework-mode.md +26 -41
  164. package/dist/global-skills/instrument-product-analytics/references/ruby-on-rails.md +37 -83
  165. package/dist/global-skills/instrument-product-analytics/references/ruby.md +48 -108
  166. package/dist/global-skills/instrument-product-analytics/references/svelte.md +18 -24
  167. package/dist/global-skills/instrument-product-analytics/references/tanstack-start.md +17 -19
  168. package/dist/global-skills/instrument-product-analytics/references/usage.md +14 -63
  169. package/dist/global-skills/instrument-product-analytics/references/vue-js.md +29 -28
  170. package/dist/global-skills/manifest.json +8 -2
  171. package/dist/global-skills/mongodb-search-and-ai/SKILL.md +28 -37
  172. package/dist/global-skills/mongodb-search-and-ai/references/automated-embedding.md +438 -0
  173. package/dist/global-skills/mongodb-search-and-ai/references/hybrid-search.md +60 -4
  174. package/dist/global-skills/mongodb-search-and-ai/references/vector-search.md +46 -108
  175. package/dist/global-skills/neon/SKILL.md +207 -213
  176. package/dist/global-skills/neon/references/auth.md +12 -0
  177. package/dist/global-skills/neon/references/claimable-neon.md +10 -14
  178. package/dist/global-skills/neon/references/function-triggers.md +53 -0
  179. package/dist/global-skills/neon/references/logs-loki.md +61 -0
  180. package/dist/global-skills/neon/references/parse-env.md +32 -0
  181. package/dist/global-skills/neon/references/sdk.md +7 -0
  182. package/dist/global-skills/neon-ai-gateway/SKILL.md +14 -16
  183. package/dist/global-skills/neon-auth/SKILL.md +155 -0
  184. package/dist/global-skills/neon-auth/references/managed-auth.md +173 -0
  185. package/dist/global-skills/neon-auth/references/self-managed.md +25 -0
  186. package/dist/global-skills/neon-functions/SKILL.md +159 -84
  187. package/dist/global-skills/neon-functions/references/ai-sdk.md +4 -6
  188. package/dist/global-skills/neon-functions/references/function-triggers.md +249 -0
  189. package/dist/global-skills/neon-functions/references/mastra-studio.md +3 -3
  190. package/dist/global-skills/neon-functions/references/mcp.md +1 -1
  191. package/dist/global-skills/neon-functions/references/production-hardening.md +340 -0
  192. package/dist/global-skills/neon-functions/references/sse.md +8 -5
  193. package/dist/global-skills/neon-object-storage/SKILL.md +10 -11
  194. package/dist/global-skills/neon-postgres/SKILL.md +120 -17
  195. package/dist/global-skills/neon-postgres/references/full-text-search.md +99 -0
  196. package/dist/global-skills/neon-postgres/references/hybrid-search.md +90 -0
  197. package/dist/global-skills/neon-postgres/references/lakebase-search-drizzle.md +172 -0
  198. package/dist/global-skills/neon-postgres/references/vector-search.md +137 -0
  199. package/dist/global-skills/neon-postgres-branches/SKILL.md +3 -3
  200. package/dist/global-skills/neon-postgres-egress-optimizer/SKILL.md +1 -1
  201. package/dist/global-skills/onboarding/SKILL.md +8 -6
  202. package/dist/global-skills/resend/SKILL.md +4 -2
  203. package/dist/global-skills/resend/references/broadcasts.md +6 -1
  204. package/dist/global-skills/resend/references/receiving.md +29 -10
  205. package/dist/global-skills/resend/references/sending/email-management.md +14 -4
  206. package/dist/global-skills/resend/references/topics.md +9 -6
  207. package/dist/global-skills/resend/references/usage.md +117 -0
  208. package/dist/global-skills/resend/references/webhooks.md +59 -2
  209. package/dist/global-skills/stripe-best-practices/SKILL.md +35 -29
  210. package/dist/global-skills/stripe-best-practices/references/billing.md +9 -2
  211. package/dist/global-skills/stripe-best-practices/references/payments.md +4 -2
  212. package/dist/global-skills/stripe-best-practices/references/security.md +3 -1
  213. package/dist/global-skills/stripe-best-practices/references/tax.md +39 -20
  214. package/dist/global-skills/supabase/SKILL.md +6 -0
  215. package/dist/global-skills/use-railway/SKILL.md +42 -22
  216. package/dist/global-skills/use-railway/references/analyze-db.md +7 -6
  217. package/dist/global-skills/use-railway/references/cloud-agents.md +70 -0
  218. package/dist/global-skills/use-railway/references/configure.md +17 -2
  219. package/dist/global-skills/use-railway/references/databases.md +107 -0
  220. package/dist/global-skills/use-railway/references/deploy.md +5 -5
  221. package/dist/global-skills/use-railway/references/feature-flags.md +25 -13
  222. package/dist/global-skills/use-railway/references/iac.md +66 -77
  223. package/dist/global-skills/use-railway/references/operate.md +26 -3
  224. package/dist/global-skills/use-railway/references/request.md +31 -23
  225. package/dist/global-skills/use-railway/references/setup.md +16 -5
  226. package/dist/global-skills/use-railway/references/tracing.md +261 -0
  227. package/dist/global-skills/use-railway/references/usage.md +52 -0
  228. package/dist/global-skills/use-railway/scripts/analyze-mongo.py +0 -0
  229. package/dist/global-skills/use-railway/scripts/analyze-mysql.py +0 -0
  230. package/dist/global-skills/use-railway/scripts/analyze-postgres.py +0 -0
  231. package/dist/global-skills/use-railway/scripts/analyze-redis.py +0 -0
  232. package/dist/global-skills/use-railway/scripts/enable-pg-stats.py +0 -0
  233. package/dist/global-skills/use-railway/scripts/pg-extensions.py +0 -0
  234. package/dist/global-skills/use-railway/scripts/railway-api.sh +0 -0
  235. package/dist/global-skills/validate-my-idea/SKILL.md +54 -0
  236. package/dist/global-skills/{feedback → vybekiit-feedback}/SKILL.md +16 -12
  237. package/dist/global-skills/watch-my-app/SKILL.md +53 -0
  238. package/dist/global-skills/workers-best-practices/SKILL.md +36 -103
  239. package/dist/global-skills/workers-best-practices/references/configuration.md +139 -0
  240. package/dist/global-skills/workers-best-practices/references/platform-apis.md +51 -0
  241. package/dist/global-skills/workers-best-practices/references/{rules.md → runtime-patterns.md} +13 -137
  242. package/dist/global-skills/wrangler/SKILL.md +48 -901
  243. package/dist/global-skills/xcode-project-setup/scripts/xcode_spm_setup/Sources/main.swift +19 -15
  244. package/package.json +22 -22
  245. package/dist/global-skills/expo-native-ui/references/animations.md +0 -220
  246. package/dist/global-skills/firebase-firestore/references/enterprise/security_rules.md +0 -577
  247. package/dist/global-skills/workers-best-practices/references/review.md +0 -174
@@ -1,10 +1,6 @@
1
1
  > AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt
2
2
 
3
- # TanStack Start - Docs
4
-
5
- Copy page
6
-
7
- # TanStack Start - Docs
3
+ # TanStack Start
8
4
 
9
5
  This tutorial shows how to integrate PostHog with a [TanStack Start](https://tanstack.com/start) app for both client-side and server-side analytics.
10
6
 
@@ -14,8 +10,6 @@ Install the required packages:
14
10
 
15
11
  Terminal
16
12
 
17
- PostHog AI
18
-
19
13
  ```bash
20
14
  npm install @posthog/react posthog-node
21
15
  ```
@@ -37,8 +31,6 @@ If your app calls your own backend, `tracing_headers` adds `X-POSTHOG-DISTINCT-I
37
31
 
38
32
  JavaScript
39
33
 
40
- PostHog AI
41
-
42
34
  ```javascript
43
35
  posthog.init('<ph_project_token>', {
44
36
  api_host: 'https://us.i.posthog.com',
@@ -55,14 +47,14 @@ Tracing headers help you attribute events across front and backend consistently.
55
47
 
56
48
  Wrap your app with `PostHogProvider` in your root route with your project token, host, and other options.
57
49
 
58
- PostHog AI
59
-
60
50
  ```
61
51
  import CspAllowancesCallout from "../_snippets/csp-allowances-callout.mdx"
52
+
62
53
  <CspAllowancesCallout />tsx file=src/routes/__root.tsx
63
54
  // src/routes/__root.tsx
64
55
  import { HeadContent, Scripts, createRootRoute } from '@tanstack/react-router'
65
56
  import { PostHogProvider } from '@posthog/react'
57
+
66
58
  export const Route = createRootRoute({
67
59
  head: () => ({
68
60
  meta: [
@@ -72,6 +64,7 @@ export const Route = createRootRoute({
72
64
  }),
73
65
  shellComponent: RootDocument,
74
66
  })
67
+
75
68
  function RootDocument({ children }: { children: React.ReactNode }) {
76
69
  return (
77
70
  <html lang="en">
@@ -104,18 +97,19 @@ Use the `usePostHog` hook from `@posthog/react` in any component to capture cust
104
97
 
105
98
  src/routes/checkout.tsx
106
99
 
107
- PostHog AI
108
-
109
100
  ```jsx
110
101
  import { usePostHog } from '@posthog/react'
102
+
111
103
  function CheckoutButton({ orderId, total }: { orderId: string; total: number }) {
112
104
  const posthog = usePostHog()
105
+
113
106
  const handleClick = () => {
114
107
  posthog.capture('checkout_started', {
115
108
  order_id: orderId,
116
109
  total: total,
117
110
  })
118
111
  }
112
+
119
113
  return <button onClick={handleClick}>Checkout</button>
120
114
  }
121
115
  ```
@@ -126,17 +120,19 @@ Call `posthog.identify()` when a user logs in to link their events to a user ID:
126
120
 
127
121
  TSX
128
122
 
129
- PostHog AI
130
-
131
123
  ```jsx
132
124
  import { usePostHog } from '@posthog/react'
125
+
133
126
  function LoginForm() {
134
127
  const posthog = usePostHog()
128
+
135
129
  const handleLogin = async (userId: string, email: string) => {
136
130
  // ... your login logic
131
+
137
132
  posthog.identify(userId, {
138
133
  email: email,
139
134
  })
135
+
140
136
  posthog.capture('user_logged_in')
141
137
  }
142
138
  }
@@ -150,12 +146,12 @@ Create a server-side PostHog client using `posthog-node`. Use a singleton patter
150
146
 
151
147
  src/utils/posthog-server.ts
152
148
 
153
- PostHog AI
154
-
155
149
  ```typescript
156
150
  // src/utils/posthog-server.ts
157
151
  import { PostHog } from 'posthog-node'
152
+
158
153
  let posthogClient: PostHog | null = null
154
+
159
155
  export function getPostHogClient() {
160
156
  if (!posthogClient) {
161
157
  posthogClient = new PostHog(
@@ -177,19 +173,20 @@ Use the server client in TanStack Start API routes to capture events server-side
177
173
 
178
174
  src/routes/api/checkout.ts
179
175
 
180
- PostHog AI
181
-
182
176
  ```typescript
183
177
  // src/routes/api/checkout.ts
184
178
  import { createFileRoute } from '@tanstack/react-router'
185
179
  import { json } from '@tanstack/react-start'
186
180
  import { getPostHogClient } from '../../utils/posthog-server'
181
+
187
182
  export const Route = createFileRoute('/api/checkout')({
188
183
  server: {
189
184
  handlers: {
190
185
  POST: async ({ request }) => {
191
186
  const body = await request.json()
187
+
192
188
  const posthog = getPostHogClient()
189
+
193
190
  posthog.capture({
194
191
  distinctId: body.userId,
195
192
  event: 'item_purchased',
@@ -199,6 +196,7 @@ export const Route = createFileRoute('/api/checkout')({
199
196
  source: 'api',
200
197
  },
201
198
  })
199
+
202
200
  return json({ success: true })
203
201
  },
204
202
  },
@@ -1,10 +1,6 @@
1
1
  > AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt
2
2
 
3
- # iOS SDK usage - Docs
4
-
5
- Copy page
6
-
7
- # iOS SDK usage - Docs
3
+ # iOS SDK usage
8
4
 
9
5
  ## Capturing events
10
6
 
@@ -12,8 +8,6 @@ You can send custom events using `capture`:
12
8
 
13
9
  Swift
14
10
 
15
- PostHog AI
16
-
17
11
  ```swift
18
12
  PostHogSDK.shared.capture("user_signed_up")
19
13
  ```
@@ -26,8 +20,6 @@ Optionally, you can include additional information with the event by including a
26
20
 
27
21
  Swift
28
22
 
29
- PostHog AI
30
-
31
23
  ```swift
32
24
  PostHogSDK.shared.capture("user_signed_up", properties: ["login_type": "email"], userProperties: ["is_free_trial": true])
33
25
  ```
@@ -54,8 +46,6 @@ If you want to manually send a new screen capture event, use the `screen` functi
54
46
 
55
47
  Swift
56
48
 
57
- PostHog AI
58
-
59
49
  ```swift
60
50
  PostHogSDK.shared.screen("Dashboard", properties: ["fromIcon": "bottom"])
61
51
  ```
@@ -70,8 +60,6 @@ To track a screen view in `SwiftUI`, apply the `postHogScreenView` modifier to y
70
60
 
71
61
  HomeView.swift
72
62
 
73
- PostHog AI
74
-
75
63
  ```swift
76
64
  // This will trigger a screen view event with $screen_name: "HomeViewContent"
77
65
  struct HomeView: View {
@@ -80,6 +68,7 @@ struct HomeView: View {
80
68
  .postHogScreenView()
81
69
  }
82
70
  }
71
+
83
72
  // This will trigger a screen view event with $screen_name: "My Home View" and an additional event property from_button: "start"
84
73
  struct HomeView: View {
85
74
  var body: some View {
@@ -103,8 +92,6 @@ To assign a custom label to a UIView, use the `postHogLabel` property:
103
92
 
104
93
  Swift
105
94
 
106
- PostHog AI
107
-
108
95
  ```swift
109
96
  let view = UIView()
110
97
  view.postHogLabel = "usernameTextField"
@@ -118,8 +105,6 @@ In SwiftUI, use the `.postHogLabel(_:)` modifier instead:
118
105
 
119
106
  Swift
120
107
 
121
- PostHog AI
122
-
123
108
  ```swift
124
109
  var body: some View {
125
110
  ...
@@ -136,8 +121,6 @@ The generated analytics element in the examples above will have the following fo
136
121
 
137
122
  Swift
138
123
 
139
- PostHog AI
140
-
141
124
  ```swift
142
125
  <UITextField id="usernameTextField">text value</UITextField>
143
126
  ```
@@ -163,8 +146,6 @@ Interaction autocapture is **not enabled by default**. You can enable it by sett
163
146
 
164
147
  Swift
165
148
 
166
- PostHog AI
167
-
168
149
  ```swift
169
150
  let config = PostHogConfig(projectToken: "<ph_project_token>", host: "https://us.i.posthog.com")
170
151
  config.captureElementInteractions = true // Disabled by default
@@ -183,8 +164,6 @@ It is enabled by default (`rageClickConfig.enabled = true`).
183
164
 
184
165
  Swift
185
166
 
186
- PostHog AI
187
-
188
167
  ```swift
189
168
  let config = PostHogConfig(projectToken: "<ph_project_token>", host: "https://us.i.posthog.com")
190
169
  config.rageClickConfig.enabled = true // Enabled by default
@@ -217,8 +196,6 @@ An `identify` call has the following arguments:
217
196
 
218
197
  Swift
219
198
 
220
- PostHog AI
221
-
222
199
  ```swift
223
200
  PostHogSDK.shared.identify("user_id_from_your_database",
224
201
  userProperties: ["name": "Peter Griffin", "email": "peter@familyguy.com"],
@@ -243,13 +220,11 @@ In this case, you can use `alias` to assign another distinct ID to the same user
243
220
 
244
221
  Swift
245
222
 
246
- PostHog AI
247
-
248
223
  ```swift
249
224
  PostHogSDK.shared.alias("alias_id")
250
225
  ```
251
226
 
252
- We strongly recommend reading our docs on [alias](/docs/data/identify.md#alias-assigning-multiple-distinct-ids-to-the-same-user) to best understand how to correctly use this method.
227
+ We strongly recommend reading our docs on [alias](/docs/product-analytics/identify.md#alias-assigning-multiple-distinct-ids-to-the-same-user) to best understand how to correctly use this method.
253
228
 
254
229
  ## Anonymous vs identified events
255
230
 
@@ -289,8 +264,6 @@ For example:
289
264
 
290
265
  iOS
291
266
 
292
- PostHog AI
293
-
294
267
  ```swift
295
268
  let config = PostHogConfig(
296
269
  projectToken: POSTHOG_PROJECT_TOKEN,
@@ -314,14 +287,12 @@ Alternatively, you can set `personProfiles` to `.always` to capture identified e
314
287
 
315
288
  ## Setting person properties
316
289
 
317
- To set [properties](/docs/data/user-properties.md) on your users via an event, you can leverage the event properties `userProperties` and `userPropertiesSetOnce`.
290
+ To set [properties](/docs/product-analytics/person-properties.md) on your users via an event, you can leverage the event properties `userProperties` and `userPropertiesSetOnce`.
318
291
 
319
292
  When capturing an event, you can pass a property called `$set` as an event property, and specify its value to be an object with properties to be set on the user that will be associated with the user who triggered the event.
320
293
 
321
294
  Swift
322
295
 
323
- PostHog AI
324
-
325
296
  ```swift
326
297
  PostHogSDK.shared.capture("signed_up", properties: ["plan": "Pro++"], userProperties: ["user_property_name": "your_value"])
327
298
  ```
@@ -330,8 +301,6 @@ PostHogSDK.shared.capture("signed_up", properties: ["plan": "Pro++"], userProper
330
301
 
331
302
  Swift
332
303
 
333
- PostHog AI
334
-
335
304
  ```swift
336
305
  PostHogSDK.shared.capture("signed_up", properties: ["plan": "Pro++"], userPropertiesSetOnce: ["user_property_name": "your_value"])
337
306
  ```
@@ -340,10 +309,9 @@ Use `setPersonProperties` when you want to update the current person's profile w
340
309
 
341
310
  Swift
342
311
 
343
- PostHog AI
344
-
345
312
  ```swift
346
313
  PostHogSDK.shared.setPersonProperties(userPropertiesToSet: ["plan": "Pro++"])
314
+
347
315
  PostHogSDK.shared.setPersonProperties(
348
316
  userPropertiesToSet: ["plan": "Pro++"],
349
317
  userPropertiesToSetOnce: ["first_seen_source": "ios"]
@@ -360,8 +328,6 @@ For example, take a look at the following call:
360
328
 
361
329
  Swift
362
330
 
363
- PostHog AI
364
-
365
331
  ```swift
366
332
  PostHogSDK.shared.register(["team_id": 22])
367
333
  ```
@@ -376,8 +342,6 @@ Super properties persist across sessions so you have to explicitly remove them i
376
342
 
377
343
  Swift
378
344
 
379
- PostHog AI
380
-
381
345
  ```swift
382
346
  PostHogSDK.shared.unregister("team_id")
383
347
  ```
@@ -408,11 +372,10 @@ PostHog's [feature flags](/docs/feature-flags.md) enable you to safely deploy an
408
372
 
409
373
  Swift
410
374
 
411
- PostHog AI
412
-
413
375
  ```swift
414
376
  if let result = PostHogSDK.shared.getFeatureFlagResult("flag-key"), result.enabled {
415
377
  // Do something differently for this user
378
+
416
379
  // Optional: fetch the payload from the same evaluation result
417
380
  let matchedFlagPayload = result.payload
418
381
  }
@@ -422,11 +385,10 @@ if let result = PostHogSDK.shared.getFeatureFlagResult("flag-key"), result.enabl
422
385
 
423
386
  Swift
424
387
 
425
- PostHog AI
426
-
427
388
  ```swift
428
389
  if let result = PostHogSDK.shared.getFeatureFlagResult("flag-key"), result.variant == "variant-key" { // replace "variant-key" with the key of your variant
429
390
  // Do something differently for this user
391
+
430
392
  // Optional: fetch the payload from the same evaluation result
431
393
  let matchedFlagPayload = result.payload
432
394
  }
@@ -438,12 +400,11 @@ If your payload is a JSON object, you can decode it into a `Decodable` type:
438
400
 
439
401
  Swift
440
402
 
441
- PostHog AI
442
-
443
403
  ```swift
444
404
  struct FlagPayload: Decodable {
445
405
  let title: String
446
406
  }
407
+
447
408
  if let result = PostHogSDK.shared.getFeatureFlagResult("flag-key"),
448
409
  let payload = result.payloadAs(FlagPayload.self) {
449
410
  // Use payload.title
@@ -456,8 +417,6 @@ You can inspect all currently loaded feature flags with `getAllFeatureFlags()`.
456
417
 
457
418
  Swift
458
419
 
459
- PostHog AI
460
-
461
420
  ```swift
462
421
  for flag in PostHogSDK.shared.getAllFeatureFlags() ?? [] {
463
422
  print(flag.key, flag.enabled, flag.variant as Any, flag.payload as Any)
@@ -470,8 +429,6 @@ Feature flag values are cached. If something has changed with your user and you'
470
429
 
471
430
  Swift
472
431
 
473
- PostHog AI
474
-
475
432
  ```swift
476
433
  PostHogSDK.shared.reloadFeatureFlags()
477
434
  ```
@@ -486,8 +443,6 @@ To handle this, you can use the `didReceiveFeatureFlags` notification to wait fo
486
443
 
487
444
  Swift
488
445
 
489
- PostHog AI
490
-
491
446
  ```swift
492
447
  class AppDelegate: NSObject, UIApplicationDelegate {
493
448
  func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
@@ -498,13 +453,18 @@ class AppDelegate: NSObject, UIApplicationDelegate {
498
453
  name: PostHogSDK.didReceiveFeatureFlags,
499
454
  object: nil
500
455
  )
456
+
501
457
  let POSTHOG_PROJECT_TOKEN = "<ph_project_token>"
502
458
  // usually 'https://us.i.posthog.com' or 'https://eu.i.posthog.com'
503
459
  let POSTHOG_HOST = "https://us.i.posthog.com"
460
+
504
461
  let config = PostHogConfig(projectToken: POSTHOG_PROJECT_TOKEN, host: POSTHOG_HOST)
462
+
505
463
  PostHogSDK.shared.setup(config)
464
+
506
465
  return true
507
466
  }
467
+
508
468
  // The "receiveFeatureFlags" method will be called when the SDK receives the feature flags from the server.
509
469
  @objc func receiveFeatureFlags() {
510
470
  print("receiveFeatureFlags called")
@@ -516,8 +476,6 @@ Alternatively, you can use the completion block of the `reloadFeatureFlags(_:)`
516
476
 
517
477
  Swift
518
478
 
519
- PostHog AI
520
-
521
479
  ```swift
522
480
  // Reload feature flags and check if a specific feature is enabled
523
481
  PostHogSDK.shared.reloadFeatureFlags {
@@ -533,8 +491,6 @@ To track when someone sees or interacts with a feature, use `captureFeatureView`
533
491
 
534
492
  Swift
535
493
 
536
- PostHog AI
537
-
538
494
  ```swift
539
495
  PostHogSDK.shared.captureFeatureView(flag: "flag-key", flagVariant: "variant-key")
540
496
  PostHogSDK.shared.captureFeatureInteraction(flag: "flag-key", flagVariant: "variant-key")
@@ -550,8 +506,6 @@ Set `config.bootstrap` before calling `setup()` to seed identity and flag values
550
506
 
551
507
  Swift
552
508
 
553
- PostHog AI
554
-
555
509
  ```swift
556
510
  let config = PostHogConfig(projectToken: "<ph_project_token>", host: "https://us.i.posthog.com")
557
511
  config.bootstrap = PostHogBootstrapConfig(
@@ -609,8 +563,6 @@ You can enable debug mode by setting the `debug` option to `true` in the `PostHo
609
563
 
610
564
  Swift
611
565
 
612
- PostHog AI
613
-
614
566
  ```swift
615
567
  let config = PostHogConfig(projectToken: "<ph_project_token>", host: "https://us.i.posthog.com")
616
568
  config.debug = true
@@ -623,11 +575,10 @@ You can also toggle debug by calling the `PostHogSDK.shared.debug()` method in y
623
575
 
624
576
  Swift
625
577
 
626
- PostHog AI
627
-
628
578
  ```swift
629
579
  // Enable debug mode
630
580
  PostHogSDK.shared.debug(true)
581
+
631
582
  // Disable debug mode
632
583
  PostHogSDK.shared.debug(false)
633
584
  ```
@@ -1,10 +1,6 @@
1
1
  > AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt
2
2
 
3
- # Vue.js - Docs
4
-
5
- Copy page
6
-
7
- # Vue.js - Docs
3
+ # Vue.js
8
4
 
9
5
  PostHog makes it easy to get data about usage of your [Vue.js](https://vuejs.org/) app. Integrating PostHog into your app enables analytics about user behavior, custom events capture, session replays, feature flags, and more.
10
6
 
@@ -23,8 +19,6 @@ To follow this guide along, you need:
23
19
 
24
20
  Start by installing `posthog-js` using your package manager:
25
21
 
26
- PostHog AI
27
-
28
22
  ### npm
29
23
 
30
24
  ```bash
@@ -51,8 +45,6 @@ bun add posthog-js
51
45
 
52
46
  > **If your site sets a Content-Security-Policy**, it needs to allow PostHog. This applies to the snippet and to package installs alike: the SDK lazy-loads extra bundles (session replay, surveys) from PostHog's CDN, and sends events to the ingestion host. PostHog serves from subdomains of `posthog.com` that change over time, so allow the wildcard:
53
47
  >
54
- > PostHog AI
55
- >
56
48
  > ```
57
49
  > script-src 'self' https://*.posthog.com;
58
50
  > connect-src 'self' https://*.posthog.com;
@@ -71,25 +63,29 @@ PostHog initializes as a singleton, so you can initialize it in your `main.ts` f
71
63
 
72
64
  src/main.ts
73
65
 
74
- PostHog AI
75
-
76
66
  ```typescript
77
67
  // src/main.ts
78
68
  import { createApp } from 'vue'
79
69
  import { createPinia } from 'pinia'
70
+
80
71
  import App from './App.vue'
81
72
  import router from './router'
82
73
  import posthog from "posthog-js";
74
+
83
75
  const app = createApp(App);
76
+
84
77
  posthog.init(import.meta.env.VITE_POSTHOG_PROJECT_TOKEN || '<ph_project_token>', {
85
78
  api_host: import.meta.env.VITE_POSTHOG_HOST || 'https://us.i.posthog.com',
86
79
  defaults: '2026-05-30',
87
80
  });
81
+
88
82
  app.use(createPinia())
89
83
  app.use(router)
84
+
90
85
  app.config.errorHandler = (err, instance, info) => {
91
86
  posthog.captureException(err)
92
87
  }
88
+
93
89
  app.mount('#app')
94
90
  ```
95
91
 
@@ -97,12 +93,11 @@ Then, you can access PostHog throughout your app just by importing it from `post
97
93
 
98
94
  TypeScript
99
95
 
100
- PostHog AI
101
-
102
96
  ```typescript
103
97
  // src/App.vue
104
98
  <script setup>
105
99
  import posthog from 'posthog-js'
100
+
106
101
  const handleClick = () => {
107
102
  posthog.capture('button_clicked')
108
103
  }
@@ -117,17 +112,17 @@ Start by creating a `plugins` folder and adding a `posthog.js` file to that fold
117
112
 
118
113
  JavaScript
119
114
 
120
- PostHog AI
121
-
122
115
  ```javascript
123
116
  // src/plugins/posthog.js
124
117
  import posthog from 'posthog-js'
118
+
125
119
  export default {
126
120
  install(Vue) {
127
121
  posthog.init('<ph_project_token>', {
128
122
  api_host: 'https://us.i.posthog.com',
129
123
  defaults: '2026-05-30'
130
124
  })
125
+
131
126
  Vue.prototype.$posthog = posthog
132
127
  }
133
128
  }
@@ -137,15 +132,15 @@ Next, in `main.js`, import and use the plugin.
137
132
 
138
133
  JavaScript
139
134
 
140
- PostHog AI
141
-
142
135
  ```javascript
143
136
  // src/main.js
144
137
  import Vue from 'vue'
145
138
  import App from './App.vue'
146
139
  import PosthogPlugin from './plugins/posthog'
140
+
147
141
  Vue.config.productionTip = false
148
142
  Vue.use(PosthogPlugin)
143
+
149
144
  new Vue({
150
145
  render: h => h(App),
151
146
  }).$mount('#app')
@@ -167,8 +162,6 @@ If your app calls your own backend, `tracing_headers` adds `X-POSTHOG-DISTINCT-I
167
162
 
168
163
  JavaScript
169
164
 
170
- PostHog AI
171
-
172
165
  ```javascript
173
166
  posthog.init('<ph_project_token>', {
174
167
  api_host: 'https://us.i.posthog.com',
@@ -191,22 +184,24 @@ To capture custom events, evaluate feature flags, and use any of the other PostH
191
184
 
192
185
  JavaScript
193
186
 
194
- PostHog AI
195
-
196
187
  ```javascript
197
188
  // src/App.vue
198
189
  <script setup>
199
190
  import { RouterView } from 'vue-router'
200
191
  import { usePostHog } from './composables/usePostHog'
192
+
201
193
  const { posthog } = usePostHog()
194
+
202
195
  const handleClick = () => {
203
196
  posthog.capture('button_clicked', { location: 'homepage' })
204
197
  }
205
198
  </script>
199
+
206
200
  <template>
207
201
  <div>
208
202
  <button @click="handleClick">Click me!</button>
209
203
  </div>
204
+
210
205
  <RouterView />
211
206
  </template>
212
207
  ```
@@ -217,20 +212,21 @@ When using feature flags on pages that users navigate to directly, the flags may
217
212
 
218
213
  JavaScript
219
214
 
220
- PostHog AI
221
-
222
215
  ```javascript
223
216
  // src/composables/usePostHogFeatureFlag.ts
224
217
  import { ref, type Ref } from 'vue'
225
218
  import { usePostHog } from './usePostHog'
219
+
226
220
  export function usePostHogFeatureFlag(
227
221
  feature: string,
228
222
  ): Ref<string | boolean | undefined> {
229
223
  const { posthog } = usePostHog()
230
224
  const flag = ref(posthog.getFeatureFlag(feature))
225
+
231
226
  posthog.onFeatureFlags(() => {
232
227
  flag.value = posthog.getFeatureFlag(feature)
233
228
  })
229
+
234
230
  return flag
235
231
  }
236
232
  ```
@@ -239,25 +235,27 @@ Then use it in your components:
239
235
 
240
236
  JavaScript
241
237
 
242
- PostHog AI
243
-
244
238
  ```javascript
245
239
  // src/App.vue
246
240
  <script setup>
247
241
  import { RouterView } from 'vue-router'
248
242
  import { usePostHog } from './composables/usePostHog'
249
243
  import { usePostHogFeatureFlag } from './composables/usePostHogFeatureFlag'
244
+
250
245
  const { posthog } = usePostHog()
251
246
  const isFeatureEnabled = usePostHogFeatureFlag('test-flag')
247
+
252
248
  const handleClick = () => {
253
249
  posthog.capture('button_clicked', { location: 'homepage' })
254
250
  }
255
251
  </script>
252
+
256
253
  <template>
257
254
  <div>
258
255
  <button @click="handleClick">Click me!</button>
259
256
  <p>Is feature flag enabled? {{ isFeatureEnabled ? 'Yes' : 'No' }}</p>
260
257
  </div>
258
+
261
259
  <RouterView />
262
260
  </template>
263
261
  ```
@@ -270,8 +268,6 @@ To capture custom events, evaluate feature flags, and use any of the other PostH
270
268
 
271
269
  JavaScript
272
270
 
273
- PostHog AI
274
-
275
271
  ```javascript
276
272
  // src/components/AboutPage.vue
277
273
  <template>
@@ -282,6 +278,7 @@ PostHog AI
282
278
  <p>Feature enabled? {{ isFeatureEnabled ? 'Yes' : 'No' }}</p>
283
279
  </div>
284
280
  </template>
281
+
285
282
  <script>
286
283
  export default {
287
284
  name: 'AboutPage',
@@ -324,7 +321,11 @@ For certain features like [heatmaps](/docs/toolbar/heatmaps.md), your Web Applic
324
321
 
325
322
  **US**: `44.205.89.55`, `52.4.194.122`, `44.208.188.173`
326
323
 
327
- These are public, stable IPs used by PostHog services (e.g., Celery tasks for snapshots).
324
+ These are public, stable IPs used by PostHog services.
325
+
326
+ PostHog captures heatmap screenshots using [Browserless](https://www.browserless.io), which has its own IP addresses. Browserless [publishes the current list here](https://docs.browserless.io/baas/troubleshooting/whitelisting-ips).
327
+
328
+ An allowlist does not help when your app has a private address. For apps on an internal network, see [internal and intranet applications](/docs/session-replay/troubleshooting.md#internal-and-intranet-applications).
328
329
 
329
330
  ## Next steps
330
331