You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Promote the "--template" flag from Experimental to Preview #1812
This issue is related to the proposal of promoting maturity of experimental and preview feature commands and flags #1771
The --template flag was introduced to several ORAS commands oras push/oras pull/oras attach/oras discover/oras manifest fetch in v1.2.0 as articulated in the spec, along with --format. It is currently marked as Experimental.
Rationale for Promotion
Over recent releases, the flag --template has demonstrated:
Functionality completeness – The feature has been used in the core use cases of defining Go template string used to format output
Stability – syntax and output structure have remained consistent over multiple releases.
Low maintenance overhead – No major breaking changes or regressions reported in recent cycles.
Given its maturity and stability, promoting --format to Preview will encourage broader adoption while signaling to users that the feature is nearing full stabilization.
Next Steps
Update the feature mark from Experimental to Preview in CLI documentation and help text.
Communicate the change in release notes for ORAS v1.3.0.
Continue gathering usage feedback and monitoring for edge cases in preparation for eventual promotion to Stable.
If you agree with this proposal, please vote on this issue with your comments. Thanks
oras manifest fetch --format go-template --template='{{ index .config.mediaType }}' $OCI_REF
oras manifest fetch --format go-template --template='{{ index .annotations "org.opencontainers.image.revision"}}' $OCI_REF
Log output example:
$> oras manifest fetch --format go-template --template='{{ index .annotations }}' $OCI_REF
Error: template: format output:1:3: executing "format output" at <index .annotations>: error calling index: index of untyped ni
Closing as not planned. --template shares the internal model with --format json, so it stays experimental alongside it (see #1808 and the discussion above).
Activity
shizhMSFT commentedon Aug 15, 2025
Since the internal model of template is the same as
--format json, I'd suggest keeping experimental and be consistent with #1808.ggjulio commentedon Dec 17, 2025
Not sure what I'm doing wrong but, I was trying to get the value of some fields in a manifest.
manifest example
This one works:
oras manifest fetch --format go-template --template='{{index .mediaType }}' $OCI_REFTheses one don't
oras manifest fetch --format go-template --template='{{ .config.mediaType }}' $OCI_REForas manifest fetch --format go-template --template='{{ index .config.mediaType }}' $OCI_REForas manifest fetch --format go-template --template='{{ index .annotations "org.opencontainers.image.revision"}}' $OCI_REFLog output example:
Am I missing something or it's a bug ?
Maybe related to this: #1276
TerryHowe commentedon Oct 22, 2026
Closing as not planned.
--templateshares the internal model with--format json, so it stays experimental alongside it (see #1808 and the discussion above).