Jeden/Docs

CLI command

jeden export

Write a recorded session to a file as JSON, HTML, or Markdown. Printing a session is jeden show.

Exact invocation#

Shell
jeden export <session-id-or-path> <output> [--html|--markdown]

Inputs and options#

  • Required: a session identifier or path, and the output file.
  • Optional: exactly one of --html or --markdown; JSON is the default.

Output and state effect#

Writes the payload to the output path and prints the path.

Refusals and boundaries#

  • The functionality is jeden.session.export (tests/sessions/listing/records.mjs). Read before the session, each exit 2 with usage: jeden export &lt;session-id-or-path&gt; &lt;output&gt; [--html|--markdown] in its fix: session-missing, output-missing (export requires the file to write, and the command line names none; `jeden show` prints a session), format-twice (export accepts only one format option) and argument-unexpected (an unknown flag, a second output, or --json, since JSON is the default). No session is read and no file is written.
  • 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).
  • Reading it has every cause of jeden.session.ledger.read, listed on the sessions page: an unreadable ledger (cannot read &lt;path&gt;) or state, a state that is not a JSON object, and a ledger line that is malformed JSON, not an event, of another schema, changed after its seal, out of sequence, recorded twice, off the active lineage, of another session or with broken links, each naming &lt;path&gt;:&lt;line&gt;.
  • id-not-text as for jeden show, and output-unwritable (cannot write the export to PATH: the file cannot be created or replaced, observed: what the system answered); nothing is written partly.
  • 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.