Create menus dynamically/text box

I am new to BTT. I am trying to write a small utility which should fetch the recent files from plist and display it either using shortcut or menu bar or menu.

I wrote a shell script which converts plist to json and extracted the recent files using jq.

How do I create the menu or text box so that if the users click on it, it should launch the item in the respective program?

Fetching the recent items and launching is done. But how do I create the items where it should display the recent file name?

Could you please provide me with some insights? Thanks!