Save json file to specific location

I’m working on a project and hoping to save out a .json file based on the size / position of frames in a page. My hope is that the save panel could default to the correct file location, rather than the last save location, as correcting it every time could be a real pain (we can guarantee folks will be using the plugin in figma desktop).

Does this sound at all possible?

I’ll also note that I currently having it roughly working in a pretty hacky two step process.

  1. User runs figma plugin, which copies json data to clipboard
  2. User runs bash script, which checks relevant file out for edit in version control, and pastes clipboard contents into .json file.

This is okay, but feels very duct-taped together, so hoping I could find a more streamlined, foolproof solution. Another route I could imagine is getting the bash script to automatically trigger the figma plugin, but not sure if figma plugins can be triggered from the terminal?