opschain templates version cat
templates
opschain templates version cat <project>/<code> --version <v> <path>
Prints one UTF-8 text file as the template version sealed it — the
same bytes a workflow's content() read of that version consumes
(opschain docs expressions). The read is capped at 1 MiB; a binary
file, a symbolic link or a submodule is refused by name, as is a path
outside the repository. Requires read on the repository-content rule path
/git/content/projects/<project>/<path> — the same grant a content()
read needs; a refusal names the rule path.
Output
The file's text, verbatim. -o json|yaml prints {path, commit, sha256, bytes, text} — sha256 is what a content() read of the same file
records as its evidence on the step.
Flags
| Flag | Meaning |
|---|---|
--version <v> | The version to read from (required). |
Exit codes
| Code | Meaning |
|---|---|
| 0 | Printed. |
| 1 | The template, version or file was not found, the read was refused by name (not permitted, binary, link, submodule, over the cap), or the version has not resolved its commit yet. |
| 2 | Usage error — missing --version or path, malformed address, no server target. |
See also
opschain docs cli/templates-version-browse— list the tree.opschain docs resources/template("Browsing a version's content").