Stand alone view url helper when cli is used

Thank you for the suggestion. I was able to use that solution, I just wanted to “second” this topic , looking for “not so dirty” solution and having in mind your statement:

Additionally I want to get an advice how to deal with the Config Cache - I notice that when it is enabled if the config cache is generated by the command it “breaks” the web interface because in keeps the URL Helper Factory from the command config. Vice versa if there is already some cached config, from web request, the command does not work because it doesn’t read the new config, it directly reads the cached one. I have overcome this solution by deleting the config cache files in the beginning of the command config file and just before it returns the container, but I am not sure whether this is the best solution…
Thank you once again for your advices.