Skip to main content
Version: v5.7.0

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​

FlagMeaning
--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​

CodeMeaning
0Artifact stored.
1Node resolution or the upload failed.
2Usage 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, /projects/demo/environments/dev/assets/web or demo/entities/rack_1, got "<value>" — a malformed node path (the shared node-address parser's refusal).
  • <path> is an entity — an entity has no template and nothing runs against it, so it cannot hold artifacts — an entity path as --node.
  • resolving node <path>: … — the node does not exist or is not visible; exits 1.

The first three 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-get and opschain docs cli/artifacts-list.
  • opschain learn 3.6 — artifacts.