Draft
feat(element-template): add --values-file for batch property input on apply#479
Conversation
Copilot
AI
changed the title
[WIP] Add support for --values-file in element-template apply
feat(element-template): add --values-file for batch property input on apply
Jul 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Repeating
--set name=valuefor every property is unwieldy for templates with many fields (e.g. AI Agent connectors).--values-fileaccepts a JSON object mapping binding names to values as a batch alternative.Usage
{ "systemPrompt": "=context.prompt", "model": "gpt-4o", "maxTokens": "4096" }Use
--values-file -to read from stdin (BPMN must then be a file path):--setoverrides--values-filewhen both target the same property. Numbers and booleans in the JSON are coerced to string automatically.Changes
helpers.ts—ParsedPluginArgsgainsvaluesFile: string | null;parseArgshandles--values-file/--values-file=; newreadValuesFileasync helper reads JSON from file or stdin and emitsname=valuestrings compatible with the existing--setpipelinecommands/apply.ts— merges values-file args before--setargs (so--setwins on conflict); guards against simultaneous stdin use for both values and BPMNc8ctl-plugin.ts— adds"values-file"flag declaration, updated help description and examplesREADME.md— documents--values-filewith file and stdin usage exampleselement-template.test.ts— 11 new tests: file-based values,--setoverride precedence,--values-file=form, error paths (invalid JSON, non-object, missing file, missing arg), stdin usage, and the stdin conflict guard