<aside> 📘

Tutorial 4 of the Kalix tutorial series. You'll drive a Kalix simulation directly from a terminal using the kalix command-line tool, learn its main flags, and chain runs together in a small shell loop. Expected time: about 15 minutes.

</aside>

What you'll build

A working CLI workflow for the Stringybark catchment model: running simulations from a terminal, choosing output formats, producing mass-balance check, profiling performance, and finally chaining multiple runs in a single shell loop.

image.png

Prerequisites

Project layout

004/
├── data/
│   ├── climate_data.csv
│   ├── observed.csv
│   ├── rain_north.csv
│   ├── rain_central.csv
│   └── rain_south.csv
└── models/
    └── baseline/
        └── stringybark.ini   ← the model (uses trailhead paths)

Same layout as Tutorial 3 — just without the wetter scenario. All the commands below assume you've changed into 004/models/baseline/.

Step 1 — Verify the install

From any terminal, check that kalix is callable and the version is what you expect:

kalix --version

You should see something like kalix 1.0.0. If you get "command not found", the binary isn't on your PATH — revisit the install step or use the full path to the binary.

For the full command list, run:

kalix --help

You'll see the subcommands: simulate (alias sim), optimise (alias opt), new-session, get-api, test, help. We'll only need simulate in this tutorial.

Step 2 — Run a basic simulation

From the 004/models/baseline/ folder, run: