Can we change the notebook kernel using commands or functions?

Hi I am new to jupyter extension, I wanted to know if we can change the notebook kernel using any function or command ?

Yes. The list of commands is at Commands — JupyterLab 4.0.0a32 documentation

Not sure if you want notebook:change-kernel, kernelmenu:change or another one.

Are you building a Typescript extension or want to execute the command from Python?


I am building a typescript extension, where i have placed an activate button, now i want that button to change the kernel from current to another that is installed.