Hello folks! We are discussing and
Today, you run
genkit start in your project directory which brings up the Dev UI, its backend process, and starts your app code by calling the start script in either Node.js or Go. The backend process then watches for any code changes, optionally rebuilds, and restarts the code. This is an opinionated process that doesn't work well with other technologies with their own hot-reload mechanisms that a developer may choose to use alongside Genkit. Additionally, we are refactoring Genkit config/registry to no longer be a global instance but instead all registry actions including defining flows, tools, actions, etc will be done on a Genkit instance that will be returned from the former configureGenkit(), so instead of defineFlow(...) it will be const genkit = initializeGenkit({...}); genkit.defineFlow(...);. Given this change, there can be multiple Genkit instances in a single code base so the old way to inspecting and controlling the app code via Dev UI no longer works.We are planning on changing the way the CLI works. There will now be two commands for starting/running Genkit:
-
genkit ui (exact name TBD): this will start up the Dev UI and its backend process only. You will then need to start your app code using any way you'd like via a different terminal window. genkit init will provide NPM scripts that simplify this process down to things like npm start or npm run dev (for dev mode). The script itself will contain something like node --watch which will replace the former process of "manually" restarting the process on code changes.-
genkit start: this is do the same as above, but it will also kick off npm run dev. This process will no longer watch/build/restart code so the details of that process will lie squarely in the hands of the dev, specifically via NPM scripts.