Skip to content

Scan your code for PostHog events (posthog.capture calls) and generate a markdown file with the events and their properties.

License

Notifications You must be signed in to change notification settings

kravetsone/posthog-scan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

posthog-scan

npm npm downloads

Scan your code for PostHog events (posthog.capture calls) and generate a markdown file with the events and their properties.

Usage

run npx posthog-scan in your project directory (will scan all files in the src directory).

npx posthog-scan

posthog.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.

Why

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.

TODO

  • Check posthog-node not posthog.capture
  • Add more customization at CLI

About

Scan your code for PostHog events (posthog.capture calls) and generate a markdown file with the events and their properties.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published