Vibeleaderboard
Index / tool
Visit github.com
Category
Developer Tools
Rank
Pricing
Open Source
Type
TOOL
Builder
PostHog
GitHub
7 stars
Latest release
v0.8.2
Date

About

PostHog for VS Code brings feature flags, analytics, and product insights directly into your editor.

What it does

It connects authenticated PostHog projects to code references inside VS Code. Developers can inspect flag states, experiment results, event activity, and session counts beside relevant code, then manage flags or watch replays from editor panels.

Why it's ranked here

The extension connects operational product data to the exact code that produces or consumes it. Tree-sitter scanning, autocomplete, diagnostics, navigation, and stale-flag refactoring make it more than a dashboard shortcut. Its value is strongest for teams already committed to PostHog.

What's good

Code intelligence covers flag keys, variants, event names, event properties, initialization settings, and likely event-name typos. Stale-flag scans classify obsolete references and can retain the correct branch during cleanup. Shared project configuration and multi-folder support help teams keep editor behavior consistent.

Tradeoffs

It requires PostHog authentication and project selection, while its registered MCP server uses a separate OAuth flow. Several actions can change flags or experiments, although permission checks can switch users to read-only behavior. Code detection depends on supported tree-sitter grammars and recognizable client or function patterns.

How to use it well

Use it when feature flags, experiments, and event instrumentation are routine parts of development. Commit shared project settings, configure custom client names, and scan periodically for stale branches. Treat it as an editor companion for PostHog workflows, not a replacement for general observability or analytics platforms.

Technical notes+

package.json defines a TypeScript VS Code extension targeting VS Code ^1.93.0, bundled with webpack and published through VS Code and Open VSX tooling. src/extension.ts wires authentication, caches, tree-sitter-backed providers, webviews, diagnostics, CodeLens, code actions, and optional MCP registration through feature detection. src/services/postHogService.ts calls PostHog REST and HogQL endpoints with bearer tokens and retries once after a 401. src/services/configService.ts reads per-folder .posthog.json settings. src/services/codegenService.ts infers TypeScript payload types, limits nested inline inference to three levels, and emits declaration text. src/views/getWebviewHtml.ts assembles the sidebar with a generated nonce and the webview CSP source.

Observed

License
MIT
Primary language
TypeScript
Install surface
VS Code Marketplace and Open VSX Marketplace extension
Editor compatibility
VS Code ^1.93.0 and VS Code-based editors
Interfaces
VS Code extension UI, Command Palette commands, PostHog REST and HogQL API access, and MCP server registration
Packaging
pnpm project bundled with webpack and packaged as a VSIX
Core dependencies
posthog-node and web-tree-sitter

Read from README.md, package.json, src/constants.ts, src/extension.ts, src/utils/hogql.ts, src/models/types.ts, src/utils/formatting.ts, src/utils/codeCleanup.ts, src/services/authService.ts, src/views/getWebviewHtml.ts, src/commands/authCommands.ts, src/views/SidebarProvider.ts, src/services/configService.ts, src/services/codegenService.ts, src/services/postHogService.ts.

What it can do

  • Toggle feature flags

    Feature flag configurationUpdated feature flag state

  • View analytics data

    Analytics queries and filtersCharts and metrics visualization

  • Monitor product insights

    User behavior dataProduct performance reports

  • Create feature flags

    Flag name and targeting rulesNew feature flag configuration

  • Track code events

    Code instrumentationEvent tracking analytics

  • Debug feature flag behavior

    Feature flag code referencesFlag evaluation status and logs

Tags

vscodeposthoganalyticsfeature-flagseditor-extension

Tech Stack

Node.jsTypeScript

Comments (0)

No comments yet

Editorially curated, with community endorsements as a secondary signal. Corrections welcome.