How to trigger a plugin from the code?

We want to keep our translations in the Figma variables and sync them across the codebase. To do so I use variables2json plugin which saves a nice json on the machine so I am able to use it in the code.

We need to trigger the plugin manually to get the translations to the local env. Then we need to store them in the repo (which we do not want to do) because CI is not able to pull the latest translations from Figma.

How could we trigger the plugin from the codebase? That will allow us to do so during the building process on the local env and on the CI env too. Theoretically, it will almost fully automate the translations process with maintaining only one source of truth: Figma with its translations stored in variables