make into a reusable module

- add interactive support for example
- add package.json