zigflow graph inject
zigflow graph inject
Inject a workflow graph into a file between marker comments
Synopsis
Inject a rendered workflow graph into one or more target files.
For each target file the command finds a pair of marker comments, replaces everything between them with a freshly generated graph, then writes the result back. Running inject is idempotent: if the graph is already current the file content does not change.
Auto-detect form (no --workflow flag):
zigflow graph inject <target-file> [target-file...]
The workflow file path is read from the start marker embedded in each target file. Embed a path like this:
<!-- ZIGFLOW_GRAPH_START ./workflow.yaml -->
<!-- ZIGFLOW_GRAPH_END -->
When no path is embedded the default "workflow.yaml" is used, resolved relative to the target file's directory. If a target file contains no ZIGFLOW_GRAPH_START marker it is skipped silently, so the command is safe to use with pass_filenames: true in pre-commit hooks.
Explicit form (with --workflow flag):
zigflow graph inject --workflow <workflow-file> <target-file> [target-file...]
All targets use the supplied workflow file and the --start-marker value.
Default markers:
<!-- ZIGFLOW_GRAPH_START -->
<!-- ZIGFLOW_GRAPH_END -->
zigflow graph inject [flags] <target-file> [target-file...]
Options
-e, --end-marker string End marker comment (default "<!-- ZIGFLOW_GRAPH_END -->")
-h, --help help for inject
-o, --output string Output format (mermaid) (default "mermaid")
-s, --start-marker string Start marker comment (requires --workflow) (default "<!-- ZIGFLOW_GRAPH_START -->")
-w, --workflow string Explicit workflow file (auto-detected from start marker if not set)
Options inherited from parent commands
-l, --log-level string Set log level (default "info")
SEE ALSO
- zigflow graph - Generate a visual graph of a Zigflow workflow