Skip to main content
Connect your PostHog account and access analytics events, feature flags, insights, and cohorts as local files.

Prerequisites

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

  1. Go to app.airstore.ai
  2. Navigate to Settings → Integrations
  3. Click PostHog → Connect
  4. 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
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.