Jeden/Docs

CLI command

jeden artifact

Read one UTF-8 session artifact or copy it to a requested output file.

Exact invocation#

Shell
jeden artifact <session-id-or-path> <name> [output]

Inputs and options#

  • Required: session identifier or path and artifact name.
  • Optional: an output path. Without it, artifact text is printed and normalized to end with a newline.

Output and state effect#

Canonicalizes the session artifact root and selected file, reads the artifact as text, and either prints it or writes the same text to the output path.

Refusals and boundaries#

  • The functionality is jeden.session.artifacts (tests/sessions/listing/artifacts.mjs). Exit 2 before any file is read: session-missing, name-missing (artifact requires an artifact name after the session), argument-unexpected (a word after the output) and artifact-escapes (artifact path escapes session: &lt;name&gt; resolves outside the session's artifact directory, observed: where it resolves).
  • Finding the session is jeden.session.find, exit 1: session-not-found (session not found: &lt;path&gt;; nothing is at that path, observed: the session root a name without / is looked up under; fix: jeden sessions, or jeden sessions search &lt;query&gt; to find one by what it holds), session-unexaminable (&lt;path&gt; cannot be examined, never reported as not found), session-not-a-directory, session-state-absent (RPC session/open of a directory without state.json) and last-session-unrecorded (a session command that names none in a workspace that recorded none).
  • Exit 1: artifact-not-found (the session keeps no artifact of that name), artifact-not-text (cannot read artifact PATH as UTF-8) and output-unwritable (cannot write artifact to PATH), each with what the system answered.
  • A command line of the wrong form (an unknown command or option, a missing, unexpected or invalid argument, a missing confirmation) prints the error and the usage and exits 2; a refusal that retrying unchanged can help (a dependency down or not answering, a rate limit) exits 69; any other refusal or failure exits 1. A refusal a functionality declares ends with fix: … and cause: &lt;operation&gt;.&lt;cause&gt;, and jeden errors show &lt;operation&gt; lists every cause of that functionality.