Prerequisites
- An Airstore account with the CLI installed (installation guide)
- A PostHog account with data you want to access
- A PostHog personal API key
Get your PostHog API key
1
Open PostHog settings
Log in to PostHog and click your profile icon in the top right corner, then select Settings.
2
Create a personal API key
Navigate to Personal API Keys and click Create personal API key. Give it a descriptive name (e.g., “Airstore integration”).
3
Copy the key
Copy the generated key. It starts with
phx_.Connect PostHog
- Dashboard
- CLI
- Go to app.airstore.ai
- Navigate to Settings → Integrations
- Click PostHog → Connect
- Enter your API key and optionally a custom host URL
Available data
Once connected, you can access the following PostHog resources:Filesystem structure
After mounting, PostHog data appears under~/airstore/posthog/:
Source view queries
Create source views with natural language to query your PostHog data:
Airstore uses keyword-based routing to determine which PostHog resource to query. For example:
- Words like “flag” or “toggle” route to feature flags
- Words like “funnel” or “retention” route to insights
- Words like “cohort” or “segment” route to cohorts
- Event-related queries route to events by default
Using a self-hosted PostHog instance?
Using a self-hosted PostHog instance?
If you’re running PostHog on your own infrastructure, provide your custom host URL when connecting. Airstore will use this URL instead of the default PostHog Cloud endpoint.Via the dashboard, enter your host URL in the connection form. Via the CLI, use the
--host flag:Next steps
Source Views
Learn more about creating and managing source views.
CLI Reference
Full command reference including connection management.