Skip to content

feat(genkit-tools/cli): support ephemeral runtime commands#5079

Open
ssbushi wants to merge 3 commits intomainfrom
sb/self-cli
Open

feat(genkit-tools/cli): support ephemeral runtime commands#5079
ssbushi wants to merge 3 commits intomainfrom
sb/self-cli

Conversation

@ssbushi
Copy link
Copy Markdown
Contributor

@ssbushi ssbushi commented Apr 8, 2026

Supports specifying runtime startup with runtime commands.

Eg:

genkit flow:run simpleEcho '"hello world"' -- pnpm run dev

Checklist (if applicable):

@ssbushi
Copy link
Copy Markdown
Contributor Author

ssbushi commented Apr 8, 2026

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for ephemeral runtimes across several CLI commands, including eval:extractData, eval:flow, eval:run, flow:batchRun, and flow:run, by allowing users to provide a runtime command after a '--' separator. It also refactors logging to use debug levels for internal processes and enhances the output with colored results and Trace IDs. Review feedback identifies logic issues in parsing the '--' separator when optional data arguments are used and suggests adding a check to prevent logging broken Trace URLs when the ID is missing.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for ephemeral runtimes across several CLI commands, including eval:extractData, eval:flow, eval:run, flow:batchRun, and flow:run. By using the -- delimiter, users can now specify a runtime command that the CLI will manage for the duration of the operation. The implementation includes a new runWithEphemeralManager utility and updates to argument parsing to correctly handle data inputs alongside runtime commands. Additionally, logging has been refined by moving progress messages to the debug level and enhancing output with colored labels and Trace IDs. I have no feedback to provide as no issues were identified.

@ssbushi
Copy link
Copy Markdown
Contributor Author

ssbushi commented Apr 9, 2026

/gemini review

@ssbushi ssbushi requested a review from pavelgj April 9, 2026 15:10
@ssbushi ssbushi marked this pull request as ready for review April 9, 2026 15:10
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for running Genkit CLI commands (eval:extractData, eval:flow, eval:run, flow:batchRun, flow:run) with an ephemeral runtime. This allows users to specify a custom command (e.g., 'npm run dev') that Genkit will start and manage for the duration of the CLI command execution, rather than relying on a pre-existing running Genkit development server. This is achieved by parsing runtime commands separated by '--' in the CLI arguments and using a new 'runWithEphemeralManager' utility. Additionally, logging verbosity has been adjusted (many logger.info calls changed to logger.debug) and output formatting improved with colored text for results and trace IDs. A '.agents/*' entry was also added to .gitignore. There are no review comments to address.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant