Scan your code for PostHog events (posthog.capture calls) and generate a markdown file with the events and their properties.
run npx posthog-scan in your project directory (will scan all files in the src directory).
npx posthog-scanposthog.md file will be created in the root of your project.
it will look like this:
## Events
- [test](#test)
### test
- `email` — `undefined | "test@test.com"`
- `test` — `undefined | number`Important
For now, it only works for posthog name of PostHog instance.
It will help you to keep your events in one place and generate documentation for them (so you can share it with your team).
I am also wants to use ts-morph in one of my projects.
- Check
posthog-nodenotposthog.capture - Add more customization at CLI