Make it work as a module and cli app
make it work as a module