Skip to content

CLI: graph, debug, watch ​

rein graph ​

Print the program graph: functions, questions, branches, outcomes, and hand-offs. With answers, mark the path the flow takes. The graph shows functions, not calls: a function called several times with await is marked with the answers of its first call

Usage: rein graph [OPTIONS] [PROGRAM]

Arguments: ​
  • <PROGRAM> — Program to draw: a .rein file, or a name (see rein list). Default: the project around the current directory
Options: ​
  • --root <ROOT> — Project root. Default: the nearest directory with main.rein

  • --refs — Draw only the references: one node per function, one edge per reference

  • --entry <ENTRY> — Walk the flow from this function, as its path under the root without .rein. Default: the program's entry

  • --answer <KEY=VALUE> — Walk the flow with this answer, as key=value, such as main.task=merge. Repeat for each answer

  • --input <NAME=VALUE> — Walk the flow with this value of a string parameter of the entry, as name=value. Repeat for each input

  • --format <FORMAT> — Output format. Default: html for a .html FILE or with --open, else mermaid

    Possible values:

    • mermaid
    • dot
    • json
    • html: One page that draws the Mermaid diagram in a browser
  • -o, --output <FILE> — Write to FILE instead of stdout. A .svg or .png FILE is rendered from DOT by Graphviz dot

  • --open — Open the page in the default browser. Without -o, write it to a temporary file first

rein debug ​

Debug a program in the browser: set inputs and answers, step through, and watch the path the flow takes

Usage: rein debug [OPTIONS] [PROGRAM]

Arguments: ​
  • <PROGRAM> — Program to debug: a .rein file, or a name (see rein list). Default: the project around the current directory
Options: ​
  • --root <ROOT> — Project root. Default: the nearest directory with main.rein

  • --entry <ENTRY> — Function to start from, as its path under the root without .rein. Default: the program's entry

  • --input <NAME=VALUE> — First value of a string parameter of the entry, as name=value. Repeat for each input

  • --answer <KEY=VALUE> — First answer, as key=value, such as main.task=merge. Repeat for each answer

  • --port <PORT> — Port on 127.0.0.1. Default: a free port

    Default value: 0

  • --no-open — Do not open the page in the browser

rein watch ​

Show the agents that use rein now: their programs, answers and the step each run waits on, in a browser page. The flow graph shows functions, not calls: a function called several times with await is marked with the answers of its first call

Usage: rein watch [OPTIONS]

Options: ​
  • --port <PORT> — Port on 127.0.0.1. Default: a free port

    Default value: 0

  • --no-open — Do not open the page in the browser