If you're doing something more complex, you might need metashell. See http://metashell.org/manual/how_to/index.html#see-what-templ.... But you have to really, deeply, love C++ to get much out of it.
main page: http://dsw.users.sonic.net/oink/index.html
github repo: https://github.com/dsw/oink-stack/
Trying to verify that I found this tool called Templator that apparently does it in a nice graphical way: https://www.cevelop.com/#templator
The license is restrictive but you can download it for free: https://www.cevelop.com/license/