Is there any way to run shell script/command while clicking on button using jupyterlab extension?

I am trying to create a jupyterlab extension where I can run shell command/python command while clicking on toolbar button. I have created similar thing with notebook extension where I create cell with input text, and run the cell and delete it → all things happens once I click on the toolbar button. I want to do similar thing via labextension.
But is there any way that I can run linux command via lab extension?