PostHog CLI

Query PostHog analytics events and toggle feature flags via CLI.

223|35|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/ComposioHQ/awesome-agent-clis --skill posthog-cli-composiohq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: PostHog CLI
Source: https://github.com/ComposioHQ/awesome-agent-clis/tree/main/posthog-cli
Command: npx skills add https://github.com/ComposioHQ/awesome-agent-clis --skill posthog-cli-composiohq

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill enables quick access to product analytics data, feature flag management, and event querying through command-line operations.

Core Features & Use Cases

  • Analytics Data Retrieval: Query recent event data such as page views within specific timeframes.
  • Feature Flag Control: List and toggle feature flags to control feature rollout and experimentation.
  • Use Case: A developer wants to check recent user events or enable a feature flag directly from the terminal, saving time compared to navigating the dashboard.

Quick Start

Use the PostHog CLI to retrieve the number of page view events from the last week and toggle a specific feature flag.

Frequently Asked Questions about PostHog CLI

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query PostHog analytics data from the command line?

Query PostHog analytics data from the command line by executing specific CLI commands to retrieve recent event data, such as page views, within targeted timeframes. The Skill outputs results in JSON format for easy integration into automated workflows.

Can I toggle feature flags via CLI for product rollout?

Yes, you can toggle feature flags via CLI to control product rollout and experimentation. The Skill allows agents to list and switch flag states directly from the terminal, bypassing the need to navigate the PostHog dashboard.

What is the best way to manage product analytics workflows without a dashboard?

The best way to manage product analytics workflows without a dashboard is using CLI commands to instantly retrieve event data and configure feature flags. This approach provides secure API key authentication and JSON output formatting for quick terminal-based integration.

Does PostHog CLI require API key authentication to retrieve events?

Yes, PostHog CLI requires secure API key authentication to retrieve events and manage feature flags. This ensures that command-line interactions with product analytics data remain authorized and securely integrated into your workflows.

How do I get JSON output from PostHog event queries?

Get JSON output from PostHog event queries by running the CLI commands provided by this Skill. It automatically formats analytics data retrieval and feature flag configurations into JSON, ensuring easy integration with other scripts and tools.