Create a python file example console
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from phoopy.kernel import Kernel
from phoopy.console import Application # noqa
from cleo.inputs.argv_input import ArgvInput # noqa
_input = ArgvInput()
env = _input.get_parameter_option('--env', 'dev')
debug = not _input.has_option('--no-debug') and env != 'prod'
kernel = Kernel(env, debug)
application = Application(kernel)
application.run(_input)
Make it executable with chmod
$ chmod +x console
Then run
./console