CLI command
jeden export
Write a recorded session to a file as JSON, HTML, or Markdown. Printing a session is jeden show.
Exact invocation#
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
--htmlor--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 exit2withusage: jeden export <session-id-or-path> <output> [--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) andargument-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, exit1:session-not-found(session not found: <path>; nothing is at that path, observed: the session root a name without/is looked up under; fix:jeden sessions, orjeden sessions search <query>to find one by what it holds),session-unexaminable(<path> cannot be examined, never reported as not found),session-not-a-directory,session-state-absent(RPCsession/openof a directory withoutstate.json) andlast-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 <path>) 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<path>:<line>. id-not-textas forjeden show, andoutput-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) exits69; any other refusal or failure exits1. A refusal a functionality declares ends withfix: …andcause: <operation>.<cause>, andjeden errors show <operation>lists every cause of that functionality.