Skip to content

feat(element-template): add --values-file for batch property input on apply - #479

Draft
jwulf with Copilot wants to merge 3 commits into
mainfrom
copilot/add-values-file-support
Draft

feat(element-template): add --values-file for batch property input on apply#479
jwulf with Copilot wants to merge 3 commits into
mainfrom
copilot/add-values-file-support

Conversation

Copilot AI commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Repeating --set name=value for every property is unwieldy for templates with many fields (e.g. AI Agent connectors). --values-file accepts a JSON object mapping binding names to values as a batch alternative.

Usage

c8ctl element-template apply -i io.camunda.connectors.agenticai.aiagent.jobworker.v1 \
  Activity_1 diagram.bpmn \
  --values-file agent-config.json
{
  "systemPrompt": "=context.prompt",
  "model": "gpt-4o",
  "maxTokens": "4096"
}

Use --values-file - to read from stdin (BPMN must then be a file path):

jq -n --arg url "$API_URL" '{"method":"POST","url":$url}' \
  | c8ctl element-template apply -i io.camunda.connectors.HttpJson.v2 Task_1 process.bpmn \
    --values-file -

--set overrides --values-file when both target the same property. Numbers and booleans in the JSON are coerced to string automatically.

Changes

  • helpers.tsParsedPluginArgs gains valuesFile: string | null; parseArgs handles --values-file/--values-file=; new readValuesFile async helper reads JSON from file or stdin and emits name=value strings compatible with the existing --set pipeline
  • commands/apply.ts — merges values-file args before --set args (so --set wins on conflict); guards against simultaneous stdin use for both values and BPMN
  • c8ctl-plugin.ts — adds "values-file" flag declaration, updated help description and examples
  • README.md — documents --values-file with file and stdin usage examples
  • element-template.test.ts — 11 new tests: file-based values, --set override precedence, --values-file= form, error paths (invalid JSON, non-object, missing file, missing arg), stdin usage, and the stdin conflict guard

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
Copilot finished work on behalf of jwulf July 19, 2026 20:38
Copilot AI requested a review from jwulf July 19, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

element-template apply: support --values-file for batch field input

2 participants