Jeden/Docs

CLI command

jeden contracts

Print Jeden's contracts as one text, and install them into a file another program reads as a system prompt.

Exact invocation#

Shell
jeden contracts [render|status|install|uninstall] [--file <path>] [--json] [--cwd path]

Inputs and options#

  • No action defaults to render, which prints the task contract and the communication contract in force (Jeden's default, the operator's own text, or none) in the conversation language; --cwd selects the project layer and --json wraps the text.
  • status, install and uninstall need the target --file &lt;path&gt;.

Output and state effect#

install writes the rendered text between the lines &lt;!-- jeden contracts: start --&gt; and &lt;!-- jeden contracts: end --&gt;, replacing the previous block and leaving the rest of the file alone, through an atomic rename; it prints Installed the Jeden contracts into &lt;path&gt; or &lt;path&gt; already carries the Jeden contracts. uninstall removes that block and nothing else, through the same atomic rename, and prints Removed the Jeden contracts from &lt;path&gt; or &lt;path&gt; carries no Jeden contracts; with --json both print path and changed. status prints current, stale, or absent with the path and exits 0 only when current. Jeden's own sessions take the contracts from the binary and need no install.

Refusals and boundaries#

  • The functionality is jeden.contracts; jeden errors show jeden.contracts prints every cause with its test (tests/contracts/command.mjs). Before any file is read, each exit 2 and naming the usage line: verb-unknown, argument-unexpected (unknown contracts option: X; status takes only --file &lt;path&gt;), file-missing (contracts install, uninstall and status require --file &lt;path&gt;, and the command line names none or ends after --file) and file-twice (contracts accepts exactly one --file target; the last path is never silently preferred).
  • Exit 1: file-unreadable (cannot read &lt;path&gt;), markers-malformed (malformed Jeden contract markers: expected one start followed by one end, observed: how many start and end lines the file holds; nothing is written and status does not call it absent), directory-uncreatable and file-unwritable (the file keeps what it held). Replacement and removal preserve every byte outside the matched block, including surrounding spaces and newlines.
  • Without --json, status exits 1 on block-absent (absent: &lt;path&gt; carries no Jeden contracts) and block-stale, whose fix is run jeden contracts install --file &lt;path&gt;; with --json it answers the state and exits 0.
  • 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.