Run a command line from a jupyterlab extension

I am trying to make a widget based on https://github.com/enlznep/jupyterlab-shell-file to run a shell command on a file. I was trying to create a new terminal and pass it an ‘initialCommand’ but this functionality seems to have been removed, is it possible to run shell commands another way?