posthog
PostHog plugin for OpenCode - comprehensive analytics, feature flags, and event tracking
Quick Install
npm install @openpets/posthog pnpm add @openpets/posthog Required Environment Variables
-
POSTHOG_HOSTPostHog instance URL (e.g., https://app.posthog.com or your self-hosted URL)
-
POSTHOG_API_KEYPostHog Personal API Key for authentication
Available Tools (5)
These tools are available when you install the posthog plugin in your AI assistant.
posthog-status
Check PostHog connection and configuration status
posthog-get-project-info
Get information about the current PostHog project
posthog-list-feature-flags
List all feature flags in the project
posthog-get-events
Get recent events from PostHog with optional limit and offset
posthog-get-persons
Get persons (users) from PostHog with optional limit and offset
Example Queries
check posthog status list feature flags get project info Usage Scenarios
basic info
- 1
check posthog status - 2
get project info - 3
list feature flags
Optional Configuration
| Variable | Description |
|---|---|
POSTHOG_PROJECT_API_KEY | PostHog Project API Key for capturing events (required for event capture) |
Use posthog with Your AI Assistant
This open source plugin works with OpenCode-compatible AI assistants including ChatGPT, Claude, Perplexity, and other LLM-powered coding tools. Install the plugin and start using natural language to interact with posthog.
Related Plugins
llm-models
LLM model discovery and comparison plugin - search and compare models from models.dev across multiple providers
gitlab
GitLab integration plugin for OpenCode - manage projects, issues, merge requests, and more
trader
Alpaca Trading API plugin for OpenCode - stock trading, portfolio management, and market data