Run a command line from a jupyterlab extension

I am trying to make a widget based on 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?