Stewer

Stewer is the command‐line launcher for Divooka documents. It runs a Divooka document - a binary .dvk, a DiDS JSON .json, or a Divooka app bundle .dvb - directly from a terminal, script, CI/CD pipeline, or operating-system scheduler, without opening the Divooka graph editor. Stewer opens the document the way the editor does, feeds it any provided inputs, runs it the way the editor's Run does, and returns a standard exit code (0 on success, non‐zero on failure).

Installation

  • Bundled with Divooka Compute Stewer ships with Divooka Compute: stew.exe is in its installation folder. Divooka Compute's own Terminal tab puts that folder first on the PATH, so stew answers there by name; see Exporting a program.

  • Docker Hub If you prefer to run Stewer in a containerized environment, you can pull the official image from Docker Hub:

    docker pull methodox/stew
    

    Once pulled, you can invoke Stewer via:

    docker run --rm -v /path/to/graphs:/graphs methodox/stew stew /graphs/MyGraph.dvk
    

Basic Usage

The simplest way to run a Divooka document is:

stew <document> [inputs...]
  • <document> The filesystem path to the document, for example Graphs/ImportSalesData.dvk.

  • [inputs...] (optional) Values for what the document's entry graph declares - a Function's inputs, a Routine's Begin - in declaration order. Any left out take their declared defaults; quote a value that contains spaces. For instance, if the entry graph takes a single text input (e.g., a CSV file path), you might run:

    stew Graphs/ImportSalesData.dvk "C:\Data\sales_2025_06_01.csv"
    

An entry graph that declares no inputs - an Events or Flows graph - is given whatever follows the document as the program's arguments.

A document runs compiled - built into a program first, as the editor's Compiled run does - unless --mode interpreted asks for a run node by node, as the editor's Interpreted run does.

Command‐Line Options

Running stew --help displays the global usage and options; its first lines are:

stew 0.8.0: runs a Divooka document from the command line.

Usage:
  stew [--mode interpreted|compiled] [--measure] <document> [inputs...]
  stew --help [<document>]
  stew --version
  stew --packages
  stew --serve <document> <output folder>
  stew --pack <document|folder> [bundle.dvb]
  • --measure reports, after the run and on standard error, each stage's time and resource use.
  • --packages loads the distribution beside stew and reports its packages.
  • --serve keeps the document open and runs it once for each block of lines read from standard input, writing each output to a file in the output folder.
  • --pack packs a document and every file in its folder into a Divooka app bundle: the document becomes entry.dvk and the rest keep their paths. With no bundle named, it writes <folder>.dvb beside the folder. A bundle runs like a document.

Discovering Graph Inputs

To see which graph a run starts from and what it takes, use:

stew --help <document>

Stewer reads it from the file, without loading the distribution, and prints it in this format:

Mandelbrot.dvk runs 'Graph' (Routine).
Inputs (in declaration order):
  Width: Number (Double), default 80
  Height: Number (Double), default 80
  MaxIteration: Number (Double), default 80
To run it:
  stew Examples/Benchmarks/Mandelbrot.dvk
  stew Examples/Benchmarks/Mandelbrot.dvk 80 80 80
  stew --mode interpreted Examples/Benchmarks/Mandelbrot.dvk
  • The name of each input
  • Its type
  • Its default value, used when the input is left out

By knowing this signature, you can build wrapper scripts that validate or transform input values before calling Stewer.

Exit Codes

  • 0 – The document ran to the end; Stewer lists what the entry graph returned.
  • 1 – The document could not be opened, was ill-formed, or its run failed; Stewer prints the failure.
  • 2 – The command line was wrong.
  • 130 – The run was stopped with Ctrl+C. The first Ctrl+C stops the run the way the editor's Stop does; a second ends the process at once.

You can check $? (on UNIX‐like systems) or $LASTEXITCODE (in PowerShell) immediately after invocation to detect failures and trigger appropriate error handling.

  • Exporting a program - running, packing and handing on a document written in Divooka Compute.
  • Docker Hub: methodox/stew Container image hosting the latest Stewer release for Linux-based environments. Visit Docker Hub.