AI wizard
Contents
The PostHog wizard automatically installs and instruments PostHog into your application codebase using AI. It's an agentic CLI tool that handles the entire PostHog integration process on your behalf.
Set up the PostHog platform in minutes, with a single command.
When it's done, your project is onboarded with:
- Product Analytics
- Web Analytics
- Session Replay
- Error Tracking
- Feature FlagsComing soon
- ExperimentsComing soon
- LLM AnalyticsComing soon
- LogsComing soon
How it works
Running the wizard automatically:
- Authenticates your PostHog account
- Installs the relevant PostHog SDKs
- Scans your codebase and app architecture
- Creates custom events based on real product flows
- Configures
.envfile with your project credentials - Writes code and instruments the PostHog SDKs client-side and server-side
- Generates insights and dashboards in the PostHog app
- Optionally installs the PostHog MCP server for your AI agent
AI wizard installation
Install PostHog in minutes with our wizard by running this command in your project directory:
Wait for it to finish and test the setup once the wizard is complete.
Frameworks and languages
The wizard supports the following frameworks and languages:
Android (Kotlin)
Angular
Astro
Django
FastAPI
Flask
Laravel
Next.js
Nuxt
Python
React Native
React
Ruby
Ruby on Rails
React Router
SvelteKit
Swift (iOS/macOS)
TanStack StartVue
ElixirComing soon
FlutterComing soon
GoComing soon
JavaComing soon
RustComing soon
We've got more on the way.
Check out the wizard's GitHub repo for more details.
We recommend setting up a reverse proxy, so that events are less likely to be intercepted by tracking blockers. We have our own managed reverse proxy service, which is free for all PostHog Cloud users, routes through our infrastructure, and makes setting up your proxy easy. If you don't want to use our managed service then there are several other options for creating a reverse proxy, including using Cloudflare, AWS Cloudfront, and Vercel.Set up a reverse proxy (recommended)
If you have multiple customer-facing products (e.g. a marketing website + mobile app + web app), it's best to install PostHog on them all and group them in one project. This makes it possible to track users across their entire journey (e.g. from visiting your marketing website to signing up for your product), or how they use your product across multiple platforms.Grouping products in one project (recommended)
For certain features like heatmaps, your Web Application Firewall (WAF) may be blocking PostHog’s requests to your site. Add these IP addresses to your WAF allowlist or rules to let PostHog access your site. EU: US: These are public, stable IPs used by PostHog services (e.g., Celery tasks for snapshots).Add IPs to Firewall/WAF allowlists (recommended)
3.75.65.221, 18.197.246.42, 3.120.223.25344.205.89.55, 52.4.194.122, 44.208.188.173
We think flows like the AI wizard are pretty cool and the future of developer experience. The AI wizard is our recommended and default method for installing PostHog and getting started.
If you have any feedback or requests, we would love to hear from you. Feel free to comment on this page or open an issue on GitHub.