tool-posthog-cli

Automate PostHog CLI authentication, data querying, and endpoint management.

1|Updated Sep 12, 2025
One-click install
npx skills add https://github.com/JimmyTranDev/dotfiles --skill tool-posthog-cli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tool-posthog-cli
Source: https://github.com/JimmyTranDev/dotfiles/tree/main/src/opencode/skills/tool-posthog-cli
Command: npx skills add https://github.com/JimmyTranDev/dotfiles --skill tool-posthog-cli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PostHog CLI is the command-line interface for authenticating to PostHog, querying data, uploading sourcemaps, and managing experimental endpoints, simplifying operational workflows for analytics teams.

Core Features & Use Cases

  • Interactive authentication with posthog-cli login and host switching via --host
  • Execute SQL-like queries against PostHog events with posthog-cli query
  • Upload sourcemaps and manage experimental endpoints via exp commands
  • CI/CD friendly workflows using environment variables for API keys and host

Quick Start

Authenticate with PostHog using posthog-cli login, then run a sample query with posthog-cli query 'SELECT count() FROM events'.

Frequently Asked Questions about tool-posthog-cli

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

FAQPage Schema
How do I automate PostHog CLI authentication for CI/CD workflows?

Automate PostHog CLI authentication in CI/CD by configuring environment variables for API keys and host targeting. This enables non-interactive login and operational automation for analytics workflows across multiple instances.

Can I manage multiple PostHog instances using the command line?

Manage multiple PostHog instances by using interactive login with host switching via the --host flag. This targets specific environments, streamlining endpoint management and data queries across different deployments.

How do I upload sourcemaps to PostHog through a CLI?

Upload sourcemaps to PostHog using the sourcemap command within the CLI. This streamlines operational workflows for analytics teams by automating source map uploads directly from the terminal.

What are experimental endpoints in PostHog and how do I manage them?

Experimental endpoints in PostHog are managed via the exp commands within the CLI. These commands allow developers to deploy and manage experimental endpoints, simplifying operational analytics workflows.

Does PostHog CLI require any external dependencies to run queries?

PostHog CLI operates without external dependencies, requiring only environment variables for CI/CD configuration. It natively supports interactive login, SQL-like event queries, and sourcemap uploads.