porcupine

Porcupine is a headless product analytics tool and a general-purpose event store.

It works with PostHog and Segment clients. Headless means it ships with no UI at all. Once it’s installed, an agent or a human can manage it and query it through MCP or the CLI.

I wanted a lightweight product analytics tool I could self-host. Then I realised no one on my team ever opens the PostHog UI. Our local agents already manage everything and run the queries.

PostHog, OpenPanel and Pug were big inspirations. I wanted direct SQL queries, pipelines that send data to other systems, and the option to offload older data to S3, all in something light enough to host myself.

This text is human. The agent did the rest.

Get started

Paste this into your coding agent.

Read https://olup.github.io/porcupine/llms.txt. Start the local quickstart, send a test event, and show me the SQL and its result.

Capture

Keep a supported PostHog SDK, send Segment events, or POST your own JSON. For a website, you can estimate daily visitors without setting a cookie.

Query

Give an agent read access to a project. It can look up event names and properties before it writes a ClickHouse query.

Deliver

Send each signup to a webhook, or batch the events. For a daily extract, schedule a SQL query and have Porcupine write the results to S3.