opschain artifacts put
Included from Basic tier
Stores a file as a new artifact version against a node, over the v2
ArtifactService.UploadArtifact RPC addressed by node path. The upload
becomes the newest version of the (--node, --code, label set) identity
that artifacts get resolves latest-first. A server target is always
required: local artifacts are written by runs, so there is no local form of
put.
The file's content travels in the request message (buffered, so very large
archives cost memory on both sides; download bytes stay on the streaming
blob lane), carrying the content type detected from its extension so the
server stores and later serves the download with it. On success it prints
stored artifact <code> (<id>, <size> bytes) against <node>; --quiet
prints only the id, and -o json|yaml emits the stored summary.
Flags
| Flag | Meaning |
|---|---|
--code <code> | The artifact code — its per-node identity (required). Lowercase letters, numbers and underscores. |
-f, --file <path> | The file to upload (required). |
--node <path> | Node path to store the artifact against (required). Any node path spelling the CLI accepts (the shared node-address forms): demo, demo/environments/dev, /projects/demo/environments/dev/assets/web, acme/assets/standalone — the projects/ prefix and leading slash are optional, and project-level asset paths work. |
--label <label> | Label stored on the artifact (repeatable). Comma-separated values also split. |
Exit codes
| Code | Meaning |
|---|---|
| 0 | Artifact stored. |
| 1 | Node resolution or the upload failed. |
| 2 | Usage error. |
Named errors
artifacts put stores an artifact on a server — pass --server <url> or 'opschain context use <name>' (local artifacts are written by runs)— no server target.expected a node path like demo, demo/environments/dev or /projects/demo/environments/dev/assets/web, got "<value>"— a malformed node path (the shared node-address parser's refusal).resolving node <path>: …— the node does not exist or is not visible; exits 1.
The first two exit 2.
Examples
opschain artifacts put --code release_notes -f notes.md \
--node /projects/demo/environments/dev --label v2 --label approved
See also
opschain docs cli/artifacts-getandopschain docs cli/artifacts-list.opschain learn 3.6— artifacts.