(Make AI do it for you – with one swift terminal command.)Don't add PostHog to your codebase.

TL;DR:
PostHog Wizard is an agentic CLI tool that installs and configures PostHog for you – the way an expert would.
The wizard starts by analyzing your codebase, then it automagically sets up the right tools, custom events, and dashboards for your product.
It's free, open source, and doesn't enable any paid features. It works with a growing list of PostHog products.
How it works
Supported products
The wizard uses agent skills built from carefully curated context. These skills include up-to-date developer docs, example code, and best practices on how to instrument PostHog.
.claude/
└── skills/
└── posthog-nextjs/
├── references/
└── SKILL.mdSupported frameworks
Full stack
Why PostHog Wizard?
The better your PostHog instrumentation, the more helpful PostHog can be. You can use your AI coding agent to ask questions about product usage, which uses the PostHog MCP server to answer them.
Example questions:
- "How many unique users signed up in the last 7 days, broken down by day?"
- "Create an A/B test for our pricing page that measures conversion to checkout."
- "What are the top 5 errors in my project this week?"
Here's
Matt Brooker
Matt Brooker explaining the PostHog MCP server.
Open source
Like almost everything we make, PostHog Wizard is open source. Want to fork it and adapt it for your projects, or add support for your preferred frameworks or AI workflows? Go ahead.
Get started
PostHog Wizard takes around 8 minutes to run. So copy the command below, fire up your terminal, hit enter, and make your way to our YouTube where you can watch approximately 1.76 PostHog Demos, 1.9 PostHog AI tutorials, or 2.7 changelog videos.
FAQ
How many events does PostHog Wizard instrument? Are you going to track 1 billion events and cost me tons of money?!
PostHog Wizard is instructed to focus on finding valuable funnel events in your codebase – between 10-15 events and files, so it's unlikely to rack up a bill.
That said, we plan on introducing a cost cutting skill, intended for existing PostHog customers who want to reduce the volume of existing events logged to PostHog to help reduce cost.
Why does PostHog Wizard only configure 10-15 events?
The goal of PostHog Wizard is to provide tangible examples of how to instrument PostHog in your codebase. It includes a targeted agent skill that's intended to set a good example for your AI agents so they can extend your PostHog implementation with new features you introduce in the future.
Does PostHog Wizard run on its own after the initial run?
No, the agent skill should assist your existing AI agents in instrumenting future features. However, you can choose to run it yourself at any time!
Do I need to also install the PostHog MCP?
Nope! Our MCP gets added when you run the wizard. If you don't want to run PostHog Wizard and only want the MCP server, run this:
npx @posthog/wizard mcp add
