How to launch a basic PHP cli

I’ve tried to implement laminas-cli with symfony command component (as described here) that will basically render a view (HTML) that would be embedded as a HTML email to be sent out to my mailbox. However, the URL view helper in the view file is not generating the routes that have been configured in the router configuration. I hope someone here could help me to figure what did I do wrong.