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
The command reference documented container image save --output and container image load --input as required flags, which hid the piping workflow.
Both options are optional: when --output is omitted, image save writes the OCI
archive to stdout, and when --input is omitted, image load reads the archive
from stdin. This is what the code already does:
ImageSave.swift declares var output: FilePath? (optional) and, when it is
absent, streams the archive to FileHandle.standardOutput.
ImageLoad.swift declares var input: FilePath? (optional) and, when it is
absent, reads the archive from FileHandle.standardInput.
The docs were never updated after that stdin/stdout support landed, so the
synopsis and prose still marked the flags as required. This change brings the
reference in line with the behavior and matches how the sibling container export
entry already documents its stdout fallback.
Specifically, for both image save and image load it:
brackets [--output <output>] / [--input <input>] in the synopsis so they read
as optional,
reworks the description to note the stdout / stdin fallback (dropping the
inaccurate "on disk" for save and "The tar file must be specified via --input."
for load),
annotates the option bullets with "(defaults to stdout)" / "(defaults to stdin)",
adds a short Examples block showing both a file and a piped invocation.
No code changes; documentation only.
Testing
Tested locally
Added/updated tests
Added/updated docs
Verified the documented behavior against the source in Sources/ContainerCommands/Image/: the optional output / input options and
the stdout / stdin fallback branches. Reviewed the rendered Markdown for the image save and image load sections; git diff --check is clean. No automated
test applies to a documentation-only change (the file is hand-maintained, not
generated).
stephenlclarke added a commit
to stephenlclarke/container-compose
that referenced
this pull request
Jul 12, 2026
The image save --output and image load --input options are optional: when
omitted, save writes the OCI archive to stdout and load reads it from stdin.
The command reference still presented both flags as required, which hid the
piping workflow. Bracket the options in the synopsis, note the stdout/stdin
defaults, and add piping examples, matching the container export entry.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Motivation and Context
The command reference documented
container image save --outputandcontainer image load --inputas required flags, which hid the piping workflow.Both options are optional: when
--outputis omitted,image savewrites the OCIarchive to stdout, and when
--inputis omitted,image loadreads the archivefrom stdin. This is what the code already does:
ImageSave.swiftdeclaresvar output: FilePath?(optional) and, when it isabsent, streams the archive to
FileHandle.standardOutput.ImageLoad.swiftdeclaresvar input: FilePath?(optional) and, when it isabsent, reads the archive from
FileHandle.standardInput.The docs were never updated after that stdin/stdout support landed, so the
synopsis and prose still marked the flags as required. This change brings the
reference in line with the behavior and matches how the sibling
container exportentry already documents its stdout fallback.
Specifically, for both
image saveandimage loadit:[--output <output>]/[--input <input>]in the synopsis so they readas optional,
inaccurate "on disk" for save and "The tar file must be specified via
--input."for load),
No code changes; documentation only.
Testing
Verified the documented behavior against the source in
Sources/ContainerCommands/Image/: the optionaloutput/inputoptions andthe stdout / stdin fallback branches. Reviewed the rendered Markdown for the
image saveandimage loadsections;git diff --checkis clean. No automatedtest applies to a documentation-only change (the file is hand-maintained, not
generated).