diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json new file mode 100644 index 0000000..75284ca --- /dev/null +++ b/.claude-plugin/marketplace.json @@ -0,0 +1,37 @@ +{ + "name": "posthog", + "owner": { + "name": "PostHog", + "email": "hey@posthog.com", + "url": "https://posthog.com" + }, + "description": "Official PostHog plugin for AI clients. Access PostHog products directly from your AI coding tool.", + "plugins": [ + { + "name": "posthog", + "displayName": "PostHog", + "source": "./", + "description": "Access PostHog analytics, feature flags, experiments, error tracking, and insights directly from your AI coding tool. Optionally capture Claude Code sessions to PostHog LLM Analytics.", + "version": "1.1.57", + "author": { + "name": "PostHog", + "email": "hey@posthog.com", + "url": "https://posthog.com" + }, + "homepage": "https://posthog.com/docs/model-context-protocol", + "repository": "https://github.com/PostHog/ai-plugin", + "license": "MIT", + "category": "productivity", + "keywords": [ + "analytics", + "feature-flags", + "experiments", + "error-tracking", + "a/b-testing", + "surveys", + "dashboards", + "llm-analytics" + ] + } + ] +} diff --git a/.github/workflows/sync-skills.yml b/.github/workflows/sync-skills.yml index 03f0292..0a5b233 100644 --- a/.github/workflows/sync-skills.yml +++ b/.github/workflows/sync-skills.yml @@ -106,6 +106,13 @@ jobs: fi done + # Keep marketplace.json in sync with plugin.json + m=.claude-plugin/marketplace.json + if [ -f "$m" ]; then + jq --arg v "$(jq -r .version .claude-plugin/plugin.json)" \ + '.plugins[0].version = $v' "$m" > "$m.tmp" && mv "$m.tmp" "$m" + fi + # Regenerate Gemini TOML command files from MD sources if [ -x scripts/generate-gemini-commands.sh ]; then bash scripts/generate-gemini-commands.sh diff --git a/README.md b/README.md index 4835fac..ccb298e 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,12 @@ Official PostHog plugin for AI clients. Access PostHog products directly from yo claude plugin install posthog ``` + Or install from this repo as a marketplace: + ```bash + claude plugin marketplace add PostHog/ai-plugin + claude plugin install posthog@posthog + ``` + 2. Authenticate via OAuth: ```bash # Just enter Claude Code anywhere @@ -70,6 +76,14 @@ gemini extensions install https://github.com/PostHog/ai-plugin On first use of a PostHog tool, Grok prompts you to authorize in your browser. Log into PostHog to connect. +### Claude Cowork + +1. Add the marketplace: open **Settings** > **Plugins**, click **Add** > **Add marketplace**, enter `PostHog/ai-plugin`, and click **Sync**. + +2. Install the plugin: click **Browse**, select **PostHog**, and install. The plugin stays in sync with this repo automatically. + +3. Authenticate via OAuth: on first use of a PostHog tool, follow the browser prompts to log into PostHog. + ## How to develop 1. Clone and install the plugin: