It does that by manipulating LUA scripts that control Civ5's UI behavior. If it gets stuck like that, just run ./fix_autoload.py. For now the only frontend is CLI ...