vybekiit 0.4.0 → 0.6.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 (665) hide show
  1. package/dist/bin.js +840 -296
  2. package/dist/global-skills/add-ai/SKILL.md +53 -0
  3. package/dist/global-skills/add-analytics/SKILL.md +65 -0
  4. package/dist/global-skills/add-app-clip/SKILL.md +280 -0
  5. package/dist/global-skills/add-app-clip/agents/openai.yaml +4 -0
  6. package/dist/global-skills/add-app-clip/references/native-module.md +96 -0
  7. package/dist/global-skills/add-blog/SKILL.md +49 -0
  8. package/dist/global-skills/add-crud/SKILL.md +28 -0
  9. package/dist/global-skills/add-files/SKILL.md +65 -0
  10. package/dist/global-skills/add-images/SKILL.md +64 -0
  11. package/dist/global-skills/add-language/SKILL.md +44 -0
  12. package/dist/global-skills/add-notifications/SKILL.md +61 -0
  13. package/dist/global-skills/add-realtime/SKILL.md +49 -0
  14. package/dist/global-skills/add-route/SKILL.md +28 -0
  15. package/dist/global-skills/add-search/SKILL.md +43 -0
  16. package/dist/global-skills/add-signin/SKILL.md +78 -0
  17. package/dist/global-skills/add-teams/SKILL.md +64 -0
  18. package/dist/global-skills/add-upload/SKILL.md +27 -0
  19. package/dist/global-skills/aws-cdk/SKILL.md +72 -0
  20. package/dist/global-skills/aws-cdk/references/bootstrap-and-project-setup.md +257 -0
  21. package/dist/global-skills/aws-cdk/references/compliance-and-drift.md +193 -0
  22. package/dist/global-skills/aws-cdk/references/construct-patterns.md +315 -0
  23. package/dist/global-skills/aws-cdk/references/import-and-migrate.md +184 -0
  24. package/dist/global-skills/aws-cdk/references/refactor-and-prevent-replacement.md +198 -0
  25. package/dist/global-skills/aws-cdk/references/troubleshooting-credentials.md +183 -0
  26. package/dist/global-skills/aws-cdk/references/troubleshooting-deployment.md +293 -0
  27. package/dist/global-skills/aws-cdk/references/troubleshooting-synth.md +274 -0
  28. package/dist/global-skills/aws-cdk/references/v1-to-v2-migration.md +119 -0
  29. package/dist/global-skills/aws-cloudformation/SKILL.md +88 -0
  30. package/dist/global-skills/aws-cloudformation/references/author-cloudformation-best-practices.script.md +179 -0
  31. package/dist/global-skills/aws-cloudformation/references/check-cloudformation-template-compliance.script.md +159 -0
  32. package/dist/global-skills/aws-cloudformation/references/cloudformation-pre-deploy-validation.script.md +217 -0
  33. package/dist/global-skills/aws-cloudformation/references/deploy-with-express-mode.script.md +271 -0
  34. package/dist/global-skills/aws-cloudformation/references/lookup-resource-properties.script.md +130 -0
  35. package/dist/global-skills/aws-cloudformation/references/troubleshoot-deployment.script.md +200 -0
  36. package/dist/global-skills/aws-cloudformation/references/validate-cloudformation-template.script.md +135 -0
  37. package/dist/global-skills/aws-serverless/SKILL.md +51 -0
  38. package/dist/global-skills/aws-serverless/assets/powertools-handler.py +49 -0
  39. package/dist/global-skills/aws-serverless/references/api-gateway.md +553 -0
  40. package/dist/global-skills/aws-serverless/references/architecture.md +262 -0
  41. package/dist/global-skills/aws-serverless/references/concurrency.md +200 -0
  42. package/dist/global-skills/aws-serverless/references/deployment.md +94 -0
  43. package/dist/global-skills/aws-serverless/references/event-sources.md +484 -0
  44. package/dist/global-skills/aws-serverless/references/lambda.md +548 -0
  45. package/dist/global-skills/aws-serverless/references/orchestration.md +449 -0
  46. package/dist/global-skills/aws-serverless/references/production.md +493 -0
  47. package/dist/global-skills/aws-serverless/references/troubleshooting.md +711 -0
  48. package/dist/global-skills/back-up-my-code/SKILL.md +48 -0
  49. package/dist/global-skills/better-auth-best-practices/SKILL.md +182 -0
  50. package/dist/global-skills/better-auth-security-best-practices/SKILL.md +432 -0
  51. package/dist/global-skills/building-native-ui/SKILL.md +377 -0
  52. package/dist/global-skills/building-native-ui/agents/openai.yaml +4 -0
  53. package/dist/global-skills/building-native-ui/references/animations.md +220 -0
  54. package/dist/global-skills/building-native-ui/references/controls.md +270 -0
  55. package/dist/global-skills/building-native-ui/references/form-sheet.md +253 -0
  56. package/dist/global-skills/building-native-ui/references/gradients.md +106 -0
  57. package/dist/global-skills/building-native-ui/references/icons.md +213 -0
  58. package/dist/global-skills/building-native-ui/references/media.md +198 -0
  59. package/dist/global-skills/building-native-ui/references/route-structure.md +229 -0
  60. package/dist/global-skills/building-native-ui/references/search.md +248 -0
  61. package/dist/global-skills/building-native-ui/references/storage.md +121 -0
  62. package/dist/global-skills/building-native-ui/references/tabs.md +433 -0
  63. package/dist/global-skills/building-native-ui/references/toolbar-and-headers.md +284 -0
  64. package/dist/global-skills/building-native-ui/references/visual-effects.md +197 -0
  65. package/dist/global-skills/building-native-ui/references/webgpu-three.md +605 -0
  66. package/dist/global-skills/building-native-ui/references/zoom-transitions.md +158 -0
  67. package/dist/global-skills/buy-domain/SKILL.md +64 -0
  68. package/dist/global-skills/check-safety/SKILL.md +94 -0
  69. package/dist/global-skills/claimable-postgres/SKILL.md +249 -0
  70. package/dist/global-skills/configure-capabilities/SKILL.md +38 -0
  71. package/dist/global-skills/connect-account/SKILL.md +64 -0
  72. package/dist/global-skills/connect-account-backend/SKILL.md +41 -0
  73. package/dist/global-skills/create-auth-skill/SKILL.md +321 -0
  74. package/dist/global-skills/design-my-data/SKILL.md +48 -0
  75. package/dist/global-skills/doctor/SKILL.md +84 -0
  76. package/dist/global-skills/eas-app-stores/SKILL.md +152 -0
  77. package/dist/global-skills/eas-app-stores/agents/openai.yaml +4 -0
  78. package/dist/global-skills/eas-app-stores/references/app-store-metadata.md +497 -0
  79. package/dist/global-skills/eas-app-stores/references/ios-app-store.md +371 -0
  80. package/dist/global-skills/eas-app-stores/references/play-store.md +246 -0
  81. package/dist/global-skills/eas-app-stores/references/testflight.md +58 -0
  82. package/dist/global-skills/eas-app-stores/references/workflows.md +120 -0
  83. package/dist/global-skills/eas-hosting/SKILL.md +423 -0
  84. package/dist/global-skills/eas-hosting/agents/openai.yaml +4 -0
  85. package/dist/global-skills/eas-observe/SKILL.md +32 -0
  86. package/dist/global-skills/eas-observe/agents/openai.yaml +4 -0
  87. package/dist/global-skills/eas-observe/references/metrics.md +47 -0
  88. package/dist/global-skills/eas-observe/references/queries.md +342 -0
  89. package/dist/global-skills/eas-observe/references/setup.md +317 -0
  90. package/dist/global-skills/eas-simulator/SKILL.md +156 -0
  91. package/dist/global-skills/eas-simulator/agents/openai.yaml +4 -0
  92. package/dist/global-skills/eas-simulator/references/controllers.md +67 -0
  93. package/dist/global-skills/eas-simulator/references/run-your-app.md +185 -0
  94. package/dist/global-skills/eas-simulator/references/troubleshooting.md +38 -0
  95. package/dist/global-skills/eas-update-insights/SKILL.md +230 -0
  96. package/dist/global-skills/eas-update-insights/agents/openai.yaml +4 -0
  97. package/dist/global-skills/eas-update-insights/references/channel-insights-schema.md +47 -0
  98. package/dist/global-skills/eas-update-insights/references/update-insights-schema.md +69 -0
  99. package/dist/global-skills/eas-workflows/SKILL.md +94 -0
  100. package/dist/global-skills/eas-workflows/agents/openai.yaml +4 -0
  101. package/dist/global-skills/eas-workflows/scripts/fetch.js +109 -0
  102. package/dist/global-skills/eas-workflows/scripts/package.json +11 -0
  103. package/dist/global-skills/eas-workflows/scripts/validate.js +84 -0
  104. package/dist/global-skills/email-best-practices/SKILL.md +73 -0
  105. package/dist/global-skills/expo-api-routes/SKILL.md +368 -0
  106. package/dist/global-skills/expo-api-routes/agents/openai.yaml +4 -0
  107. package/dist/global-skills/expo-app-clip/SKILL.md +282 -0
  108. package/dist/global-skills/expo-app-clip/agents/openai.yaml +4 -0
  109. package/dist/global-skills/expo-app-clip/references/native-module.md +96 -0
  110. package/dist/global-skills/expo-brownfield/SKILL.md +54 -0
  111. package/dist/global-skills/expo-brownfield/agents/openai.yaml +4 -0
  112. package/dist/global-skills/expo-brownfield/references/brownfield-integrated.md +526 -0
  113. package/dist/global-skills/expo-brownfield/references/brownfield-isolated.md +402 -0
  114. package/dist/global-skills/expo-brownfield/references/comparison.md +63 -0
  115. package/dist/global-skills/expo-brownfield/references/troubleshooting.md +88 -0
  116. package/dist/global-skills/expo-cicd-workflows/SKILL.md +92 -0
  117. package/dist/global-skills/expo-cicd-workflows/agents/openai.yaml +4 -0
  118. package/dist/global-skills/expo-cicd-workflows/scripts/fetch.js +109 -0
  119. package/dist/global-skills/expo-cicd-workflows/scripts/package.json +11 -0
  120. package/dist/global-skills/expo-cicd-workflows/scripts/validate.js +84 -0
  121. package/dist/global-skills/expo-data-fetching/SKILL.md +449 -0
  122. package/dist/global-skills/expo-data-fetching/agents/openai.yaml +4 -0
  123. package/dist/global-skills/expo-data-fetching/references/expo-router-loaders.md +341 -0
  124. package/dist/global-skills/expo-data-fetching/references/offline-and-cancellation.md +68 -0
  125. package/dist/global-skills/expo-deployment/SKILL.md +167 -0
  126. package/dist/global-skills/expo-deployment/agents/openai.yaml +4 -0
  127. package/dist/global-skills/expo-deployment/references/app-store-metadata.md +497 -0
  128. package/dist/global-skills/expo-deployment/references/ios-app-store.md +371 -0
  129. package/dist/global-skills/expo-deployment/references/play-store.md +246 -0
  130. package/dist/global-skills/expo-deployment/references/testflight.md +58 -0
  131. package/dist/global-skills/expo-deployment/references/workflows.md +160 -0
  132. package/dist/global-skills/expo-dev-client/SKILL.md +174 -0
  133. package/dist/global-skills/expo-dev-client/agents/openai.yaml +4 -0
  134. package/dist/global-skills/expo-dom/SKILL.md +417 -0
  135. package/dist/global-skills/expo-dom/agents/openai.yaml +4 -0
  136. package/dist/global-skills/expo-examples/SKILL.md +99 -0
  137. package/dist/global-skills/expo-examples/agents/openai.yaml +4 -0
  138. package/dist/global-skills/expo-examples/references/catalog.md +105 -0
  139. package/dist/global-skills/expo-module/SKILL.md +141 -0
  140. package/dist/global-skills/expo-module/agents/openai.yaml +4 -0
  141. package/dist/global-skills/expo-module/references/config-plugin.md +90 -0
  142. package/dist/global-skills/expo-module/references/create-expo-module.md +206 -0
  143. package/dist/global-skills/expo-module/references/lifecycle.md +127 -0
  144. package/dist/global-skills/expo-module/references/module-config.md +48 -0
  145. package/dist/global-skills/expo-module/references/native-module.md +286 -0
  146. package/dist/global-skills/expo-module/references/native-view.md +171 -0
  147. package/dist/global-skills/expo-native-ui/SKILL.md +181 -0
  148. package/dist/global-skills/expo-native-ui/agents/openai.yaml +4 -0
  149. package/dist/global-skills/expo-native-ui/references/animations.md +220 -0
  150. package/dist/global-skills/expo-native-ui/references/controls.md +270 -0
  151. package/dist/global-skills/expo-native-ui/references/gradients.md +106 -0
  152. package/dist/global-skills/expo-native-ui/references/icons.md +213 -0
  153. package/dist/global-skills/expo-native-ui/references/media.md +198 -0
  154. package/dist/global-skills/expo-native-ui/references/storage.md +121 -0
  155. package/dist/global-skills/expo-native-ui/references/visual-effects.md +197 -0
  156. package/dist/global-skills/expo-native-ui/references/webgpu-three.md +605 -0
  157. package/dist/global-skills/expo-observe/SKILL.md +30 -0
  158. package/dist/global-skills/expo-observe/references/metrics.md +47 -0
  159. package/dist/global-skills/expo-observe/references/queries.md +342 -0
  160. package/dist/global-skills/expo-observe/references/setup.md +317 -0
  161. package/dist/global-skills/expo-router/SKILL.md +230 -0
  162. package/dist/global-skills/expo-router/agents/openai.yaml +4 -0
  163. package/dist/global-skills/expo-router/references/form-sheet.md +253 -0
  164. package/dist/global-skills/expo-router/references/route-structure.md +229 -0
  165. package/dist/global-skills/expo-router/references/search.md +248 -0
  166. package/dist/global-skills/expo-router/references/tabs.md +433 -0
  167. package/dist/global-skills/expo-router/references/toolbar-and-headers.md +284 -0
  168. package/dist/global-skills/expo-router/references/zoom-transitions.md +158 -0
  169. package/dist/global-skills/expo-skill-eval/SKILL.md +314 -0
  170. package/dist/global-skills/expo-skill-eval/agents/visual-grader.md +52 -0
  171. package/dist/global-skills/expo-skill-eval/references/design-rubric.md +45 -0
  172. package/dist/global-skills/expo-skill-eval/references/runtime-matrix.md +34 -0
  173. package/dist/global-skills/expo-skill-eval/scripts/check-static.sh +64 -0
  174. package/dist/global-skills/expo-skill-eval/scripts/clean-fixture.sh +56 -0
  175. package/dist/global-skills/expo-skill-eval/scripts/generate_viewer.py +450 -0
  176. package/dist/global-skills/expo-skill-eval/scripts/latest-sdk.sh +46 -0
  177. package/dist/global-skills/expo-skill-eval/scripts/make-fixture.sh +95 -0
  178. package/dist/global-skills/expo-skill-eval/scripts/make-workspace.sh +31 -0
  179. package/dist/global-skills/expo-skill-eval/scripts/snapshot-android.sh +284 -0
  180. package/dist/global-skills/expo-skill-eval/scripts/snapshot-ios.sh +132 -0
  181. package/dist/global-skills/expo-skill-eval/scripts/snapshot-web.sh +61 -0
  182. package/dist/global-skills/expo-skill-feedback/SKILL.md +54 -0
  183. package/dist/global-skills/expo-skill-feedback/agents/openai.yaml +4 -0
  184. package/dist/global-skills/expo-skill-feedback/scripts/skill-event.cjs +180 -0
  185. package/dist/global-skills/expo-skill-feedback/scripts/skill-feedback.cjs +118 -0
  186. package/dist/global-skills/expo-skill-feedback/scripts/telemetry.cjs +65 -0
  187. package/dist/global-skills/expo-skill-feedback/scripts/telemetry_common.cjs +171 -0
  188. package/dist/global-skills/expo-tailwind-setup/SKILL.md +480 -0
  189. package/dist/global-skills/expo-tailwind-setup/agents/openai.yaml +4 -0
  190. package/dist/global-skills/expo-ui/SKILL.md +47 -0
  191. package/dist/global-skills/expo-ui/agents/openai.yaml +4 -0
  192. package/dist/global-skills/expo-ui/references/drop-in-replacements.md +27 -0
  193. package/dist/global-skills/expo-ui/references/jetpack-compose.md +73 -0
  194. package/dist/global-skills/expo-ui/references/swift-ui.md +73 -0
  195. package/dist/global-skills/expo-ui/references/universal.md +73 -0
  196. package/dist/global-skills/expo-ui/scripts/list-components.js +193 -0
  197. package/dist/global-skills/expo-upgrade/SKILL.md +134 -0
  198. package/dist/global-skills/expo-upgrade/agents/openai.yaml +4 -0
  199. package/dist/global-skills/expo-upgrade/references/expo-av-to-audio.md +132 -0
  200. package/dist/global-skills/expo-upgrade/references/expo-av-to-video.md +160 -0
  201. package/dist/global-skills/expo-upgrade/references/native-tabs.md +124 -0
  202. package/dist/global-skills/expo-upgrade/references/new-architecture.md +79 -0
  203. package/dist/global-skills/expo-upgrade/references/react-19.md +79 -0
  204. package/dist/global-skills/expo-upgrade/references/react-compiler.md +59 -0
  205. package/dist/global-skills/expo-upgrade/references/react-navigation-to-expo-router.md +61 -0
  206. package/dist/global-skills/expo-web-to-native/SKILL.md +83 -0
  207. package/dist/global-skills/expo-web-to-native/agents/openai.yaml +4 -0
  208. package/dist/global-skills/expo-web-to-native/references/false-friends.md +119 -0
  209. package/dist/global-skills/expo-web-to-native/references/native-patterns.md +39 -0
  210. package/dist/global-skills/expo-web-to-native/references/run-as-goal.md +48 -0
  211. package/dist/global-skills/expo-web-to-native/references/verify-on-device.md +45 -0
  212. package/dist/global-skills/firebase-ai-logic-basics/SKILL.md +165 -0
  213. package/dist/global-skills/firebase-ai-logic-basics/references/flutter_setup.md +95 -0
  214. package/dist/global-skills/firebase-ai-logic-basics/references/ios_setup.md +156 -0
  215. package/dist/global-skills/firebase-ai-logic-basics/references/usage_patterns_android.md +157 -0
  216. package/dist/global-skills/firebase-ai-logic-basics/references/usage_patterns_web.md +186 -0
  217. package/dist/global-skills/firebase-app-hosting-basics/SKILL.md +73 -0
  218. package/dist/global-skills/firebase-app-hosting-basics/references/cli_commands.md +85 -0
  219. package/dist/global-skills/firebase-app-hosting-basics/references/configuration.md +59 -0
  220. package/dist/global-skills/firebase-app-hosting-basics/references/emulation.md +59 -0
  221. package/dist/global-skills/firebase-auth-basics/SKILL.md +118 -0
  222. package/dist/global-skills/firebase-auth-basics/references/client_sdk_android.md +160 -0
  223. package/dist/global-skills/firebase-auth-basics/references/client_sdk_web.md +301 -0
  224. package/dist/global-skills/firebase-auth-basics/references/flutter_setup.md +149 -0
  225. package/dist/global-skills/firebase-auth-basics/references/ios_setup.md +87 -0
  226. package/dist/global-skills/firebase-auth-basics/references/security_rules.md +49 -0
  227. package/dist/global-skills/firebase-basics/SKILL.md +148 -0
  228. package/dist/global-skills/firebase-basics/references/android_setup.md +41 -0
  229. package/dist/global-skills/firebase-basics/references/firebase-cli-guide.md +18 -0
  230. package/dist/global-skills/firebase-basics/references/firebase-service-init.md +20 -0
  231. package/dist/global-skills/firebase-basics/references/flutter_setup.md +143 -0
  232. package/dist/global-skills/firebase-basics/references/ios_setup.md +113 -0
  233. package/dist/global-skills/firebase-basics/references/local-env-setup.md +80 -0
  234. package/dist/global-skills/firebase-basics/references/refresh/android_studio.md +41 -0
  235. package/dist/global-skills/firebase-basics/references/refresh/antigravity.md +64 -0
  236. package/dist/global-skills/firebase-basics/references/refresh/claude.md +12 -0
  237. package/dist/global-skills/firebase-basics/references/refresh/gemini-cli.md +13 -0
  238. package/dist/global-skills/firebase-basics/references/refresh/other-agents.md +67 -0
  239. package/dist/global-skills/firebase-basics/references/setup/android_studio.md +23 -0
  240. package/dist/global-skills/firebase-basics/references/setup/antigravity.md +98 -0
  241. package/dist/global-skills/firebase-basics/references/setup/claude_code.md +45 -0
  242. package/dist/global-skills/firebase-basics/references/setup/cursor.md +93 -0
  243. package/dist/global-skills/firebase-basics/references/setup/gemini_cli.md +53 -0
  244. package/dist/global-skills/firebase-basics/references/setup/github_copilot.md +104 -0
  245. package/dist/global-skills/firebase-basics/references/setup/other_agents.md +99 -0
  246. package/dist/global-skills/firebase-basics/references/web_setup.md +77 -0
  247. package/dist/global-skills/firebase-crashlytics/SKILL.md +42 -0
  248. package/dist/global-skills/firebase-crashlytics/references/android_setup.md +152 -0
  249. package/dist/global-skills/firebase-crashlytics/references/ios_setup.md +115 -0
  250. package/dist/global-skills/firebase-data-connect/SKILL.md +191 -0
  251. package/dist/global-skills/firebase-data-connect/examples.md +638 -0
  252. package/dist/global-skills/firebase-data-connect/reference/cloud_functions.md +184 -0
  253. package/dist/global-skills/firebase-data-connect/reference/config.md +271 -0
  254. package/dist/global-skills/firebase-data-connect/reference/data_seeding.md +185 -0
  255. package/dist/global-skills/firebase-data-connect/reference/native_sql.md +170 -0
  256. package/dist/global-skills/firebase-data-connect/reference/operations.md +385 -0
  257. package/dist/global-skills/firebase-data-connect/reference/realtime.md +210 -0
  258. package/dist/global-skills/firebase-data-connect/reference/schema.md +290 -0
  259. package/dist/global-skills/firebase-data-connect/reference/sdk_admin_node.md +141 -0
  260. package/dist/global-skills/firebase-data-connect/reference/sdk_android.md +126 -0
  261. package/dist/global-skills/firebase-data-connect/reference/sdk_flutter.md +134 -0
  262. package/dist/global-skills/firebase-data-connect/reference/sdk_ios.md +157 -0
  263. package/dist/global-skills/firebase-data-connect/reference/sdk_web.md +146 -0
  264. package/dist/global-skills/firebase-data-connect/reference/search.md +264 -0
  265. package/dist/global-skills/firebase-data-connect/reference/security.md +295 -0
  266. package/dist/global-skills/firebase-data-connect/templates.md +318 -0
  267. package/dist/global-skills/firebase-firestore/SKILL.md +89 -0
  268. package/dist/global-skills/firebase-firestore/references/enterprise/android_sdk_usage.md +230 -0
  269. package/dist/global-skills/firebase-firestore/references/enterprise/data_model.md +66 -0
  270. package/dist/global-skills/firebase-firestore/references/enterprise/flutter_setup.md +180 -0
  271. package/dist/global-skills/firebase-firestore/references/enterprise/indexes.md +135 -0
  272. package/dist/global-skills/firebase-firestore/references/enterprise/ios_setup.md +189 -0
  273. package/dist/global-skills/firebase-firestore/references/enterprise/provisioning.md +118 -0
  274. package/dist/global-skills/firebase-firestore/references/enterprise/python_sdk_usage.md +138 -0
  275. package/dist/global-skills/firebase-firestore/references/enterprise/security_rules.md +577 -0
  276. package/dist/global-skills/firebase-firestore/references/enterprise/web_sdk_usage.md +127 -0
  277. package/dist/global-skills/firebase-firestore/references/standard/android_sdk_usage.md +193 -0
  278. package/dist/global-skills/firebase-firestore/references/standard/flutter_setup.md +176 -0
  279. package/dist/global-skills/firebase-firestore/references/standard/indexes.md +113 -0
  280. package/dist/global-skills/firebase-firestore/references/standard/ios_setup.md +174 -0
  281. package/dist/global-skills/firebase-firestore/references/standard/provisioning.md +110 -0
  282. package/dist/global-skills/firebase-firestore/references/standard/security_rules.md +577 -0
  283. package/dist/global-skills/firebase-firestore/references/standard/web_sdk_usage.md +192 -0
  284. package/dist/global-skills/firebase-hosting-basics/SKILL.md +64 -0
  285. package/dist/global-skills/firebase-hosting-basics/references/configuration.md +115 -0
  286. package/dist/global-skills/firebase-hosting-basics/references/deploying.md +48 -0
  287. package/dist/global-skills/firebase-remote-config-basics/SKILL.md +124 -0
  288. package/dist/global-skills/firebase-remote-config-basics/references/android_setup.md +91 -0
  289. package/dist/global-skills/firebase-remote-config-basics/references/ios_setup.md +89 -0
  290. package/dist/global-skills/firebase-security-rules-auditor/SKILL.md +70 -0
  291. package/dist/global-skills/go-live/SKILL.md +90 -0
  292. package/dist/global-skills/harden/SKILL.md +101 -0
  293. package/dist/global-skills/instrument-feature-flags/SKILL.md +88 -0
  294. package/dist/global-skills/instrument-feature-flags/references/adding-feature-flag-code.md +3578 -0
  295. package/dist/global-skills/instrument-feature-flags/references/android.md +146 -0
  296. package/dist/global-skills/instrument-feature-flags/references/api.md +194 -0
  297. package/dist/global-skills/instrument-feature-flags/references/best-practices.md +231 -0
  298. package/dist/global-skills/instrument-feature-flags/references/django.md +263 -0
  299. package/dist/global-skills/instrument-feature-flags/references/dotnet.md +763 -0
  300. package/dist/global-skills/instrument-feature-flags/references/elixir.md +47 -0
  301. package/dist/global-skills/instrument-feature-flags/references/flask.md +131 -0
  302. package/dist/global-skills/instrument-feature-flags/references/flutter.md +212 -0
  303. package/dist/global-skills/instrument-feature-flags/references/go.md +208 -0
  304. package/dist/global-skills/instrument-feature-flags/references/ios.md +146 -0
  305. package/dist/global-skills/instrument-feature-flags/references/java.md +94 -0
  306. package/dist/global-skills/instrument-feature-flags/references/laravel.md +170 -0
  307. package/dist/global-skills/instrument-feature-flags/references/next-js.md +383 -0
  308. package/dist/global-skills/instrument-feature-flags/references/nodejs.md +216 -0
  309. package/dist/global-skills/instrument-feature-flags/references/php.md +187 -0
  310. package/dist/global-skills/instrument-feature-flags/references/python.md +191 -0
  311. package/dist/global-skills/instrument-feature-flags/references/react-native.md +166 -0
  312. package/dist/global-skills/instrument-feature-flags/references/react.md +302 -0
  313. package/dist/global-skills/instrument-feature-flags/references/ruby-on-rails.md +604 -0
  314. package/dist/global-skills/instrument-feature-flags/references/ruby.md +200 -0
  315. package/dist/global-skills/instrument-feature-flags/references/rust.md +222 -0
  316. package/dist/global-skills/instrument-feature-flags/references/usage.md +600 -0
  317. package/dist/global-skills/instrument-feature-flags/references/web.md +193 -0
  318. package/dist/global-skills/instrument-product-analytics/SKILL.md +139 -0
  319. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-android.md +1639 -0
  320. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-angular.md +944 -0
  321. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-hybrid.md +1001 -0
  322. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-ssr.md +1004 -0
  323. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-static.md +720 -0
  324. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-view-transitions.md +810 -0
  325. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-django.md +1167 -0
  326. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-expo.md +1412 -0
  327. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-fastapi.md +1585 -0
  328. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-flask.md +1208 -0
  329. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-laravel.md +2267 -0
  330. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-next-app-router.md +712 -0
  331. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-next-pages-router.md +767 -0
  332. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-nuxt-3-6.md +939 -0
  333. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-nuxt-4.md +1078 -0
  334. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-php.md +527 -0
  335. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-python.md +481 -0
  336. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-react-native.md +1823 -0
  337. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-react-react-router-6.md +582 -0
  338. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-react-react-router-7-data.md +892 -0
  339. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-react-react-router-7-declarative.md +649 -0
  340. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-react-react-router-7-framework.md +1218 -0
  341. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-react-tanstack-router-code-based.md +793 -0
  342. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-react-tanstack-router-file-based.md +780 -0
  343. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-ruby-on-rails.md +1320 -0
  344. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-ruby.md +452 -0
  345. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-sveltekit.md +854 -0
  346. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-swift.md +665 -0
  347. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-tanstack-start.md +1199 -0
  348. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-vue-3.md +910 -0
  349. package/dist/global-skills/instrument-product-analytics/references/android.md +811 -0
  350. package/dist/global-skills/instrument-product-analytics/references/angular.md +376 -0
  351. package/dist/global-skills/instrument-product-analytics/references/astro.md +165 -0
  352. package/dist/global-skills/instrument-product-analytics/references/configuration.md +299 -0
  353. package/dist/global-skills/instrument-product-analytics/references/django.md +263 -0
  354. package/dist/global-skills/instrument-product-analytics/references/dotnet.md +763 -0
  355. package/dist/global-skills/instrument-product-analytics/references/elixir.md +414 -0
  356. package/dist/global-skills/instrument-product-analytics/references/flask.md +131 -0
  357. package/dist/global-skills/instrument-product-analytics/references/flutter.md +845 -0
  358. package/dist/global-skills/instrument-product-analytics/references/go.md +567 -0
  359. package/dist/global-skills/instrument-product-analytics/references/identify-users.md +272 -0
  360. package/dist/global-skills/instrument-product-analytics/references/ios.md +154 -0
  361. package/dist/global-skills/instrument-product-analytics/references/laravel.md +170 -0
  362. package/dist/global-skills/instrument-product-analytics/references/next-js.md +383 -0
  363. package/dist/global-skills/instrument-product-analytics/references/nuxt-js-3-6.md +244 -0
  364. package/dist/global-skills/instrument-product-analytics/references/nuxt-js.md +253 -0
  365. package/dist/global-skills/instrument-product-analytics/references/php.md +646 -0
  366. package/dist/global-skills/instrument-product-analytics/references/posthog-python.md +1675 -0
  367. package/dist/global-skills/instrument-product-analytics/references/python.md +898 -0
  368. package/dist/global-skills/instrument-product-analytics/references/react-native.md +1338 -0
  369. package/dist/global-skills/instrument-product-analytics/references/react-router-v6.md +376 -0
  370. package/dist/global-skills/instrument-product-analytics/references/react-router-v7-data-mode.md +364 -0
  371. package/dist/global-skills/instrument-product-analytics/references/react-router-v7-declarative-mode.md +376 -0
  372. package/dist/global-skills/instrument-product-analytics/references/react-router-v7-framework-mode.md +479 -0
  373. package/dist/global-skills/instrument-product-analytics/references/ruby-on-rails.md +604 -0
  374. package/dist/global-skills/instrument-product-analytics/references/ruby.md +759 -0
  375. package/dist/global-skills/instrument-product-analytics/references/svelte.md +234 -0
  376. package/dist/global-skills/instrument-product-analytics/references/tanstack-start.md +193 -0
  377. package/dist/global-skills/instrument-product-analytics/references/usage.md +600 -0
  378. package/dist/global-skills/instrument-product-analytics/references/vue-js.md +306 -0
  379. package/dist/global-skills/manifest.json +125 -0
  380. package/dist/global-skills/mongodb-atlas-stream-processing/SKILL.md +284 -0
  381. package/dist/global-skills/mongodb-atlas-stream-processing/references/connection-configs.md +298 -0
  382. package/dist/global-skills/mongodb-atlas-stream-processing/references/development-workflow.md +304 -0
  383. package/dist/global-skills/mongodb-atlas-stream-processing/references/mcp-troubleshooting.md +55 -0
  384. package/dist/global-skills/mongodb-atlas-stream-processing/references/output-diagnostics.md +150 -0
  385. package/dist/global-skills/mongodb-atlas-stream-processing/references/pipeline-patterns.md +457 -0
  386. package/dist/global-skills/mongodb-atlas-stream-processing/references/sizing-and-parallelism.md +178 -0
  387. package/dist/global-skills/mongodb-connection/SKILL.md +201 -0
  388. package/dist/global-skills/mongodb-connection/references/monitoring-guide.md +191 -0
  389. package/dist/global-skills/mongodb-mcp-setup/SKILL.md +324 -0
  390. package/dist/global-skills/mongodb-natural-language-querying/SKILL.md +195 -0
  391. package/dist/global-skills/mongodb-query-optimizer/SKILL.md +150 -0
  392. package/dist/global-skills/mongodb-query-optimizer/references/aggregation-optimization.md +210 -0
  393. package/dist/global-skills/mongodb-query-optimizer/references/antipattern-examples.md +74 -0
  394. package/dist/global-skills/mongodb-query-optimizer/references/core-indexing-principles.md +134 -0
  395. package/dist/global-skills/mongodb-query-optimizer/references/update-query-examples.md +39 -0
  396. package/dist/global-skills/mongodb-schema-design/SKILL.md +181 -0
  397. package/dist/global-skills/mongodb-schema-design/references/antipattern-excessive-lookups.md +84 -0
  398. package/dist/global-skills/mongodb-schema-design/references/antipattern-unnecessary-collections.md +91 -0
  399. package/dist/global-skills/mongodb-schema-design/references/antipattern-unnecessary-indexes.md +95 -0
  400. package/dist/global-skills/mongodb-schema-design/references/fundamental-document-model.md +91 -0
  401. package/dist/global-skills/mongodb-schema-design/references/fundamental-document-size.md +226 -0
  402. package/dist/global-skills/mongodb-schema-design/references/fundamental-embed-vs-reference.md +418 -0
  403. package/dist/global-skills/mongodb-schema-design/references/fundamental-schema-validation.md +131 -0
  404. package/dist/global-skills/mongodb-schema-design/references/pattern-approximation.md +80 -0
  405. package/dist/global-skills/mongodb-schema-design/references/pattern-archive.md +143 -0
  406. package/dist/global-skills/mongodb-schema-design/references/pattern-attribute.md +77 -0
  407. package/dist/global-skills/mongodb-schema-design/references/pattern-bucket.md +102 -0
  408. package/dist/global-skills/mongodb-schema-design/references/pattern-computed.md +162 -0
  409. package/dist/global-skills/mongodb-schema-design/references/pattern-document-versioning.md +166 -0
  410. package/dist/global-skills/mongodb-schema-design/references/pattern-extended-reference.md +72 -0
  411. package/dist/global-skills/mongodb-schema-design/references/pattern-outlier.md +159 -0
  412. package/dist/global-skills/mongodb-schema-design/references/pattern-polymorphic.md +167 -0
  413. package/dist/global-skills/mongodb-schema-design/references/pattern-schema-versioning.md +273 -0
  414. package/dist/global-skills/mongodb-schema-design/references/pattern-time-series-collections.md +190 -0
  415. package/dist/global-skills/mongodb-schema-design/references/source-query-stats.md +123 -0
  416. package/dist/global-skills/mongodb-schema-design/references/source-slow-query-logs.md +63 -0
  417. package/dist/global-skills/mongodb-search-and-ai/SKILL.md +142 -0
  418. package/dist/global-skills/mongodb-search-and-ai/references/hybrid-search.md +697 -0
  419. package/dist/global-skills/mongodb-search-and-ai/references/lexical-search-indexing.md +584 -0
  420. package/dist/global-skills/mongodb-search-and-ai/references/lexical-search-querying.md +636 -0
  421. package/dist/global-skills/mongodb-search-and-ai/references/vector-search.md +746 -0
  422. package/dist/global-skills/native-data-fetching/SKILL.md +505 -0
  423. package/dist/global-skills/native-data-fetching/agents/openai.yaml +4 -0
  424. package/dist/global-skills/native-data-fetching/references/expo-router-loaders.md +341 -0
  425. package/dist/global-skills/neon/SKILL.md +343 -0
  426. package/dist/global-skills/neon-ai-gateway/SKILL.md +236 -0
  427. package/dist/global-skills/neon-functions/SKILL.md +490 -0
  428. package/dist/global-skills/neon-functions/references/ai-sdk.md +139 -0
  429. package/dist/global-skills/neon-functions/references/hono-websockets.md +145 -0
  430. package/dist/global-skills/neon-functions/references/mastra-studio.md +127 -0
  431. package/dist/global-skills/neon-functions/references/mcp.md +137 -0
  432. package/dist/global-skills/neon-functions/references/sentry.md +131 -0
  433. package/dist/global-skills/neon-functions/references/sse.md +143 -0
  434. package/dist/global-skills/neon-object-storage/SKILL.md +197 -0
  435. package/dist/global-skills/neon-postgres/SKILL.md +376 -0
  436. package/dist/global-skills/neon-postgres-branches/SKILL.md +281 -0
  437. package/dist/global-skills/neon-postgres-egress-optimizer/SKILL.md +247 -0
  438. package/dist/global-skills/onboarding/SKILL.md +101 -0
  439. package/dist/global-skills/plan-my-idea/SKILL.md +67 -0
  440. package/dist/global-skills/publish-app/SKILL.md +72 -0
  441. package/dist/global-skills/publish-extension/SKILL.md +47 -0
  442. package/dist/global-skills/resend/SKILL.md +294 -0
  443. package/dist/global-skills/resend/references/api-keys.md +98 -0
  444. package/dist/global-skills/resend/references/automations.md +228 -0
  445. package/dist/global-skills/resend/references/broadcasts.md +125 -0
  446. package/dist/global-skills/resend/references/contact-properties.md +111 -0
  447. package/dist/global-skills/resend/references/contacts.md +174 -0
  448. package/dist/global-skills/resend/references/domains.md +179 -0
  449. package/dist/global-skills/resend/references/events.md +119 -0
  450. package/dist/global-skills/resend/references/fetch-all-templates.mjs +37 -0
  451. package/dist/global-skills/resend/references/installation.md +142 -0
  452. package/dist/global-skills/resend/references/logs.md +161 -0
  453. package/dist/global-skills/resend/references/receiving.md +287 -0
  454. package/dist/global-skills/resend/references/segments.md +77 -0
  455. package/dist/global-skills/resend/references/sending/batch-email-examples.md +807 -0
  456. package/dist/global-skills/resend/references/sending/best-practices.md +453 -0
  457. package/dist/global-skills/resend/references/sending/email-management.md +135 -0
  458. package/dist/global-skills/resend/references/sending/overview.md +209 -0
  459. package/dist/global-skills/resend/references/sending/single-email-examples.md +470 -0
  460. package/dist/global-skills/resend/references/templates.md +202 -0
  461. package/dist/global-skills/resend/references/topics.md +104 -0
  462. package/dist/global-skills/resend/references/webhooks.md +317 -0
  463. package/dist/global-skills/reset-password/SKILL.md +59 -0
  464. package/dist/global-skills/save-data/SKILL.md +70 -0
  465. package/dist/global-skills/sentry-sdk-setup/SKILL.md +116 -0
  466. package/dist/global-skills/sentry-workflow/SKILL.md +32 -0
  467. package/dist/global-skills/setup-email/SKILL.md +69 -0
  468. package/dist/global-skills/setup-payments/SKILL.md +82 -0
  469. package/dist/global-skills/setup-sms/SKILL.md +51 -0
  470. package/dist/global-skills/sign-in-with-email-link/SKILL.md +53 -0
  471. package/dist/global-skills/sign-in-with-google/SKILL.md +68 -0
  472. package/dist/global-skills/sign-in-with-phone/SKILL.md +53 -0
  473. package/dist/global-skills/stripe-best-practices/SKILL.md +48 -0
  474. package/dist/global-skills/stripe-best-practices/references/billing.md +58 -0
  475. package/dist/global-skills/stripe-best-practices/references/connect.md +173 -0
  476. package/dist/global-skills/stripe-best-practices/references/payments.md +79 -0
  477. package/dist/global-skills/stripe-best-practices/references/security.md +109 -0
  478. package/dist/global-skills/stripe-best-practices/references/tax.md +37 -0
  479. package/dist/global-skills/stripe-best-practices/references/treasury.md +16 -0
  480. package/dist/global-skills/supabase/CHANGELOG.md +53 -0
  481. package/dist/global-skills/supabase/SKILL.md +145 -0
  482. package/dist/global-skills/supabase/assets/feedback-issue-template.md +17 -0
  483. package/dist/global-skills/supabase/references/skill-feedback.md +17 -0
  484. package/dist/global-skills/supabase-postgres-best-practices/CHANGELOG.md +43 -0
  485. package/dist/global-skills/supabase-postgres-best-practices/SKILL.md +64 -0
  486. package/dist/global-skills/supabase-postgres-best-practices/references/_contributing.md +170 -0
  487. package/dist/global-skills/supabase-postgres-best-practices/references/_sections.md +39 -0
  488. package/dist/global-skills/supabase-postgres-best-practices/references/_template.md +34 -0
  489. package/dist/global-skills/supabase-postgres-best-practices/references/advanced-full-text-search.md +55 -0
  490. package/dist/global-skills/supabase-postgres-best-practices/references/advanced-jsonb-indexing.md +49 -0
  491. package/dist/global-skills/supabase-postgres-best-practices/references/conn-idle-timeout.md +46 -0
  492. package/dist/global-skills/supabase-postgres-best-practices/references/conn-limits.md +44 -0
  493. package/dist/global-skills/supabase-postgres-best-practices/references/conn-pooling.md +41 -0
  494. package/dist/global-skills/supabase-postgres-best-practices/references/conn-prepared-statements.md +46 -0
  495. package/dist/global-skills/supabase-postgres-best-practices/references/data-batch-inserts.md +54 -0
  496. package/dist/global-skills/supabase-postgres-best-practices/references/data-n-plus-one.md +53 -0
  497. package/dist/global-skills/supabase-postgres-best-practices/references/data-pagination.md +50 -0
  498. package/dist/global-skills/supabase-postgres-best-practices/references/data-upsert.md +50 -0
  499. package/dist/global-skills/supabase-postgres-best-practices/references/lock-advisory.md +56 -0
  500. package/dist/global-skills/supabase-postgres-best-practices/references/lock-deadlock-prevention.md +68 -0
  501. package/dist/global-skills/supabase-postgres-best-practices/references/lock-short-transactions.md +50 -0
  502. package/dist/global-skills/supabase-postgres-best-practices/references/lock-skip-locked.md +54 -0
  503. package/dist/global-skills/supabase-postgres-best-practices/references/monitor-explain-analyze.md +45 -0
  504. package/dist/global-skills/supabase-postgres-best-practices/references/monitor-pg-stat-statements.md +55 -0
  505. package/dist/global-skills/supabase-postgres-best-practices/references/monitor-vacuum-analyze.md +55 -0
  506. package/dist/global-skills/supabase-postgres-best-practices/references/query-composite-indexes.md +44 -0
  507. package/dist/global-skills/supabase-postgres-best-practices/references/query-covering-indexes.md +40 -0
  508. package/dist/global-skills/supabase-postgres-best-practices/references/query-index-types.md +48 -0
  509. package/dist/global-skills/supabase-postgres-best-practices/references/query-missing-indexes.md +43 -0
  510. package/dist/global-skills/supabase-postgres-best-practices/references/query-partial-indexes.md +45 -0
  511. package/dist/global-skills/supabase-postgres-best-practices/references/schema-constraints.md +80 -0
  512. package/dist/global-skills/supabase-postgres-best-practices/references/schema-data-types.md +46 -0
  513. package/dist/global-skills/supabase-postgres-best-practices/references/schema-foreign-key-indexes.md +59 -0
  514. package/dist/global-skills/supabase-postgres-best-practices/references/schema-lowercase-identifiers.md +55 -0
  515. package/dist/global-skills/supabase-postgres-best-practices/references/schema-partitioning.md +55 -0
  516. package/dist/global-skills/supabase-postgres-best-practices/references/schema-primary-keys.md +61 -0
  517. package/dist/global-skills/supabase-postgres-best-practices/references/security-privileges.md +54 -0
  518. package/dist/global-skills/supabase-postgres-best-practices/references/security-rls-basics.md +50 -0
  519. package/dist/global-skills/supabase-postgres-best-practices/references/security-rls-performance.md +63 -0
  520. package/dist/global-skills/track-errors/SKILL.md +67 -0
  521. package/dist/global-skills/update-kit/SKILL.md +75 -0
  522. package/dist/global-skills/upgrading-expo/SKILL.md +134 -0
  523. package/dist/global-skills/upgrading-expo/agents/openai.yaml +4 -0
  524. package/dist/global-skills/upgrading-expo/references/expo-av-to-audio.md +132 -0
  525. package/dist/global-skills/upgrading-expo/references/expo-av-to-video.md +160 -0
  526. package/dist/global-skills/upgrading-expo/references/native-tabs.md +124 -0
  527. package/dist/global-skills/upgrading-expo/references/new-architecture.md +79 -0
  528. package/dist/global-skills/upgrading-expo/references/react-19.md +79 -0
  529. package/dist/global-skills/upgrading-expo/references/react-compiler.md +59 -0
  530. package/dist/global-skills/upgrading-expo/references/react-navigation-to-expo-router.md +61 -0
  531. package/dist/global-skills/use-dom/SKILL.md +417 -0
  532. package/dist/global-skills/use-dom/agents/openai.yaml +4 -0
  533. package/dist/global-skills/use-kit-mcp/SKILL.md +100 -0
  534. package/dist/global-skills/use-railway/SKILL.md +357 -0
  535. package/dist/global-skills/use-railway/references/analyze-db-mongo.md +84 -0
  536. package/dist/global-skills/use-railway/references/analyze-db-mysql.md +254 -0
  537. package/dist/global-skills/use-railway/references/analyze-db-postgres.md +479 -0
  538. package/dist/global-skills/use-railway/references/analyze-db-redis.md +208 -0
  539. package/dist/global-skills/use-railway/references/analyze-db.md +344 -0
  540. package/dist/global-skills/use-railway/references/configure.md +359 -0
  541. package/dist/global-skills/use-railway/references/deploy.md +225 -0
  542. package/dist/global-skills/use-railway/references/feature-flags.md +89 -0
  543. package/dist/global-skills/use-railway/references/iac.md +108 -0
  544. package/dist/global-skills/use-railway/references/operate.md +273 -0
  545. package/dist/global-skills/use-railway/references/request.md +262 -0
  546. package/dist/global-skills/use-railway/references/sandbox.md +167 -0
  547. package/dist/global-skills/use-railway/references/setup.md +364 -0
  548. package/dist/global-skills/use-railway/scripts/analyze-mongo.py +1549 -0
  549. package/dist/global-skills/use-railway/scripts/analyze-mysql.py +1195 -0
  550. package/dist/global-skills/use-railway/scripts/analyze-postgres.py +3058 -0
  551. package/dist/global-skills/use-railway/scripts/analyze-redis.py +1090 -0
  552. package/dist/global-skills/use-railway/scripts/dal.py +671 -0
  553. package/dist/global-skills/use-railway/scripts/enable-pg-stats.py +170 -0
  554. package/dist/global-skills/use-railway/scripts/pg-extensions.py +370 -0
  555. package/dist/global-skills/use-railway/scripts/railway-api.sh +52 -0
  556. package/dist/global-skills/vercel-composition-patterns/AGENTS.md +946 -0
  557. package/dist/global-skills/vercel-composition-patterns/README.md +60 -0
  558. package/dist/global-skills/vercel-composition-patterns/SKILL.md +89 -0
  559. package/dist/global-skills/vercel-composition-patterns/metadata.json +11 -0
  560. package/dist/global-skills/vercel-composition-patterns/rules/_sections.md +29 -0
  561. package/dist/global-skills/vercel-composition-patterns/rules/_template.md +24 -0
  562. package/dist/global-skills/vercel-composition-patterns/rules/architecture-avoid-boolean-props.md +100 -0
  563. package/dist/global-skills/vercel-composition-patterns/rules/architecture-compound-components.md +112 -0
  564. package/dist/global-skills/vercel-composition-patterns/rules/patterns-children-over-render-props.md +87 -0
  565. package/dist/global-skills/vercel-composition-patterns/rules/patterns-explicit-variants.md +100 -0
  566. package/dist/global-skills/vercel-composition-patterns/rules/react19-no-forwardref.md +42 -0
  567. package/dist/global-skills/vercel-composition-patterns/rules/state-context-interface.md +191 -0
  568. package/dist/global-skills/vercel-composition-patterns/rules/state-decouple-implementation.md +113 -0
  569. package/dist/global-skills/vercel-composition-patterns/rules/state-lift-state.md +125 -0
  570. package/dist/global-skills/vercel-react-best-practices/AGENTS.md +3810 -0
  571. package/dist/global-skills/vercel-react-best-practices/README.md +123 -0
  572. package/dist/global-skills/vercel-react-best-practices/SKILL.md +149 -0
  573. package/dist/global-skills/vercel-react-best-practices/metadata.json +15 -0
  574. package/dist/global-skills/vercel-react-best-practices/rules/_sections.md +46 -0
  575. package/dist/global-skills/vercel-react-best-practices/rules/_template.md +28 -0
  576. package/dist/global-skills/vercel-react-best-practices/rules/advanced-effect-event-deps.md +56 -0
  577. package/dist/global-skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  578. package/dist/global-skills/vercel-react-best-practices/rules/advanced-init-once.md +42 -0
  579. package/dist/global-skills/vercel-react-best-practices/rules/advanced-use-latest.md +39 -0
  580. package/dist/global-skills/vercel-react-best-practices/rules/async-api-routes.md +38 -0
  581. package/dist/global-skills/vercel-react-best-practices/rules/async-cheap-condition-before-await.md +37 -0
  582. package/dist/global-skills/vercel-react-best-practices/rules/async-defer-await.md +82 -0
  583. package/dist/global-skills/vercel-react-best-practices/rules/async-dependencies.md +51 -0
  584. package/dist/global-skills/vercel-react-best-practices/rules/async-parallel.md +28 -0
  585. package/dist/global-skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +99 -0
  586. package/dist/global-skills/vercel-react-best-practices/rules/bundle-analyzable-paths.md +63 -0
  587. package/dist/global-skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +60 -0
  588. package/dist/global-skills/vercel-react-best-practices/rules/bundle-conditional.md +31 -0
  589. package/dist/global-skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +49 -0
  590. package/dist/global-skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +35 -0
  591. package/dist/global-skills/vercel-react-best-practices/rules/bundle-preload.md +50 -0
  592. package/dist/global-skills/vercel-react-best-practices/rules/client-event-listeners.md +74 -0
  593. package/dist/global-skills/vercel-react-best-practices/rules/client-localstorage-schema.md +71 -0
  594. package/dist/global-skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +48 -0
  595. package/dist/global-skills/vercel-react-best-practices/rules/client-swr-dedup.md +56 -0
  596. package/dist/global-skills/vercel-react-best-practices/rules/js-batch-dom-css.md +107 -0
  597. package/dist/global-skills/vercel-react-best-practices/rules/js-cache-function-results.md +80 -0
  598. package/dist/global-skills/vercel-react-best-practices/rules/js-cache-property-access.md +28 -0
  599. package/dist/global-skills/vercel-react-best-practices/rules/js-cache-storage.md +70 -0
  600. package/dist/global-skills/vercel-react-best-practices/rules/js-combine-iterations.md +32 -0
  601. package/dist/global-skills/vercel-react-best-practices/rules/js-early-exit.md +50 -0
  602. package/dist/global-skills/vercel-react-best-practices/rules/js-flatmap-filter.md +60 -0
  603. package/dist/global-skills/vercel-react-best-practices/rules/js-hoist-regexp.md +45 -0
  604. package/dist/global-skills/vercel-react-best-practices/rules/js-index-maps.md +37 -0
  605. package/dist/global-skills/vercel-react-best-practices/rules/js-length-check-first.md +49 -0
  606. package/dist/global-skills/vercel-react-best-practices/rules/js-min-max-loop.md +82 -0
  607. package/dist/global-skills/vercel-react-best-practices/rules/js-request-idle-callback.md +105 -0
  608. package/dist/global-skills/vercel-react-best-practices/rules/js-set-map-lookups.md +24 -0
  609. package/dist/global-skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +57 -0
  610. package/dist/global-skills/vercel-react-best-practices/rules/rendering-activity.md +26 -0
  611. package/dist/global-skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  612. package/dist/global-skills/vercel-react-best-practices/rules/rendering-conditional-render.md +40 -0
  613. package/dist/global-skills/vercel-react-best-practices/rules/rendering-content-visibility.md +38 -0
  614. package/dist/global-skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +46 -0
  615. package/dist/global-skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
  616. package/dist/global-skills/vercel-react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
  617. package/dist/global-skills/vercel-react-best-practices/rules/rendering-resource-hints.md +85 -0
  618. package/dist/global-skills/vercel-react-best-practices/rules/rendering-script-defer-async.md +68 -0
  619. package/dist/global-skills/vercel-react-best-practices/rules/rendering-svg-precision.md +28 -0
  620. package/dist/global-skills/vercel-react-best-practices/rules/rendering-usetransition-loading.md +75 -0
  621. package/dist/global-skills/vercel-react-best-practices/rules/rerender-defer-reads.md +39 -0
  622. package/dist/global-skills/vercel-react-best-practices/rules/rerender-dependencies.md +45 -0
  623. package/dist/global-skills/vercel-react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
  624. package/dist/global-skills/vercel-react-best-practices/rules/rerender-derived-state.md +29 -0
  625. package/dist/global-skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +74 -0
  626. package/dist/global-skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  627. package/dist/global-skills/vercel-react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
  628. package/dist/global-skills/vercel-react-best-practices/rules/rerender-memo.md +44 -0
  629. package/dist/global-skills/vercel-react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
  630. package/dist/global-skills/vercel-react-best-practices/rules/rerender-no-inline-components.md +82 -0
  631. package/dist/global-skills/vercel-react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
  632. package/dist/global-skills/vercel-react-best-practices/rules/rerender-split-combined-hooks.md +64 -0
  633. package/dist/global-skills/vercel-react-best-practices/rules/rerender-transitions.md +40 -0
  634. package/dist/global-skills/vercel-react-best-practices/rules/rerender-use-deferred-value.md +59 -0
  635. package/dist/global-skills/vercel-react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
  636. package/dist/global-skills/vercel-react-best-practices/rules/server-after-nonblocking.md +73 -0
  637. package/dist/global-skills/vercel-react-best-practices/rules/server-auth-actions.md +96 -0
  638. package/dist/global-skills/vercel-react-best-practices/rules/server-cache-lru.md +41 -0
  639. package/dist/global-skills/vercel-react-best-practices/rules/server-cache-react.md +76 -0
  640. package/dist/global-skills/vercel-react-best-practices/rules/server-dedup-props.md +65 -0
  641. package/dist/global-skills/vercel-react-best-practices/rules/server-hoist-static-io.md +149 -0
  642. package/dist/global-skills/vercel-react-best-practices/rules/server-no-shared-module-state.md +50 -0
  643. package/dist/global-skills/vercel-react-best-practices/rules/server-parallel-fetching.md +83 -0
  644. package/dist/global-skills/vercel-react-best-practices/rules/server-parallel-nested-fetching.md +34 -0
  645. package/dist/global-skills/vercel-react-best-practices/rules/server-serialization.md +38 -0
  646. package/dist/global-skills/web-to-native/SKILL.md +83 -0
  647. package/dist/global-skills/web-to-native/references/false-friends.md +119 -0
  648. package/dist/global-skills/web-to-native/references/native-patterns.md +39 -0
  649. package/dist/global-skills/web-to-native/references/run-as-goal.md +48 -0
  650. package/dist/global-skills/web-to-native/references/verify-on-device.md +45 -0
  651. package/dist/global-skills/wire-auth/SKILL.md +28 -0
  652. package/dist/global-skills/wire-database/SKILL.md +28 -0
  653. package/dist/global-skills/wire-email/SKILL.md +27 -0
  654. package/dist/global-skills/wire-payments/SKILL.md +27 -0
  655. package/dist/global-skills/workers-best-practices/SKILL.md +127 -0
  656. package/dist/global-skills/workers-best-practices/references/review.md +174 -0
  657. package/dist/global-skills/workers-best-practices/references/rules.md +463 -0
  658. package/dist/global-skills/wrangler/SKILL.md +922 -0
  659. package/dist/global-skills/xcode-project-setup/SKILL.md +140 -0
  660. package/dist/global-skills/xcode-project-setup/scripts/xcode_spm_setup/Package.resolved +41 -0
  661. package/dist/global-skills/xcode-project-setup/scripts/xcode_spm_setup/Package.swift +17 -0
  662. package/dist/global-skills/xcode-project-setup/scripts/xcode_spm_setup/Sources/main.swift +232 -0
  663. package/package.json +21 -20
  664. package/LICENSE.md +0 -47
  665. package/dist/index.js +0 -21593
@@ -0,0 +1,1675 @@
1
+ # PostHog Python SDK
2
+
3
+ **SDK Version:** 7.22.1
4
+
5
+ Integrate PostHog into any python application.
6
+
7
+ ## Categories
8
+
9
+ - Initialization
10
+ - Identification
11
+ - Capture
12
+ - Error Tracking
13
+ - Feature flags
14
+ - Contexts
15
+ - Events
16
+ - Client management
17
+
18
+ ## PostHog
19
+
20
+ This is the SDK reference for the PostHog Python SDK. You can learn more about example usage in the [Python SDK documentation](/docs/libraries/python). You can also follow [Flask](/docs/libraries/flask) and [Django](/docs/libraries/django) guides to integrate PostHog into your project. For long-running applications, create one client during application startup and reuse it for the lifetime of the process. This keeps background queues predictable and makes shutdown flushing straightforward. Multiple clients are still supported for intentional multi-project or multi-host setups.
21
+
22
+ ### Initialization methods
23
+
24
+ #### Client()
25
+
26
+ **Release Tag:** public
27
+
28
+ Initialize a new PostHog client instance.
29
+
30
+ ### Parameters
31
+
32
+ - **`project_api_key?`** (`str`) - PostHog project API key/token.
33
+ - **`host`** (`any`) - PostHog host. Defaults to the US ingestion endpoint when not set. App hosts such as ``https://us.posthog.com`` are mapped to the corresponding ingestion host.
34
+ - **`debug`** (`bool`) - Enable verbose SDK logging and re-raise errors from public API methods.
35
+ - **`max_queue_size`** (`int`) - Maximum number of events buffered before upload.
36
+ - **`send`** (`bool`) - If False, queueing succeeds but events are not sent.
37
+ - **`on_error`** (`any`) - Optional callback invoked by background consumers when an upload fails.
38
+ - **`flush_at`** (`int`) - Number of queued events that triggers a batch upload.
39
+ - **`flush_interval`** (`float`) - Maximum seconds a background consumer waits before flushing a partial batch.
40
+ - **`gzip`** (`bool`) - Whether to gzip event upload payloads.
41
+ - **`max_retries`** (`int`) - Number of upload retries for background consumers.
42
+ - **`sync_mode`** (`bool`) - If True, send each event synchronously instead of using background worker threads.
43
+ - **`timeout`** (`int`) - HTTP request timeout in seconds for event uploads.
44
+ - **`thread`** (`int`) - Number of background consumer threads.
45
+ - **`poll_interval`** (`int`) - Seconds between local feature flag definition refreshes.
46
+ - **`personal_api_key`** (`any`) - Deprecated alias for ``secret_key``. Still honored for backwards compatibility; prefer ``secret_key``, which also accepts a Project Secret API Key.
47
+ - **`disabled`** (`bool`) - If True, disable captures and API requests. Useful in tests.
48
+ - **`disable_geoip`** (`bool`) - Whether to disable server-side GeoIP enrichment. Defaults to True.
49
+ - **`is_server`** (`bool`) - Whether events are emitted from a server-side runtime. Defaults to True; set to False when using the SDK as a client/CLI so the device OS is attributed to the person normally.
50
+ - **`historical_migration`** (`bool`) - Mark events as historical migration imports.
51
+ - **`feature_flags_request_timeout_seconds`** (`int`) - Timeout in seconds for feature flag and remote config requests.
52
+ - **`feature_flags_request_max_retries`** (`int`) - Number of retries for feature flag requests after network, transport, or timeout failures. Defaults to 1. Set to 0 to disable retries.
53
+ - **`super_properties`** (`any`) - Properties merged into every captured event.
54
+ - **`enable_exception_autocapture`** (`bool`) - Automatically capture uncaught exceptions.
55
+ - **`log_captured_exceptions`** (`bool`) - Also log exceptions captured by error tracking.
56
+ - **`project_root`** (`any`) - Root path used to determine in-app stack frames for captured exceptions. Defaults to the current working directory.
57
+ - **`privacy_mode`** (`bool`) - For AI observability, capture usage metadata without prompt inputs or outputs.
58
+ - **`before_send`** (`any`) - Optional callback that can modify or drop events before upload. Return ``None`` to drop an event.
59
+ - **`flag_fallback_cache_url`** (`any`) - Optional feature flag fallback cache URL, such as ``memory://local/?ttl=300&size=10000`` or a Redis URL.
60
+ - **`enable_local_evaluation`** (`bool`) - Whether to poll feature flag definitions for local evaluation when a personal API key is configured.
61
+ - **`flag_definition_cache_provider?`** (`FlagDefinitionCacheProvider`) - Optional external cache provider for sharing feature flag definitions across workers.
62
+ - **`capture_exception_code_variables`** (`bool`) - Capture local variable values on exception stack frames.
63
+ - **`code_variables_mask_patterns`** (`any`) - Variable-name patterns to mask when capturing code variables.
64
+ - **`code_variables_ignore_patterns`** (`any`) - Variable-name patterns to omit when capturing code variables.
65
+ - **`code_variables_mask_url_credentials`** (`any`) - Scrub credentials embedded in URLs/DSNs (e.g. ``user:pass@host``) from captured code variables, regardless of the surrounding variable name. Defaults to True.
66
+ - **`code_variables_detect_secrets`** (`any`) - Last-resort entropy-based detection that redacts high-entropy secret-looking values (API keys, tokens, strong passwords) sitting in innocuously-named variables, after the name and URL checks. Skips structured ids (UUIDs, ObjectIds, hashes). Defaults to True.
67
+ - **`in_app_modules`** (`UnionType[list[str], any]`) - Module/package prefixes treated as in-app frames in captured exceptions.
68
+ - **`enable_exception_autocapture_rate_limiting`** (`bool`) - Rate limit autocaptured exceptions client-side with a token bucket per exception type. Disabled by default.
69
+ - **`exception_autocapture_bucket_size`** (`int`) - Maximum burst of autocaptured exceptions allowed per exception type (token bucket size, clamped to 0-100).
70
+ - **`exception_autocapture_refill_rate`** (`int`) - Tokens restored per refill interval for each exception type's bucket.
71
+ - **`exception_autocapture_refill_interval_seconds`** (`int`) - Seconds between token refills for autocaptured exception rate limiting.
72
+ - **`capture_mode`** (`CaptureMode`) - Capture wire protocol to use. Defaults to ``CaptureMode.V0`` (legacy ``/batch/``). Set ``CaptureMode.V1`` (or pass the string ``"v1"``) to opt into ``/i/v1/analytics/events``. When omitted, the ``POSTHOG_CAPTURE_MODE`` env var is consulted, then ``V0``.
73
+ - **`capture_compression`** (`CaptureCompression`) - Request-body compression for capture-v1 uploads (ignored in V0, which uses ``gzip``). ``CaptureCompression.GZIP`` or ``DEFLATE`` (or the strings ``"gzip"``/``"deflate"``). When omitted, the ``POSTHOG_CAPTURE_COMPRESSION`` env var is consulted, then the legacy ``gzip`` flag, then no compression.
74
+ - **`secret_key`** (`any`) - A Personal API Key or Project Secret API Key, used to authenticate local feature flag evaluation, remote config payloads, and decrypted flag payloads. Example:: posthog.Client(project_api_key, secret_key="phx_...")
75
+ - **`_dedicated_ai_endpoint`** (`bool`)
76
+
77
+ ### Returns
78
+
79
+ - `None`
80
+
81
+ ### Examples
82
+
83
+ ```python
84
+ from posthog import Posthog
85
+
86
+ posthog = Posthog('<ph_project_api_key>', host='<ph_app_host>')
87
+ ```
88
+
89
+ ---
90
+
91
+ ### Identification methods
92
+
93
+ #### alias()
94
+
95
+ **Release Tag:** public
96
+
97
+ Create an alias between two distinct IDs.
98
+
99
+ ### Parameters
100
+
101
+ - **`previous_id?`** (`str`) - The previous distinct ID.
102
+ - **`distinct_id?`** (`str`) - The new distinct ID to alias to.
103
+ - **`timestamp`** (`datetime`) - The timestamp of the event.
104
+ - **`uuid?`** (`str`) - A unique identifier for the event. If provided, it must be a valid UUID string or uuid.UUID instance; invalid values are ignored and replaced with a newly generated UUID.
105
+ - **`disable_geoip?`** (`bool`) - Whether to disable GeoIP for this event.
106
+
107
+ ### Returns
108
+
109
+ - `Optional[str]`
110
+
111
+ ### Examples
112
+
113
+ ```python
114
+ posthog.alias(previous_id='distinct_id', distinct_id='alias_id')
115
+ ```
116
+
117
+ ---
118
+
119
+ #### group_identify()
120
+
121
+ **Release Tag:** public
122
+
123
+ Identify a group and set its properties.
124
+
125
+ ### Parameters
126
+
127
+ - **`group_type?`** (`str`) - The type of group (e.g., 'company', 'team').
128
+ - **`group_key?`** (`str`) - The unique identifier for the group.
129
+ - **`properties?`** (`dict[str, Any]`) - A dictionary of properties to set on the group.
130
+ - **`timestamp`** (`datetime`) - The timestamp of the event.
131
+ - **`uuid`** (`str`) - A unique identifier for the event. If provided, it must be a valid UUID string or uuid.UUID instance; invalid values are ignored and replaced with a newly generated UUID.
132
+ - **`disable_geoip?`** (`bool`) - Whether to disable GeoIP for this event.
133
+ - **`distinct_id`** (`Number`) - The distinct ID of the user performing the action.
134
+
135
+ ### Returns
136
+
137
+ - `Optional[str]`
138
+
139
+ ### Examples
140
+
141
+ ```python
142
+ posthog.group_identify('company', 'company_id_in_your_db', {
143
+ 'name': 'Awesome Inc.',
144
+ 'employees': 11
145
+ })
146
+ ```
147
+
148
+ ---
149
+
150
+ #### set()
151
+
152
+ **Release Tag:** public
153
+
154
+ Set properties on a person profile.
155
+
156
+ ### Parameters
157
+
158
+ - **`kwargs?`** (`Unpack[OptionalSetArgs]`)
159
+
160
+ ### Returns
161
+
162
+ - `Optional[str]`
163
+
164
+ ### Examples
165
+
166
+ ```python
167
+ # Set with distinct id
168
+ posthog.set(distinct_id='user123', properties={'name': 'Max Hedgehog'})
169
+ ```
170
+
171
+ ---
172
+
173
+ #### set_once()
174
+
175
+ **Release Tag:** public
176
+
177
+ Set properties on a person profile only if they haven't been set before.
178
+
179
+ ### Parameters
180
+
181
+ - **`kwargs?`** (`Unpack[OptionalSetArgs]`)
182
+
183
+ ### Returns
184
+
185
+ - `Optional[str]`
186
+
187
+ ### Examples
188
+
189
+ ```python
190
+ posthog.set_once(distinct_id='user123', properties={'initial_signup_date': '2024-01-01'})
191
+ ```
192
+
193
+ ---
194
+
195
+ ### Capture methods
196
+
197
+ #### capture()
198
+
199
+ **Release Tag:** public
200
+
201
+ Captures an event manually. [Learn about capture best practices](https://posthog.com/docs/product-analytics/capture-events)
202
+
203
+ ### Parameters
204
+
205
+ - **`event?`** (`str`) - The event name to capture.
206
+ - **`kwargs?`** (`Unpack[OptionalCaptureArgs]`)
207
+
208
+ ### Returns
209
+
210
+ - `Optional[str]`
211
+
212
+ ### Examples
213
+
214
+ #### Anonymous event
215
+
216
+ ```python
217
+ # Anonymous event
218
+ posthog.capture('some-anon-event')
219
+ ```
220
+
221
+ #### Context usage
222
+
223
+ ```python
224
+ # Context usage
225
+ from posthog import identify_context, new_context
226
+ with new_context():
227
+ identify_context('distinct_id_of_the_user')
228
+ posthog.capture('user_signed_up')
229
+ posthog.capture('user_logged_in')
230
+ posthog.capture('some-custom-action', distinct_id='distinct_id_of_the_user')
231
+ ```
232
+
233
+ #### Set event properties
234
+
235
+ ```python
236
+ # Set event properties
237
+ posthog.capture(
238
+ "user_signed_up",
239
+ distinct_id="distinct_id_of_the_user",
240
+ properties={
241
+ "login_type": "email",
242
+ "is_free_trial": "true"
243
+ }
244
+ )
245
+ ```
246
+
247
+ #### Page view event
248
+
249
+ ```python
250
+ # Page view event
251
+ posthog.capture('$pageview', distinct_id="distinct_id_of_the_user", properties={'$current_url': 'https://example.com'})
252
+ ```
253
+
254
+ ---
255
+
256
+ ### Error Tracking methods
257
+
258
+ #### capture_exception()
259
+
260
+ **Release Tag:** public
261
+
262
+ Capture an exception for error tracking.
263
+
264
+ ### Parameters
265
+
266
+ - **`exception?`** (`BaseException`) - The exception to capture.
267
+ - **`kwargs?`** (`Unpack[OptionalCaptureArgs]`)
268
+
269
+ ### Returns
270
+
271
+ - `Optional[str]`
272
+
273
+ ### Examples
274
+
275
+ ```python
276
+ try:
277
+ # Some code that might fail
278
+ pass
279
+ except Exception as e:
280
+ posthog.capture_exception(e, 'user_distinct_id', properties=additional_properties)
281
+ ```
282
+
283
+ ---
284
+
285
+ ### Feature flags methods
286
+
287
+ #### evaluate_flags()
288
+
289
+ **Release Tag:** public
290
+
291
+ Evaluate all feature flags for a user in a single call and return a :class:`FeatureFlagEvaluations` snapshot. Branch on ``.is_enabled()`` / ``.get_flag()`` and pass the same snapshot to :meth:`capture` via the ``flags`` option so events carry the exact flag values the code branched on. Prefer this over repeated ``get_feature_flag()`` calls and over ``capture(send_feature_flags=True)`` — it consolidates flag evaluation into a single ``/flags`` request per incoming request. Local evaluation is transparent: when the poller resolves a flag, the snapshot's ``$feature_flag_called`` events are tagged ``locally_evaluated=True`` and reason ``"Evaluated locally"``.
292
+
293
+ ### Parameters
294
+
295
+ - **`distinct_id`** (`Number`) - The user's distinct ID. If ``None``, falls back to the context distinct_id. If still unresolvable, returns an empty snapshot.
296
+ - **`groups?`** (`Mapping[str, Union[str, int]]`) - Mapping of group type to group key.
297
+ - **`person_properties?`** (`dict[str, Any]`) - Person properties to use for evaluation.
298
+ - **`group_properties?`** (`dict[str, dict[str, Any]]`) - Group properties keyed by group type.
299
+ - **`only_evaluate_locally`** (`bool`) - If True, never fall back to remote evaluation — flags that can't be evaluated locally are simply omitted from the snapshot.
300
+ - **`disable_geoip?`** (`bool`) - Whether to disable GeoIP lookup.
301
+ - **`flag_keys?`** (`list[str]`) - Optional list of flag keys to scope the underlying ``/flags`` request to a subset.
302
+ - **`device_id?`** (`str`) - Optional device ID override. If not provided, falls back to the context device_id (which may be set via tracing headers). Used by experience-continuity flags to match users across distinct_id changes.
303
+
304
+ ### Returns
305
+
306
+ - `FeatureFlagEvaluations`
307
+
308
+ ### Examples
309
+
310
+ ```python
311
+ flags = posthog.evaluate_flags(
312
+ "user_123",
313
+ person_properties={"plan": "enterprise"},
314
+ )
315
+ if flags.is_enabled("new-dashboard"):
316
+ render_new_dashboard()
317
+ posthog.capture("page_viewed", distinct_id="user_123", flags=flags)
318
+ ```
319
+
320
+ ---
321
+
322
+ #### feature_enabled()
323
+
324
+ **Release Tag:** public
325
+
326
+ Check if a feature flag is enabled for a user.
327
+
328
+ ### Parameters
329
+
330
+ - **`key?`** (`str`) - The feature flag key.
331
+ - **`distinct_id?`** (`Number`) - The distinct ID of the user.
332
+ - **`groups?`** (`Mapping[str, Union[str, int]]`) - A dictionary of group information.
333
+ - **`person_properties?`** (`dict[str, Any]`) - A dictionary of person properties.
334
+ - **`group_properties?`** (`dict[str, dict[str, Any]]`) - A dictionary of group properties.
335
+ - **`only_evaluate_locally`** (`bool`) - Whether to only evaluate locally.
336
+ - **`send_feature_flag_events`** (`bool`) - Whether to send feature flag events.
337
+ - **`disable_geoip?`** (`bool`) - Whether to disable GeoIP for this request.
338
+ - **`device_id?`** (`str`) - The device ID for this request.
339
+
340
+ ### Returns
341
+
342
+ - `Optional[bool]`
343
+
344
+ ### Examples
345
+
346
+ ```python
347
+ is_my_flag_enabled = posthog.feature_enabled('flag-key', 'distinct_id_of_your_user')
348
+ if is_my_flag_enabled:
349
+ # Do something differently for this user
350
+ # Optional: fetch the payload
351
+ matched_flag_payload = posthog.get_feature_flag_payload('flag-key', 'distinct_id_of_your_user')
352
+ ```
353
+
354
+ ---
355
+
356
+ #### feature_flag_definitions()
357
+
358
+ **Release Tag:** public
359
+
360
+ Return feature flag definitions loaded for local evaluation. Returns: The currently loaded feature flag definitions, or ``None`` before local evaluation has loaded definitions.
361
+
362
+ ### Returns
363
+
364
+ - `None`
365
+
366
+ ---
367
+
368
+ #### get_all_flags()
369
+
370
+ **Release Tag:** public
371
+
372
+ Get all feature flags for a user.
373
+
374
+ ### Parameters
375
+
376
+ - **`distinct_id?`** (`Number`) - The distinct ID of the user.
377
+ - **`groups?`** (`Mapping[str, Union[str, int]]`) - A dictionary of group information.
378
+ - **`person_properties?`** (`dict[str, Any]`) - A dictionary of person properties.
379
+ - **`group_properties?`** (`dict[str, dict[str, Any]]`) - A dictionary of group properties.
380
+ - **`only_evaluate_locally`** (`bool`) - Whether to only evaluate locally.
381
+ - **`disable_geoip?`** (`bool`) - Whether to disable GeoIP for this request.
382
+ - **`flag_keys_to_evaluate?`** (`list[str]`) - A list of specific flag keys to evaluate. If provided, only these flags will be evaluated, improving performance.
383
+ - **`device_id?`** (`str`) - The device ID for this request.
384
+
385
+ ### Returns
386
+
387
+ - `Optional[dict[str, Union[bool, str]]]`
388
+
389
+ ### Examples
390
+
391
+ ```python
392
+ posthog.get_all_flags('distinct_id_of_your_user')
393
+ ```
394
+
395
+ ---
396
+
397
+ #### get_all_flags_and_payloads()
398
+
399
+ **Release Tag:** public
400
+
401
+ Get all feature flags and their payloads for a user.
402
+
403
+ ### Parameters
404
+
405
+ - **`distinct_id?`** (`Number`) - The distinct ID of the user.
406
+ - **`groups?`** (`Mapping[str, Union[str, int]]`) - A dictionary of group information.
407
+ - **`person_properties?`** (`dict[str, Any]`) - A dictionary of person properties.
408
+ - **`group_properties?`** (`dict[str, dict[str, Any]]`) - A dictionary of group properties.
409
+ - **`only_evaluate_locally`** (`bool`) - Whether to only evaluate locally.
410
+ - **`disable_geoip?`** (`bool`) - Whether to disable GeoIP for this request.
411
+ - **`flag_keys_to_evaluate?`** (`list[str]`) - A list of specific flag keys to evaluate. If provided, only these flags will be evaluated, improving performance.
412
+ - **`device_id?`** (`str`) - The device ID for this request.
413
+
414
+ ### Returns
415
+
416
+ - `FlagsAndPayloads`
417
+
418
+ ### Examples
419
+
420
+ ```python
421
+ posthog.get_all_flags_and_payloads('distinct_id_of_your_user')
422
+ ```
423
+
424
+ ---
425
+
426
+ #### get_feature_flag()
427
+
428
+ **Release Tag:** public
429
+
430
+ Get multivariate feature flag value for a user.
431
+
432
+ ### Parameters
433
+
434
+ - **`key?`** (`str`) - The feature flag key.
435
+ - **`distinct_id?`** (`Number`) - The distinct ID of the user.
436
+ - **`groups?`** (`Mapping[str, Union[str, int]]`) - A dictionary of group information.
437
+ - **`person_properties?`** (`dict[str, Any]`) - A dictionary of person properties.
438
+ - **`group_properties?`** (`dict[str, dict[str, Any]]`) - A dictionary of group properties.
439
+ - **`only_evaluate_locally`** (`bool`) - Whether to only evaluate locally.
440
+ - **`send_feature_flag_events`** (`bool`) - Whether to send feature flag events.
441
+ - **`disable_geoip?`** (`bool`) - Whether to disable GeoIP for this request.
442
+ - **`device_id?`** (`str`) - The device ID for this request.
443
+
444
+ ### Returns
445
+
446
+ - `Union[bool, str, any]`
447
+
448
+ ### Examples
449
+
450
+ ```python
451
+ enabled_variant = posthog.get_feature_flag('flag-key', 'distinct_id_of_your_user')
452
+ if enabled_variant == 'variant-key': # replace 'variant-key' with the key of your variant
453
+ # Do something differently for this user
454
+ # Optional: fetch the payload
455
+ matched_flag_payload = posthog.get_feature_flag_payload('flag-key', 'distinct_id_of_your_user')
456
+ ```
457
+
458
+ ---
459
+
460
+ #### get_feature_flag_payload()
461
+
462
+ **Release Tag:** public
463
+
464
+ Get the payload for a feature flag.
465
+
466
+ ### Parameters
467
+
468
+ - **`key?`** (`str`) - The feature flag key.
469
+ - **`distinct_id?`** (`Number`) - The distinct ID of the user.
470
+ - **`match_value`** (`bool`) - The specific flag value to get payload for.
471
+ - **`groups?`** (`Mapping[str, Union[str, int]]`) - A dictionary of group information.
472
+ - **`person_properties?`** (`dict[str, Any]`) - A dictionary of person properties.
473
+ - **`group_properties?`** (`dict[str, dict[str, Any]]`) - A dictionary of group properties.
474
+ - **`only_evaluate_locally`** (`bool`) - Whether to only evaluate locally.
475
+ - **`send_feature_flag_events`** (`bool`) - Deprecated. Use get_feature_flag() instead if you need events.
476
+ - **`disable_geoip?`** (`bool`) - Whether to disable GeoIP for this request.
477
+ - **`device_id?`** (`str`) - The device ID for this request.
478
+
479
+ ### Returns
480
+
481
+ - `Optional[object]`
482
+
483
+ ### Examples
484
+
485
+ ```python
486
+ is_my_flag_enabled = posthog.feature_enabled('flag-key', 'distinct_id_of_your_user')
487
+
488
+ if is_my_flag_enabled:
489
+ # Do something differently for this user
490
+ # Optional: fetch the payload
491
+ matched_flag_payload = posthog.get_feature_flag_payload('flag-key', 'distinct_id_of_your_user')
492
+ ```
493
+
494
+ ---
495
+
496
+ #### get_feature_flags_and_payloads()
497
+
498
+ **Release Tag:** public
499
+
500
+ Get feature flags and payloads for a user.
501
+
502
+ ### Parameters
503
+
504
+ - **`distinct_id?`** (`Number`) - The distinct ID of the user.
505
+ - **`groups?`** (`Mapping[str, Union[str, int]]`) - A dictionary of group information.
506
+ - **`person_properties?`** (`dict[str, Any]`) - A dictionary of person properties.
507
+ - **`group_properties?`** (`dict[str, dict[str, Any]]`) - A dictionary of group properties.
508
+ - **`disable_geoip?`** (`bool`) - Whether to disable GeoIP for this request.
509
+ - **`flag_keys_to_evaluate?`** (`list[str]`) - A list of specific flag keys to evaluate. If provided, only these flags will be evaluated, improving performance.
510
+ - **`device_id?`** (`str`) - The device ID for this request.
511
+
512
+ ### Returns
513
+
514
+ - `FlagsAndPayloads`
515
+
516
+ ### Examples
517
+
518
+ ```python
519
+ result = posthog.get_feature_flags_and_payloads('<distinct_id>')
520
+ ```
521
+
522
+ ---
523
+
524
+ #### get_feature_payloads()
525
+
526
+ **Release Tag:** public
527
+
528
+ Get feature flag payloads for a user.
529
+
530
+ ### Parameters
531
+
532
+ - **`distinct_id?`** (`Number`) - The distinct ID of the user.
533
+ - **`groups?`** (`Mapping[str, Union[str, int]]`) - A dictionary of group information.
534
+ - **`person_properties?`** (`dict[str, Any]`) - A dictionary of person properties.
535
+ - **`group_properties?`** (`dict[str, dict[str, Any]]`) - A dictionary of group properties.
536
+ - **`disable_geoip?`** (`bool`) - Whether to disable GeoIP for this request.
537
+ - **`flag_keys_to_evaluate?`** (`list[str]`) - A list of specific flag keys to evaluate. If provided, only these flags will be evaluated, improving performance.
538
+ - **`device_id?`** (`str`) - The device ID for this request.
539
+
540
+ ### Returns
541
+
542
+ - `dict[str, str]`
543
+
544
+ ### Examples
545
+
546
+ ```python
547
+ payloads = posthog.get_feature_payloads('<distinct_id>')
548
+ ```
549
+
550
+ ---
551
+
552
+ #### get_feature_variants()
553
+
554
+ **Release Tag:** public
555
+
556
+ Get feature flag variants for a user.
557
+
558
+ ### Parameters
559
+
560
+ - **`distinct_id?`** (`Number`) - The distinct ID of the user.
561
+ - **`groups?`** (`Mapping[str, Union[str, int]]`) - A dictionary of group information.
562
+ - **`person_properties?`** (`dict[str, Any]`) - A dictionary of person properties.
563
+ - **`group_properties?`** (`dict[str, dict[str, Any]]`) - A dictionary of group properties.
564
+ - **`disable_geoip?`** (`bool`) - Whether to disable GeoIP for this request.
565
+ - **`flag_keys_to_evaluate?`** (`list[str]`) - A list of specific flag keys to evaluate. If provided, only these flags will be evaluated, improving performance.
566
+ - **`device_id?`** (`str`) - The device ID for this request.
567
+
568
+ ### Returns
569
+
570
+ - `dict[str, Union[bool, str]]`
571
+
572
+ ---
573
+
574
+ #### get_flags_decision()
575
+
576
+ **Release Tag:** public
577
+
578
+ Get feature flags decision.
579
+
580
+ ### Parameters
581
+
582
+ - **`distinct_id`** (`Number`) - The distinct ID of the user.
583
+ - **`groups?`** (`Mapping[str, Union[str, int]]`) - A dictionary of group information.
584
+ - **`person_properties?`** (`dict[str, Any]`) - A dictionary of person properties.
585
+ - **`group_properties?`** (`dict[str, dict[str, Any]]`) - A dictionary of group properties.
586
+ - **`disable_geoip?`** (`bool`) - Whether to disable GeoIP for this request.
587
+ - **`flag_keys_to_evaluate?`** (`list[str]`) - A list of specific flag keys to evaluate. If provided, only these flags will be evaluated, improving performance.
588
+ - **`device_id?`** (`str`) - The device ID for this request.
589
+
590
+ ### Returns
591
+
592
+ - `FlagsResponse`
593
+
594
+ ### Examples
595
+
596
+ ```python
597
+ decision = posthog.get_flags_decision('user123')
598
+ ```
599
+
600
+ ---
601
+
602
+ #### get_remote_config_payload()
603
+
604
+ **Release Tag:** public
605
+
606
+ Get the payload for a remote config feature flag.
607
+
608
+ ### Parameters
609
+
610
+ - **`key?`** (`str`) - The remote config feature flag key.
611
+
612
+ ### Returns
613
+
614
+ - `None`
615
+
616
+ ---
617
+
618
+ #### load_feature_flags()
619
+
620
+ **Release Tag:** public
621
+
622
+ Load feature flags for local evaluation.
623
+
624
+ ### Returns
625
+
626
+ - `None`
627
+
628
+ ### Examples
629
+
630
+ ```python
631
+ posthog.load_feature_flags()
632
+ ```
633
+
634
+ ---
635
+
636
+ ### Other methods
637
+
638
+ #### flush()
639
+
640
+ **Release Tag:** public
641
+
642
+ Force a flush from the internal queue to the server. Do not use directly, call `shutdown()` instead.
643
+
644
+ ### Parameters
645
+
646
+ - **`timeout_seconds?`** (`float`) - Maximum seconds to wait for the queue to flush. Defaults to 10 seconds. Pass ``None`` to wait indefinitely.
647
+
648
+ ### Returns
649
+
650
+ - `any`
651
+
652
+ ### Examples
653
+
654
+ ```python
655
+ posthog.capture('event_name')
656
+ posthog.flush() # Ensures the event is sent immediately
657
+ ```
658
+
659
+ ---
660
+
661
+ #### get_feature_flag_result()
662
+
663
+ **Release Tag:** public
664
+
665
+ Get a FeatureFlagResult object which contains the flag result and payload for a key by evaluating locally or remotely depending on whether local evaluation is enabled and the flag can be locally evaluated. This also captures the `$feature_flag_called` event unless `send_feature_flag_events` is `False`.
666
+
667
+ ### Parameters
668
+
669
+ - **`key?`** (`str`) - The feature flag key.
670
+ - **`distinct_id?`** (`Number`) - The distinct ID of the user.
671
+ - **`groups?`** (`Mapping[str, Union[str, int]]`) - A dictionary of group information.
672
+ - **`person_properties?`** (`dict[str, Any]`) - A dictionary of person properties.
673
+ - **`group_properties?`** (`dict[str, dict[str, Any]]`) - A dictionary of group properties.
674
+ - **`only_evaluate_locally`** (`bool`) - Whether to only evaluate locally.
675
+ - **`send_feature_flag_events`** (`bool`) - Whether to send feature flag events.
676
+ - **`disable_geoip?`** (`bool`) - Whether to disable GeoIP for this request.
677
+ - **`device_id?`** (`str`) - The device ID for this request.
678
+
679
+ ### Returns
680
+
681
+ - `Optional[FeatureFlagResult]`
682
+
683
+ ### Examples
684
+
685
+ ```python
686
+ flag_result = posthog.get_feature_flag_result('flag-key', 'distinct_id_of_your_user')
687
+ if flag_result and flag_result.get_value() == 'variant-key':
688
+ # Do something differently for this user
689
+ # Optional: fetch the payload
690
+ matched_flag_payload = flag_result.payload
691
+ ```
692
+
693
+ ---
694
+
695
+ #### join()
696
+
697
+ **Release Tag:** public
698
+
699
+ End the consumer thread once the queue is empty. Do not use directly, call `shutdown()` instead.
700
+
701
+ ### Returns
702
+
703
+ - `any`
704
+
705
+ ### Examples
706
+
707
+ ```python
708
+ posthog.join()
709
+ ```
710
+
711
+ ---
712
+
713
+ #### shutdown()
714
+
715
+ **Release Tag:** public
716
+
717
+ Flush all messages and cleanly shutdown the client. Call this before the process ends in serverless environments to avoid data loss.
718
+
719
+ ### Returns
720
+
721
+ - `any`
722
+
723
+ ### Examples
724
+
725
+ ```python
726
+ posthog.shutdown()
727
+ ```
728
+
729
+ ---
730
+
731
+ ### Contexts methods
732
+
733
+ #### get_tags()
734
+
735
+ **Release Tag:** public
736
+
737
+ Get all tags from the current context. Returns: Dict of all tags in the current context.
738
+
739
+ ### Returns
740
+
741
+ - `dict[str, Any]`
742
+
743
+ ---
744
+
745
+ #### identify_context()
746
+
747
+ **Release Tag:** public
748
+
749
+ Identify the current context with a distinct ID.
750
+
751
+ ### Parameters
752
+
753
+ - **`distinct_id?`** (`str`) - The distinct ID to associate with the current context and its children.
754
+
755
+ ### Returns
756
+
757
+ - `any`
758
+
759
+ ---
760
+
761
+ #### new_context()
762
+
763
+ **Release Tag:** public
764
+
765
+ Create a new context for managing shared state. Learn more about [contexts](/docs/libraries/python#contexts).
766
+
767
+ ### Parameters
768
+
769
+ - **`fresh`** (`bool`) - Whether to create a fresh context that doesn't inherit from parent.
770
+ - **`capture_exceptions?`** (`bool`) - Whether to automatically capture exceptions in this context. If omitted, defaults to this client's exception autocapture setting.
771
+
772
+ ### Returns
773
+
774
+ - `None`
775
+
776
+ ### Examples
777
+
778
+ ```python
779
+ with client.new_context():
780
+ client.identify_context('<distinct_id>')
781
+ client.capture('event_name')
782
+ ```
783
+
784
+ ---
785
+
786
+ #### scoped()
787
+
788
+ **Release Tag:** public
789
+
790
+ Decorator that creates a new context for the wrapped function using this client.
791
+
792
+ ### Parameters
793
+
794
+ - **`fresh`** (`bool`) - Whether to create a fresh context that doesn't inherit from parent.
795
+ - **`capture_exceptions?`** (`bool`) - Whether to automatically capture exceptions in this context. If omitted, defaults to this client's exception autocapture setting.
796
+
797
+ ### Returns
798
+
799
+ - `None`
800
+
801
+ ---
802
+
803
+ #### set_context_device_id()
804
+
805
+ **Release Tag:** public
806
+
807
+ Set the device ID for the current context.
808
+
809
+ ### Parameters
810
+
811
+ - **`device_id?`** (`str`) - The device ID to associate with the current context and its children.
812
+
813
+ ### Returns
814
+
815
+ - `any`
816
+
817
+ ---
818
+
819
+ #### set_context_session()
820
+
821
+ **Release Tag:** public
822
+
823
+ Set the session ID for the current context.
824
+
825
+ ### Parameters
826
+
827
+ - **`session_id?`** (`str`) - The session ID to associate with the current context and its children.
828
+
829
+ ### Returns
830
+
831
+ - `any`
832
+
833
+ ---
834
+
835
+ #### tag()
836
+
837
+ **Release Tag:** public
838
+
839
+ Add a tag to the current context.
840
+
841
+ ### Parameters
842
+
843
+ - **`name?`** (`str`) - The tag key.
844
+ - **`value?`** (`Any`) - The tag value.
845
+
846
+ ### Returns
847
+
848
+ - `any`
849
+
850
+ ---
851
+
852
+ ## PostHog Module Functions
853
+
854
+ Global functions available in the PostHog module
855
+
856
+ ### Identification methods
857
+
858
+ #### alias()
859
+
860
+ **Release Tag:** public
861
+
862
+ Associate user behaviour before and after they e.g. register, login, or perform some other identifying action.
863
+
864
+ **Notes:**
865
+
866
+ To marry up whatever a user does before they sign up or log in with what they do after you need to make an alias call. This will allow you to answer questions like "Which marketing channels leads to users churning after a month?" or "What do users do on our website before signing up?". Particularly useful for associating user behaviour before and after they e.g. register, login, or perform some other identifying action.
867
+
868
+ ### Parameters
869
+
870
+ - **`previous_id?`** (`str`) - The unique ID of the user before
871
+ - **`distinct_id?`** (`str`) - The current unique id
872
+ - **`timestamp?`** (`datetime`) - Optional timestamp for the event
873
+ - **`uuid?`** (`str`) - Optional UUID for the event
874
+ - **`disable_geoip?`** (`bool`) - Whether to disable GeoIP lookup
875
+
876
+ ### Returns
877
+
878
+ - `Optional[str]`
879
+
880
+ ### Examples
881
+
882
+ ```python
883
+ # Alias user
884
+ from posthog import alias
885
+ alias(previous_id='distinct_id', distinct_id='alias_id')
886
+ ```
887
+
888
+ ---
889
+
890
+ #### group_identify()
891
+
892
+ **Release Tag:** public
893
+
894
+ Set properties on a group.
895
+
896
+ ### Parameters
897
+
898
+ - **`group_type?`** (`str`) - Type of your group
899
+ - **`group_key?`** (`str`) - Unique identifier of the group
900
+ - **`properties?`** (`dict[str, Any]`) - Properties to set on the group
901
+ - **`timestamp?`** (`datetime`) - Optional timestamp for the event
902
+ - **`uuid?`** (`str`) - Optional UUID for the event
903
+ - **`disable_geoip?`** (`bool`) - Whether to disable GeoIP lookup
904
+ - **`distinct_id`** (`Number`) - Optional distinct ID of the user performing the action
905
+
906
+ ### Returns
907
+
908
+ - `Optional[str]`
909
+
910
+ ### Examples
911
+
912
+ ```python
913
+ # Group identify
914
+ from posthog import group_identify
915
+ group_identify('company', 'company_id_in_your_db', {
916
+ 'name': 'Awesome Inc.',
917
+ 'employees': 11
918
+ })
919
+ ```
920
+
921
+ ---
922
+
923
+ #### identify_context()
924
+
925
+ **Release Tag:** public
926
+
927
+ Identify the current context with a distinct ID.
928
+
929
+ ### Parameters
930
+
931
+ - **`distinct_id?`** (`str`) - The distinct ID to associate with the current context and its children
932
+
933
+ ### Returns
934
+
935
+ - `None`
936
+
937
+ ### Examples
938
+
939
+ ```python
940
+ from posthog import identify_context
941
+ identify_context("user_123")
942
+ ```
943
+
944
+ ---
945
+
946
+ #### set()
947
+
948
+ **Release Tag:** public
949
+
950
+ Set properties on a user record.
951
+
952
+ **Notes:**
953
+
954
+ This will overwrite previous people property values. Generally operates similar to `capture`, with distinct_id being an optional argument, defaulting to the current context's distinct ID. If there is no context-level distinct ID, and no override distinct_id is passed, this function will do nothing. Context tags are folded into $set properties, so tagging the current context and then calling `set` will cause those tags to be set on the user (unlike capture, which causes them to just be set on the event).
955
+
956
+ ### Parameters
957
+
958
+ - **`kwargs?`** (`Unpack[OptionalSetArgs]`)
959
+
960
+ ### Returns
961
+
962
+ - `Optional[str]`
963
+
964
+ ### Examples
965
+
966
+ ```python
967
+ # Set person properties
968
+ from posthog import set
969
+ set(distinct_id='distinct_id', properties={'name': 'Max Hedgehog'})
970
+ ```
971
+
972
+ ---
973
+
974
+ #### set_once()
975
+
976
+ **Release Tag:** public
977
+
978
+ Set properties on a user record, only if they do not yet exist.
979
+
980
+ **Notes:**
981
+
982
+ This will not overwrite previous people property values, unlike `set`. Otherwise, operates in an identical manner to `set`.
983
+
984
+ ### Parameters
985
+
986
+ - **`kwargs?`** (`Unpack[OptionalSetArgs]`)
987
+
988
+ ### Returns
989
+
990
+ - `Optional[str]`
991
+
992
+ ### Examples
993
+
994
+ ```python
995
+ # Set property once
996
+ from posthog import set_once
997
+ set_once(distinct_id='distinct_id', properties={'initial_url': '/blog'})
998
+ ```
999
+
1000
+ ---
1001
+
1002
+ ### Events methods
1003
+
1004
+ #### capture()
1005
+
1006
+ **Release Tag:** public
1007
+
1008
+ Capture anything a user does within your system.
1009
+
1010
+ **Notes:**
1011
+
1012
+ Capture allows you to capture anything a user does within your system, which you can later use in PostHog to find patterns in usage, work out which features to improve or where people are giving up. A capture call requires an event name to specify the event. We recommend using [verb] [noun], like `movie played` or `movie updated` to easily identify what your events mean later on. Capture takes a number of optional arguments, which are defined by the `OptionalCaptureArgs` type.
1013
+
1014
+ ### Parameters
1015
+
1016
+ - **`event?`** (`str`) - The event name to specify the event **kwargs: Optional arguments including:
1017
+ - **`kwargs?`** (`Unpack[OptionalCaptureArgs]`)
1018
+
1019
+ ### Returns
1020
+
1021
+ - `Optional[str]`
1022
+
1023
+ ### Examples
1024
+
1025
+ #### Context and capture usage
1026
+
1027
+ ```python
1028
+ # Context and capture usage
1029
+ from posthog import new_context, identify_context, tag_context, capture
1030
+ # Enter a new context (e.g. a request/response cycle, an instance of a background job, etc)
1031
+ with new_context():
1032
+ # Associate this context with some user, by distinct_id
1033
+ identify_context('some user')
1034
+
1035
+ # Capture an event, associated with the context-level distinct ID ('some user')
1036
+ capture('movie started')
1037
+
1038
+ # Capture an event associated with some other user (overriding the context-level distinct ID)
1039
+ capture('movie joined', distinct_id='some-other-user')
1040
+
1041
+ # Capture an event with some properties
1042
+ capture('movie played', properties={'movie_id': '123', 'category': 'romcom'})
1043
+
1044
+ # Capture an event with some properties
1045
+ capture('purchase', properties={'product_id': '123', 'category': 'romcom'})
1046
+ # Capture an event with some associated group
1047
+ capture('purchase', groups={'company': 'id:5'})
1048
+
1049
+ # Adding a tag to the current context will cause it to appear on all subsequent events
1050
+ tag_context('some-tag', 'some-value')
1051
+
1052
+ capture('another-event') # Will be captured with `'some-tag': 'some-value'` in the properties dict
1053
+ ```
1054
+
1055
+ #### Set event properties
1056
+
1057
+ ```python
1058
+ # Set event properties
1059
+ from posthog import capture
1060
+ capture(
1061
+ "user_signed_up",
1062
+ distinct_id="distinct_id_of_the_user",
1063
+ properties={
1064
+ "login_type": "email",
1065
+ "is_free_trial": "true"
1066
+ }
1067
+ )
1068
+ ```
1069
+
1070
+ ---
1071
+
1072
+ #### capture_exception()
1073
+
1074
+ **Release Tag:** public
1075
+
1076
+ Capture exceptions that happen in your code.
1077
+
1078
+ **Notes:**
1079
+
1080
+ Capture exception is idempotent - if it is called twice with the same exception instance, only a occurrence will be tracked in posthog. This is because, generally, contexts will cause exceptions to be captured automatically. However, to ensure you track an exception, if you catch and do not re-raise it, capturing it manually is recommended, unless you are certain it will have crossed a context boundary (e.g. by existing a `with posthog.new_context():` block already). If the passed exception was raised and caught, the captured stack trace will consist of every frame between where the exception was raised and the point at which it is captured (the "traceback"). If the passed exception was never raised, e.g. if you call `posthog.capture_exception(ValueError("Some Error"))`, the stack trace captured will be the full stack trace at the moment the exception was captured. Note that heavy use of contexts will lead to truncated stack traces, as the exception will be captured by the context entered most recently, which may not be the point you catch the exception for the final time in your code. It's recommended to use contexts sparingly, for this reason. `capture_exception` takes the same set of optional arguments as `capture`.
1081
+
1082
+ ### Parameters
1083
+
1084
+ - **`exception`** (`BaseException`) - The exception to capture. If not provided, the current exception is captured via `sys.exc_info()` **kwargs: Optional capture arguments including distinct_id, properties, timestamp, uuid, groups, flags, send_feature_flags, and disable_geoip.
1085
+ - **`kwargs?`** (`Unpack[OptionalCaptureArgs]`)
1086
+
1087
+ ### Returns
1088
+
1089
+ - `Optional[str]`
1090
+
1091
+ ### Examples
1092
+
1093
+ ```python
1094
+ # Capture exception
1095
+ from posthog import capture_exception
1096
+ try:
1097
+ risky_operation()
1098
+ except Exception as e:
1099
+ capture_exception(e)
1100
+ ```
1101
+
1102
+ ---
1103
+
1104
+ ### Feature flags methods
1105
+
1106
+ #### evaluate_flags()
1107
+
1108
+ **Release Tag:** public
1109
+
1110
+ Evaluate all feature flags for a user in a single call and return a :class:`FeatureFlagEvaluations` snapshot. Branch on ``.is_enabled()`` / ``.get_flag()`` and pass the same snapshot to ``capture()`` via the ``flags`` option so events carry the exact flag values the code branched on. Prefer this over repeated ``get_feature_flag()`` calls and over ``capture(send_feature_flags=True)`` — it consolidates flag evaluation into a single ``/flags`` request per incoming request.
1111
+
1112
+ ### Parameters
1113
+
1114
+ - **`distinct_id`** (`Number`) - The user's distinct ID. If ``None``, falls back to the context distinct_id. If still unresolvable, returns an empty snapshot.
1115
+ - **`groups?`** (`Mapping[str, Union[str, int]]`) - Mapping of group type to group key.
1116
+ - **`person_properties?`** (`dict[str, Any]`) - Person properties to use for evaluation.
1117
+ - **`group_properties?`** (`dict[str, dict[str, Any]]`) - Group properties keyed by group type.
1118
+ - **`only_evaluate_locally`** (`bool`) - If ``True``, never fall back to remote evaluation.
1119
+ - **`disable_geoip?`** (`bool`) - Whether to disable GeoIP lookup.
1120
+ - **`flag_keys?`** (`list[str]`) - Optional list of flag keys. When provided, only these flags are evaluated — the underlying ``/flags`` request asks the server for just this subset, which makes the response smaller and the request cheaper. Use this when you only need a handful of flags out of many.
1121
+ - **`device_id?`** (`str`) - Optional device ID override. If not provided, falls back to the context device_id (which may be set via tracing headers). Used by experience-continuity flags to match users across distinct_id changes.
1122
+
1123
+ ### Returns
1124
+
1125
+ - `FeatureFlagEvaluations`
1126
+
1127
+ ### Examples
1128
+
1129
+ ```python
1130
+ from posthog import evaluate_flags, capture
1131
+ flags = evaluate_flags("user_123", person_properties={"plan": "enterprise"})
1132
+ if flags.is_enabled("new-dashboard"):
1133
+ render_new_dashboard()
1134
+ capture("page_viewed", distinct_id="user_123", flags=flags)
1135
+ ```
1136
+
1137
+ ---
1138
+
1139
+ #### feature_enabled()
1140
+
1141
+ **Release Tag:** public
1142
+
1143
+ Use feature flags to enable or disable features for users.
1144
+
1145
+ **Notes:**
1146
+
1147
+ You can call `posthog.load_feature_flags()` before to make sure you're not doing unexpected requests.
1148
+
1149
+ ### Parameters
1150
+
1151
+ - **`key?`** (`str`) - The feature flag key
1152
+ - **`distinct_id?`** (`Number`) - The user's distinct ID
1153
+ - **`groups?`** (`Mapping[str, Union[str, int]]`) - Groups mapping
1154
+ - **`person_properties?`** (`dict[str, Any]`) - Person properties
1155
+ - **`group_properties?`** (`dict[str, dict[str, Any]]`) - Group properties
1156
+ - **`only_evaluate_locally`** (`bool`) - Whether to evaluate only locally
1157
+ - **`send_feature_flag_events`** (`bool`) - Whether to send feature flag events
1158
+ - **`disable_geoip?`** (`bool`) - Whether to disable GeoIP lookup
1159
+ - **`device_id?`** (`str`) - Optional device ID override for experience-continuity flags
1160
+
1161
+ ### Returns
1162
+
1163
+ - `Optional[bool]`
1164
+
1165
+ ### Examples
1166
+
1167
+ ```python
1168
+ # Boolean feature flag
1169
+ from posthog import feature_enabled, get_feature_flag_payload
1170
+ is_my_flag_enabled = feature_enabled('flag-key', 'distinct_id_of_your_user')
1171
+ if is_my_flag_enabled:
1172
+ matched_flag_payload = get_feature_flag_payload('flag-key', 'distinct_id_of_your_user')
1173
+ ```
1174
+
1175
+ ---
1176
+
1177
+ #### feature_flag_definitions()
1178
+
1179
+ **Release Tag:** public
1180
+
1181
+ Returns loaded feature flags.
1182
+
1183
+ **Notes:**
1184
+
1185
+ Returns loaded feature flags, if any. Helpful for debugging what flag information you have loaded.
1186
+
1187
+ ### Returns
1188
+
1189
+ - `None`
1190
+
1191
+ ### Examples
1192
+
1193
+ ```python
1194
+ from posthog import feature_flag_definitions
1195
+ definitions = feature_flag_definitions()
1196
+ ```
1197
+
1198
+ ---
1199
+
1200
+ #### get_all_flags()
1201
+
1202
+ **Release Tag:** public
1203
+
1204
+ Get all flags for a given user.
1205
+
1206
+ **Notes:**
1207
+
1208
+ Flags are key-value pairs where the key is the flag key and the value is the flag variant, or True, or False.
1209
+
1210
+ ### Parameters
1211
+
1212
+ - **`distinct_id?`** (`Number`) - The user's distinct ID
1213
+ - **`groups?`** (`Mapping[str, Union[str, int]]`) - Groups mapping
1214
+ - **`person_properties?`** (`dict[str, Any]`) - Person properties
1215
+ - **`group_properties?`** (`dict[str, dict[str, Any]]`) - Group properties
1216
+ - **`only_evaluate_locally`** (`bool`) - Whether to evaluate only locally
1217
+ - **`disable_geoip?`** (`bool`) - Whether to disable GeoIP lookup
1218
+ - **`device_id?`** (`str`) - Optional device ID override for experience-continuity flags
1219
+ - **`flag_keys_to_evaluate?`** (`list[str]`) - Optional list of flag keys to evaluate (evaluates all if None)
1220
+
1221
+ ### Returns
1222
+
1223
+ - `Optional[dict[str, Union[bool, str]]]`
1224
+
1225
+ ### Examples
1226
+
1227
+ ```python
1228
+ # All flags for user
1229
+ from posthog import get_all_flags
1230
+ get_all_flags('distinct_id_of_your_user')
1231
+ ```
1232
+
1233
+ ---
1234
+
1235
+ #### get_all_flags_and_payloads()
1236
+
1237
+ **Release Tag:** public
1238
+
1239
+ Get all feature flag values and payloads for a user.
1240
+
1241
+ ### Parameters
1242
+
1243
+ - **`distinct_id?`** (`Number`) - The user's distinct ID.
1244
+ - **`groups?`** (`Mapping[str, Union[str, int]]`) - Mapping of group type to group key.
1245
+ - **`person_properties?`** (`dict[str, Any]`) - Person properties to use for evaluation.
1246
+ - **`group_properties?`** (`dict[str, dict[str, Any]]`) - Group properties keyed by group type.
1247
+ - **`only_evaluate_locally`** (`bool`) - Whether to evaluate only locally.
1248
+ - **`disable_geoip?`** (`bool`) - Whether to disable GeoIP lookup.
1249
+ - **`device_id?`** (`str`) - Optional device ID override for experience-continuity flags.
1250
+ - **`flag_keys_to_evaluate?`** (`list[str]`) - Optional list of flag keys to evaluate. Evaluates all flags when omitted.
1251
+
1252
+ ### Returns
1253
+
1254
+ - `FlagsAndPayloads`
1255
+
1256
+ ---
1257
+
1258
+ #### get_feature_flag()
1259
+
1260
+ **Release Tag:** public
1261
+
1262
+ Get feature flag variant for users. Used with experiments.
1263
+
1264
+ **Notes:**
1265
+
1266
+ `groups` are a mapping from group type to group key. So, if you have a group type of "organization" and a group key of "5", you would pass groups={"organization": "5"}. `group_properties` take the format: { group_type_name: { group_properties } }. So, for example, if you have the group type "organization" and the group key "5", with the properties name, and employee count, you'll send these as: group_properties={"organization": {"name": "PostHog", "employees": 11}}.
1267
+
1268
+ ### Parameters
1269
+
1270
+ - **`key?`** (`str`) - The feature flag key
1271
+ - **`distinct_id?`** (`Number`) - The user's distinct ID
1272
+ - **`groups?`** (`Mapping[str, Union[str, int]]`) - Groups mapping from group type to group key
1273
+ - **`person_properties?`** (`dict[str, Any]`) - Person properties
1274
+ - **`group_properties?`** (`dict[str, dict[str, Any]]`) - Group properties in format { group_type_name: { group_properties } }
1275
+ - **`only_evaluate_locally`** (`bool`) - Whether to evaluate only locally
1276
+ - **`send_feature_flag_events`** (`bool`) - Whether to send feature flag events
1277
+ - **`disable_geoip?`** (`bool`) - Whether to disable GeoIP lookup
1278
+ - **`device_id?`** (`str`) - Optional device ID override for experience-continuity flags
1279
+
1280
+ ### Returns
1281
+
1282
+ - `Union[bool, str, any]`
1283
+
1284
+ ### Examples
1285
+
1286
+ ```python
1287
+ # Multivariate feature flag
1288
+ from posthog import get_feature_flag, get_feature_flag_payload
1289
+ enabled_variant = get_feature_flag('flag-key', 'distinct_id_of_your_user')
1290
+ if enabled_variant == 'variant-key':
1291
+ matched_flag_payload = get_feature_flag_payload('flag-key', 'distinct_id_of_your_user')
1292
+ ```
1293
+
1294
+ ---
1295
+
1296
+ #### get_feature_flag_payload()
1297
+
1298
+ **Release Tag:** public
1299
+
1300
+ Get the payload associated with a feature flag value. Deprecated for new code. Prefer ``evaluate_flags()`` and ``flags.get_flag_payload(key)`` so flag evaluation happens once per request.
1301
+
1302
+ ### Parameters
1303
+
1304
+ - **`key?`** (`str`) - The feature flag key.
1305
+ - **`distinct_id?`** (`Number`) - The user's distinct ID.
1306
+ - **`match_value`** (`bool`) - Optional flag value to use when selecting a payload.
1307
+ - **`groups?`** (`Mapping[str, Union[str, int]]`) - Mapping of group type to group key.
1308
+ - **`person_properties?`** (`dict[str, Any]`) - Person properties to use for evaluation.
1309
+ - **`group_properties?`** (`dict[str, dict[str, Any]]`) - Group properties keyed by group type.
1310
+ - **`only_evaluate_locally`** (`bool`) - Whether to evaluate only locally.
1311
+ - **`send_feature_flag_events`** (`bool`) - Whether to send a $feature_flag_called event.
1312
+ - **`disable_geoip?`** (`bool`) - Whether to disable GeoIP lookup.
1313
+ - **`device_id?`** (`str`) - Optional device ID override for experience-continuity flags.
1314
+
1315
+ ### Returns
1316
+
1317
+ - `Optional[object]`
1318
+
1319
+ ---
1320
+
1321
+ #### load_feature_flags()
1322
+
1323
+ **Release Tag:** public
1324
+
1325
+ Load feature flag definitions from PostHog.
1326
+
1327
+ ### Returns
1328
+
1329
+ - `None`
1330
+
1331
+ ### Examples
1332
+
1333
+ ```python
1334
+ from posthog import load_feature_flags
1335
+ load_feature_flags()
1336
+ ```
1337
+
1338
+ ---
1339
+
1340
+ ### Client management methods
1341
+
1342
+ #### flush()
1343
+
1344
+ **Release Tag:** public
1345
+
1346
+ Tell the client to flush all queued events.
1347
+
1348
+ ### Parameters
1349
+
1350
+ - **`timeout_seconds?`** (`float`) - Maximum seconds to wait for the queue to flush. Defaults to 10 seconds. Pass ``None`` to wait indefinitely.
1351
+
1352
+ ### Returns
1353
+
1354
+ - `any`
1355
+
1356
+ ### Examples
1357
+
1358
+ ```python
1359
+ from posthog import flush
1360
+ flush()
1361
+ ```
1362
+
1363
+ ---
1364
+
1365
+ #### join()
1366
+
1367
+ **Release Tag:** public
1368
+
1369
+ Block program until the client clears the queue. Used during program shutdown. You should use `shutdown()` directly in most cases.
1370
+
1371
+ ### Returns
1372
+
1373
+ - `any`
1374
+
1375
+ ### Examples
1376
+
1377
+ ```python
1378
+ from posthog import join
1379
+ join()
1380
+ ```
1381
+
1382
+ ---
1383
+
1384
+ #### shutdown()
1385
+
1386
+ **Release Tag:** public
1387
+
1388
+ Flush all messages and cleanly shutdown the client.
1389
+
1390
+ ### Returns
1391
+
1392
+ - `any`
1393
+
1394
+ ### Examples
1395
+
1396
+ ```python
1397
+ from posthog import shutdown
1398
+ shutdown()
1399
+ ```
1400
+
1401
+ ---
1402
+
1403
+ ### Other methods
1404
+
1405
+ #### get_feature_flag_result()
1406
+
1407
+ **Release Tag:** public
1408
+
1409
+ Get a FeatureFlagResult object which contains the flag result and payload. This method evaluates a feature flag and returns a FeatureFlagResult object containing: - enabled: Whether the flag is enabled - variant: The variant value if the flag has variants - payload: The payload associated with the flag (automatically deserialized from JSON) - key: The flag key - reason: Why the flag was enabled/disabled
1410
+
1411
+ ### Parameters
1412
+
1413
+ - **`key?`** (`str`) - The feature flag key.
1414
+ - **`distinct_id?`** (`Number`) - The user's distinct ID.
1415
+ - **`groups?`** (`Mapping[str, Union[str, int]]`) - Mapping of group type to group key.
1416
+ - **`person_properties?`** (`dict[str, Any]`) - Person properties to use for evaluation.
1417
+ - **`group_properties?`** (`dict[str, dict[str, Any]]`) - Group properties keyed by group type.
1418
+ - **`only_evaluate_locally`** (`bool`) - Whether to evaluate only locally.
1419
+ - **`send_feature_flag_events`** (`bool`) - Whether to send a $feature_flag_called event.
1420
+ - **`disable_geoip?`** (`bool`) - Whether to disable GeoIP lookup.
1421
+ - **`device_id?`** (`str`) - Optional device ID override for experience-continuity flags.
1422
+
1423
+ ### Returns
1424
+
1425
+ - `Optional[FeatureFlagResult]`
1426
+
1427
+ ---
1428
+
1429
+ #### get_remote_config_payload()
1430
+
1431
+ **Release Tag:** public
1432
+
1433
+ Get the payload for a remote config feature flag.
1434
+
1435
+ ### Parameters
1436
+
1437
+ - **`key?`** (`str`) - The key of the feature flag
1438
+
1439
+ ### Returns
1440
+
1441
+ - `None`
1442
+
1443
+ ---
1444
+
1445
+ #### set_code_variables_mask_url_credentials_context()
1446
+
1447
+ **Release Tag:** public
1448
+
1449
+ Whether to scrub credentials embedded in URLs/DSNs (e.g. user:pass@host) from captured code variables for the current context.
1450
+
1451
+ ### Parameters
1452
+
1453
+ - **`enabled?`** (`bool`)
1454
+
1455
+ ### Returns
1456
+
1457
+ - `None`
1458
+
1459
+ ---
1460
+
1461
+ ### Contexts methods
1462
+
1463
+ #### get_tags()
1464
+
1465
+ **Release Tag:** public
1466
+
1467
+ Get all tags from the current context. Returns: Dict of all tags in the current context
1468
+
1469
+ ### Returns
1470
+
1471
+ - `dict[str, Any]`
1472
+
1473
+ ---
1474
+
1475
+ #### new_context()
1476
+
1477
+ **Release Tag:** public
1478
+
1479
+ Create a new context scope that will be active for the duration of the with block.
1480
+
1481
+ ### Parameters
1482
+
1483
+ - **`fresh`** (`bool`) - Whether to start with a fresh context (default: False)
1484
+ - **`capture_exceptions?`** (`bool`) - Whether to capture exceptions raised within the context. If omitted, defaults to the relevant client's exception autocapture setting.
1485
+ - **`client?`** (`Client`) - Optional Posthog client instance to use for this context (default: None)
1486
+
1487
+ ### Returns
1488
+
1489
+ - `None`
1490
+
1491
+ ### Examples
1492
+
1493
+ ```python
1494
+ from posthog import new_context, tag, capture
1495
+ with new_context():
1496
+ tag("request_id", "123")
1497
+ capture("event_name", properties={"property": "value"})
1498
+ ```
1499
+
1500
+ ---
1501
+
1502
+ #### scoped()
1503
+
1504
+ **Release Tag:** public
1505
+
1506
+ Decorator that creates a new context for the function.
1507
+
1508
+ ### Parameters
1509
+
1510
+ - **`fresh`** (`bool`) - Whether to start with a fresh context (default: False)
1511
+ - **`capture_exceptions?`** (`bool`) - Whether to capture and track exceptions with posthog error tracking. If omitted, defaults to the global exception autocapture setting.
1512
+
1513
+ ### Returns
1514
+
1515
+ - `None`
1516
+
1517
+ ### Examples
1518
+
1519
+ ```python
1520
+ from posthog import scoped, tag, capture
1521
+ @scoped()
1522
+ def process_payment(payment_id):
1523
+ tag("payment_id", payment_id)
1524
+ capture("payment_started")
1525
+ ```
1526
+
1527
+ ---
1528
+
1529
+ #### set_capture_exception_code_variables_context()
1530
+
1531
+ **Release Tag:** public
1532
+
1533
+ Override code-variable capture for exceptions in the current context.
1534
+
1535
+ ### Parameters
1536
+
1537
+ - **`enabled?`** (`bool`) - Whether exceptions captured in this context should include local variable values from stack frames.
1538
+
1539
+ ### Returns
1540
+
1541
+ - `None`
1542
+
1543
+ ---
1544
+
1545
+ #### set_code_variables_detect_secrets_context()
1546
+
1547
+ **Release Tag:** public
1548
+
1549
+ Whether to apply entropy-based secret detection as a last-resort redaction of high-entropy values (API keys, tokens, strong passwords) in captured code variables for the current context.
1550
+
1551
+ ### Parameters
1552
+
1553
+ - **`enabled?`** (`bool`)
1554
+
1555
+ ### Returns
1556
+
1557
+ - `None`
1558
+
1559
+ ---
1560
+
1561
+ #### set_code_variables_ignore_patterns_context()
1562
+
1563
+ **Release Tag:** public
1564
+
1565
+ Override code-variable ignore patterns for exceptions in the current context.
1566
+
1567
+ ### Parameters
1568
+
1569
+ - **`ignore_patterns?`** (`list[str]`) - Variable-name patterns that should be omitted entirely when code variables are captured.
1570
+
1571
+ ### Returns
1572
+
1573
+ - `None`
1574
+
1575
+ ---
1576
+
1577
+ #### set_code_variables_mask_patterns_context()
1578
+
1579
+ **Release Tag:** public
1580
+
1581
+ Override code-variable mask patterns for exceptions in the current context.
1582
+
1583
+ ### Parameters
1584
+
1585
+ - **`mask_patterns?`** (`list[str]`) - Variable-name patterns whose values should be replaced with ``***`` when code variables are captured.
1586
+
1587
+ ### Returns
1588
+
1589
+ - `None`
1590
+
1591
+ ---
1592
+
1593
+ #### set_context_device_id()
1594
+
1595
+ **Release Tag:** public
1596
+
1597
+ Set the device ID for the current context, associating all feature flag requests in this or child contexts with the given device ID.
1598
+
1599
+ ### Parameters
1600
+
1601
+ - **`device_id?`** (`str`) - The device ID to associate with the current context and its children
1602
+
1603
+ ### Returns
1604
+
1605
+ - `None`
1606
+
1607
+ ### Examples
1608
+
1609
+ ```python
1610
+ from posthog import set_context_device_id
1611
+ set_context_device_id("device_123")
1612
+ ```
1613
+
1614
+ ---
1615
+
1616
+ #### set_context_session()
1617
+
1618
+ **Release Tag:** public
1619
+
1620
+ Set the session ID for the current context.
1621
+
1622
+ ### Parameters
1623
+
1624
+ - **`session_id?`** (`str`) - The session ID to associate with the current context and its children
1625
+
1626
+ ### Returns
1627
+
1628
+ - `None`
1629
+
1630
+ ### Examples
1631
+
1632
+ ```python
1633
+ from posthog import set_context_session
1634
+ set_context_session("session_123")
1635
+ ```
1636
+
1637
+ ---
1638
+
1639
+ #### tag()
1640
+
1641
+ **Release Tag:** public
1642
+
1643
+ Add a tag to the current context.
1644
+
1645
+ ### Parameters
1646
+
1647
+ - **`name?`** (`str`) - The tag key
1648
+ - **`value?`** (`Any`) - The tag value
1649
+
1650
+ ### Returns
1651
+
1652
+ - `None`
1653
+
1654
+ ### Examples
1655
+
1656
+ ```python
1657
+ from posthog import tag
1658
+ tag("user_id", "123")
1659
+ ```
1660
+
1661
+ ---
1662
+
1663
+ ### Initialization methods
1664
+
1665
+ #### setup()
1666
+
1667
+ **Release Tag:** public
1668
+
1669
+ Create or return the global PostHog client configured by module settings. Most applications should either instantiate ``Posthog`` directly or set ``posthog.api_key``/other module settings before calling top-level helpers. ``setup()`` is called automatically by global APIs such as ``capture()``. Returns: The global ``Client`` instance. If ``api_key`` is missing or blank, the client is disabled and module-level calls become no-ops.
1670
+
1671
+ ### Returns
1672
+
1673
+ - `Client`
1674
+
1675
+ ---