Open iterm and execute command

Hello, I bought BTT and I am trying to configure my new MacBook Pro 16.

What I want:

  1. When clicking f12 on the touch bar then I want to see iterm terminal, which executes me command "start_my_current_project" and showing me it on a fullscreen.

  2. On f1 I want to show iterm terminal if exist in current desktop or create a new instance if not exist

Can you help me to achieve it? Not sure yet how to search for information in this community.

iTerm has a python API that could be used:

This could then be triggered using the "execute terminal command" action in BTT.

Alternatively iTerm also has a old, deprecated Apple Script API: (which could be triggered using the "Run Apple Script" action in BTT.