Skip to main content
Version: v5.6.1

opschain templates show

templates

opschain templates show <project>/<code>

Shows a template — code, name, description, type, the Git remote it builds from, archived state — followed by a table of its versions: each version's state, pinned Git revision, locked and archived flags, and how many assets are pinned to it. The template is resolved by code through the project's templates index, so the positional argument is always <project>/<code>, never an id. The Git remote's name is read from the show's own compound document (include=nodes,git_remoteno extra git_remotes request); against a server whose include engine predates the remote's raw id is shown instead.

The GIT REV column shows the pinned revision and, when the stored resolved commit differs from it (a branch or tag), the 7-character commit SHA in parentheses, e.g. main (3f2a91c). The IN USE column shows N asset(s) for a version assets are pinned to, - otherwise. A template with no versions yet prints

versions: (none yet — add one with `templates version upsert`)

Output​

code: web_stack
id: 0199b8d0-…
project: demo
name: Web stack
description: -
type: asset
git_remote: origin
archived: false
versions:
VERSION STATE GIT REV LOCKED ARCHIVED IN USE
1.0.0 available v1.0.0 (3f2a91c) yes no 2 asset(s)
1.1.0 available main (8c04e7b) no no -

-o json|yaml prints one document holding the template, its versions and the assets pinned per version.

Exit codes​

CodeMeaning
0Shown.
1The template or project was not found, or the request failed.
2Usage error — malformed address, no server target.

Named errors​

  • expected <project>/<template-code>, got "<arg>" — exit 2.
  • template "<code>" not found in project "<project>" — exit 1.
  • templates live on a server's projects — pass --server <url> or 'opschain context use <name>' — no server target (exit 2).

See also​

  • opschain docs cli/templates-version-upsert — add or repin a version.
  • opschain docs cli/templates-assign — move assets onto a version.