setup.py, main loop, cmd line interface