Command line
The experimenter command does from a terminal what the app does in its window. It
validates and runs an Experiment, inspects a model, reads results, and manages
the license, the terms and bundles.
Every Experiment is a plain YAML file (Experiment file). Scripts, scheduled jobs, and CI validate and run Experiments without the GUI. Each command below has its own section. The section gives what the command does, its usage line, its arguments and options, its exit codes and an example.
Usage
experimenter [-h] [--version] {validate,inspect,run,node-add,node-remove,node-rename,results,record,compare,approve,reproduce,settings,trust,force-close,license,terms,bundle,gui,call,mcp,tools} ...Options:
-h,--help: show this help message and exit--version: show program’s version number and exit
Example:
experimenter --versionRunning from the app bundle
The macOS app runs the same commands. Run the program inside the app bundle:
Experimenter.app/Contents/MacOS/Experimenter run experiment.exptIf the first argument is a command name, the app passes all arguments to the
command line and opens no window. The gui command is the exception. It
opens the window. An empty argument list opens the window. A bare file path
also opens the window, with that file loaded. The top-level -h and
--version options work only from the experimenter command. The app treats
them as file names.
validate
Load an Experiment and print the same findings that the GUI and the runner apply. Use it as a pre-flight check before a long run. Each finding carries a level (error, warn, info), a where scope, and a message.
--json gives back one object per finding. It has six keys: level, message, where, code, path and fix. The path key holds a JSON pointer into the Experiment file: /runs/Baseline/checks/0 is the first check of the Run Baseline. A finding about the whole file has the pointer "". A finding with no code or no fix has null in that key. These codes exist:
check-id-duplicate: two acceptance checks of one Run have the same idcheck-invalid: an acceptance check of a Run has a bad shapecheck-variable-unknown: an acceptance check names a variable the model does not havecomparison-import-collision: a comparison file has the name of an enabled import of the modeldatasets-none-active: every dataset of the datasets axis of a section is inactivedesign-file-invalid: a design file of a sensitivity routine cannot runexport-only-field: a field that only an export may carry is on an importfile-empty: a file the Experiment names has no contentfile-not-found: a file the Experiment names does not existnot-count: a number that must be a whole number of 0 or more is notnot-positive: a number that must be above 0 is 0 or lessoverride-cell-missing: an override addresses a cell that is not in the CSV fileruns-count-missing: a sensitivity routine has norunscountsaltelli-invalid: a sensitivity routine withsaltelli:breaks a rule of the Saltelli designscope-empty: a scope list has no entryscript-not-found: a Script names a file that is not on diskthreshold-payoff-unknown: a sensitivity threshold names a payoff the model does not havetime-step-zero: sim_specs has a dt_reciprocal and a dt of 0
Usage:
experimenter validate [-h] [--json] <experiment>Arguments:
experiment: Experiment (.expt)
Options:
-h,--help: show this help message and exit--json: print one machine-readable JSON summary on stdout instead of plain-text findings (level, message, where, code, path and fix per finding)
Exit codes:
| Code | Meaning |
|---|---|
0 | the Experiment is clean |
2 | the command could not load the file (malformed YAML, missing, …) |
3 | the command found validation errors. --json prints the findings |
Examples:
experimenter validate experiment.expt
experimenter validate --json experiment.expt | jq '.messages[] | select(.level == "error")'inspect
Parse a Stella model (.stmx) and print its structure. The output has variables and dimensions, optimizers, payoffs, sensitivities, import/export blocks, sim_specs, and the module tree. It is the same ModelIndex that the GUI, validate, and run all read. --json prints the full structure. Without it, the command prints a short count summary.
Usage:
experimenter inspect [-h] [--json] <model>Arguments:
model: Stella model file (.stmx)
Options:
-h,--help: show this help message and exit--json: print the model structure as one JSON object on stdout (otherwise a short plain-text summary)
Exit codes:
| Code | Meaning |
|---|---|
0 | the model parsed |
2 | the command could not read the model file, the file is not well-formed XML, or the command could not resolve a module reference in it |
Example:
experimenter inspect model.stmx --json | jq '.optimizers'run
Validate the Experiment, then execute it on isolated copies of the model.
Each launch writes one Batch record (batch.json) and
collects the results into one Output.csv at the top of each scope. The
command refuses a file with validation errors. It takes an .expt file only
and exits with status 2 on any other file. A dataset axis sweeps the same unit
across every dataset, each into its own output subtree.
Every launch writes below <output root>/<experiment>/. With
output_increment off, the command first deletes everything in that folder.
Then the folder holds only the files of this launch. The
--enabled-sequences option deletes it once for all Sequences, and
--resume deletes nothing. Experimenter does not touch the folder of another
Experiment. When that clear would delete the batch folder of another launch, such
as a sibling Sequence, --dry-run prints one Warning: line for each such
folder and names it. The command clears a folder only when it holds a batch.json.
It refuses a folder with files and no batch.json, and deletes nothing.
--dry-run prints one Refused: line that names the folder. Move the files,
remove the folder, or set output_increment on. With output_increment on, the command writes a new numbered
output root.
run takes an Experiment document (.expt). It runs one section
of the document. This is the section that the GUI runs from that tab, with the
same output. Name the section with --section: run, sensitivity,
optimization or sequence:<name>. When only one section has content,
--section is optional. When several have content, run stops with exit
status 2 and lists them. --group, --run, --engine, --quiet, --json
and --dry-run apply to the chosen section.
run --enabled-sequences runs each enabled Sequence of a .expt in list
order, as Run Enabled Sequences does in the GUI. A Sequence that fails or that
run refuses does not stop the next one. run prints one block per Sequence,
then a list of name: status lines. The status is ok, failed, refused or
skipped.
Before the first Sequence starts, run adds up the estimated output of the
Sequences that write to one volume. It refuses each Sequence whose share does
not fit in the free space of that volume. Before each Sequence starts, run
also checks that its own estimate fits, as a single run of that Sequence does.
A Sequence that does not fit is refused and the next one still runs. A
Sequence whose output folder is not writable is failed and the next one still
runs. --dry-run skips these checks.
Ctrl-C stops the Sequence in flight and skips the rest. Two Sequences that
write to one output folder refuse the whole launch. The flag does not combine
with --section, --group or --run. With --json, stdout carries
{"sequences": [...]}, one entry per Sequence. With --dry-run, run prints
each plan and runs none.
--dry-run opens its plan with an Engine: header. The header names the
engine when every job uses the same one. When jobs differ, it reads Engine: mixed (architect 5, experimenter 2), with a count for each engine. A Sequence that
sets its engine: gets Engine: <engine>, Sequence override. So does a
Sequence launch with --engine. Each job line then names its engine.
With --dry-run --json, engine holds the header engine. mixed_engines
holds the counts, or null. engine_override holds the engine that overrides
every stage, or null when none does.
run streams one line per job start and finish. --quiet suppresses these
lines. Under --json they move to stderr, so stdout carries only the JSON
object. Then run prints one summary line per job, ok or FAILED. Ctrl-C
stops the run (Monitor). The shape of the
--json object is in Outputs & Manifest.
Before the first job, run compares the model with the model that the
previous batch recorded. If variables were added, removed or edited, it
prints one warning block on stderr that names them. Then it runs as usual. The
exit status does not change. --dry-run prints the same warning and writes
nothing. See Model changes between
batches.
The launch also compares the environment with the previous Batch of the same Experiment file. It prints one warning for each component whose version or path differs, and one if the Experiment file changed. A plain run never stops for a difference. See Drift warnings.
Two Trust settings can stop a
launch: Refuse a launch with uncommitted inputs, and Runs need an approved
plan. Both are off by default. The trust and approve commands set and
satisfy them.
On the Experimenter engine, run starts several jobs at once. The
count is --workers, then the workers: key of the file, then the saved
preference (settings --workers), then the physical cores minus one. If the
memory of one job does not fit the count, run lowers the count. It then
prints a warning with the figures behind the new count. The warning shows under
--quiet. Output is the same at every count. See Parallel Experimenter engine
Runs.
An agent runs --dry-run --json first and reads job_count in the plan. It
then runs with --max-runs set to the number the person approved, and reads
the finished jobs with results. run_count counts simulations, as far as
the plan knows. --max-runs does not bound it.
Usage:
experimenter run [-h] [--section SECTION] [--enabled-sequences] [--engine ENGINE] [--workers N] [--timeout SECONDS] [--max-runs N] [--group NAME_OR_ID] [--run NAME] [--quiet] [--dry-run] [--json] [--detach] [--resume FOLDER] [--fail-on-checks] [--progress-log] <experiment>Arguments:
experiment: Experiment (.expt)
Options:
-h,--help: show this help message and exit--section SECTION: which section of an Experiment document (.expt) to run: ‘run’, ‘sensitivity’, ‘optimization’ or ‘sequence:’. Optional when only one section has content; required when several do --enabled-sequences: run every enabled Sequence of an Experiment document (.expt), in list order. A failed or refused Sequence does not stop the next. Prints one block per Sequence and a verdict list; exit 1 when any Sequence did not succeed. Not allowed with –section, –group or –run--engine ENGINE: engine to run with (overrides every Run’s and Group’s own engine for this launch, Optimization groups included). The names are architect, professional, simulator and experimenter. On a Sequence it overrides the engine of every stage, as the Sequence engine does. The saved Runs and Groups keep their keys--workers N: how many jobs may run at the same time on an engine that allows it (the Experimenter engine); overrides the file’s workers: key and the Settings value. Default: one fewer than the number of physical CPU cores, lowered when one job’s memory would not fit 70% of physical memory N times. Architect runs one job at a time whatever N is--timeout SECONDS: stop a job that takes longer than SECONDS (per job, not per batch). Overrides the file’s timeout: key and every group, Run, step and Sequence timeout: for this launch. A job that is stopped fails, and the usual retries apply. Does not set calibration_timeout--max-runs N: refuse to start when the resolved plan holds more than N jobs: exit 2, one stderr line with both numbers, nothing written. Counts jobs (plan entries) only: every dataset lane and, with –enabled-sequences, every Sequence. A calibration step counts as one job, and optimizer evaluations and Sensitivity samples are not counted, so it does not bound run_count. Scripts do not count. Ignored with –dry-run, which starts nothing--group NAME_OR_ID: run only this group’s Runs (by group name or stable id); not allowed for a sequence configuration--run NAME: run only this Run, by name (repeatable, pass –run more than once to run several Runs as one ordered set, matching the GUI’s multi-select; narrows the whole list or the selected –group). In a chained group, name the first Run or Runs 1 to k. Not allowed for a sequence configuration--quiet: suppress the per-job progress lines (started / finished)--dry-run: resolve the whole pre-engine pipeline and print the plan (model, jobs in execution order, data files, the Output.csv layout and columns, and the size estimate) without launching Stella or writing anything to disk--json: print one machine-readable JSON summary on stdout after the run (progress lines then go to stderr). The summary holdsbatch_idandrecord_hash, theidandrecord_hashof the batch.json that the run wrote, and null for both when it wrote none. It also holdsversions, an object withexperimenter,stella_rulesandstella, copied from theenvironmentsection of that batch.json. Each key is null when the run wrote no record, or when the record has no value for it. With –dry-run, print the resolved plan as JSON instead--detach: start the run in a detached process and return once the child has written its batch.json, which takes about a second and at most 30 seconds. Prints one JSON object with the output folder, the process id, the log file, theresultscommand that reads the folder while the run goes on, andbatch_idandrecord_hashfrom that batch.json (null for both when the child ended or wrote none within the wait). Validation and scope errors still end the command with their usual exit code, before anything starts. The child writes detached.log in the output folder. A run into a folder that a detached run still writes is refused. With –enabled-sequences, one child runs every enabled Sequence. The JSON then lists each output root and the folder of each Sequence, and lists underrefusedeach Sequence that validation refused, which does not start. There is no cancel command--resume FOLDER: continue an interrupted batch in FOLDER, the output folder it was writing (the batch folder, or the output root above it). Jobs whose entry in the Batch record says ok and whose output exists are kept and not run again. Every other job, a partial one included, runs from a fresh copy, and the collated output covers all jobs. A job that ended failed stays failed. Refuses, with the job named, when the configuration or the model changed since the interruption, when a detached run still writes the folder, or when the batch already finished. Covers a simulation or sensitivity batch, or one –group of it. Not allowed with –run, –detach, –dry-run, –max-runs or –enabled-sequences--fail-on-checks: exit 4 when every job succeeded and an acceptance check of a Run failed. Without it a failed check does not change the exit code. batch.json andexperimenter resultsgive each check result either way. With –enabled-sequences, exit 4 comes after exit 3 and exit 1. With –detach the parent returns before the checks run, so only the child gets exit 4--progress-log: also write each progress event as one JSON line to progress.ndjson in the batch output folder. With –enabled-sequences, it writes one file in the folder of each Sequence
Exit codes:
| Code | Meaning |
|---|---|
0 | every job succeeded |
1 | at least one job failed, or a Script stage exited nonzero and does not set continue_on_error. With --enabled-sequences, a Sequence is failed or skipped, or a check other than validation refused it (no active stage, too little disk space) |
2 | the file could not be loaded, or an argument named something the Experiment does not have (an unknown --section, --group or --run, --group/--run given for a Sequence, or a --run selection in a chained group that skips a Run it depends on). A sequence has nothing active to run, or the output folder is not writable. The beta gate refused, no engine is on this machine, or the plan is above --max-runs. With --enabled-sequences, no Sequence is enabled, two write to one folder, or a scope flag is also given. Each prints on stderr and prints no JSON |
3 | validation refused the run, with the errors validate reports. --json, and a detached launch, print the findings object (configuration, status, messages) on stdout. With --enabled-sequences, validation refused a Sequence. The other Sequences still run, and each refused entry of --json holds its messages. A detached --enabled-sequences launch starts the other Sequences and lists each refused one under refused, with its messages. It starts none when validation refuses every Sequence, and then prints the findings object |
4 | The command has --fail-on-checks, every job succeeded and an acceptance check of a Run failed. This holds for a Batch, a Sequence and --enabled-sequences, where exit 3 and exit 1 come first. A detached launch returns before the checks run, so only its child exits 4 |
130 | interrupted a second time by Ctrl-C, or stopped before the collation. Stop or Ctrl-C landed after the last Run of a Batch, a dataset axis or a Sequence. Every job reads ok, and the combined Output.csv may not exist |
Examples:
experimenter run experiment.expt
experimenter run --engine experimenter experiment.expt
experimenter run --group Baseline experiment.expt
experimenter run --run fit-alpha --run fit-beta experiment.expt
experimenter run --json experiment.expt | jq '.jobs[] | select(.status != "ok")'node-add
Create a new, empty node in the model that the Experiment holds. The node is
an optimizer, a payoff, or a sensitivity routine, chosen by plane. The node
carries only a name. Its settings come afterward, through the GUI.
Usage:
experimenter node-add [-h] [--json] <experiment> <plane> <name>Arguments:
experiment: Experiment (.expt)plane: which kind of node to createname: name for the new node
Options:
-h,--help: show this help message and exit--json: print one machine-readable JSON summary on stdout instead of plain-text lines
Exit codes:
| Code | Meaning |
|---|---|
0 | the command wrote the model (and, for node-rename, the Experiment) |
1 | the named node already exists (node-add) or does not exist (node-remove, node-rename). Or the new name of a node-rename matches an existing name, which is a model node or a name that the map of this Experiment already carries for the plane |
2 | the command could not load the file, the Experiment names no template model (or the model file does not exist), or (node-rename only) the command could not read the YAML of the Experiment. In that case the command writes nothing, the model included |
Example:
experimenter node-add experiment.expt sensitivity "Wide Sweep"node-remove
Delete a node from the model that the Experiment holds, chosen by plane. If
the removed node was the active selection of the plane, --active-removed clear
(the default, as in Remove in the GUI) drops the selection. clamp selects
whatever slid into the removed slot.
Usage:
experimenter node-remove [-h] [--active-removed ACTIVE_REMOVED] [--json] <experiment> <plane> <name>Arguments:
experiment: Experiment (.expt)plane: which kind of node to deletename: name of the node to delete
Options:
-h,--help: show this help message and exit--active-removed ACTIVE_REMOVED: what happens to the list’s active selection when the REMOVED node was the active one: ‘clear’ drops the selection so nothing is silently armed (the default, matching the GUI’s Remove), ‘clamp’ selects whatever slid into the removed slot--json: print one machine-readable JSON summary on stdout instead of plain-text lines
Exit codes:
The same table as node-add.
Example:
experimenter node-remove experiment.expt optimizer "Old Fit"node-rename
Rename a node in the model that the Experiment holds, and follow every
reference to it. A payoff rename relabels the link of every optimizer to that
payoff. The command also rewrites the YAML of the Experiment, so a Run
selector, an override map key, or a payoff_name override all follow the new
name. The command leaves a reference that it cannot resolve alone and prints
it as an [info] line. It never blocks. With ruamel.yaml available
the YAML rewrite keeps comments and layout. Without it, the command uses plain
PyYAML and warns before it writes. The command
rewrites the file only when the rename changed something in it.
Usage:
experimenter node-rename [-h] [--section id] [--json] <experiment> <plane> <old-name> <new-name>Arguments:
experiment: Experiment (.expt)plane: which kind of node to renameold-name: the node’s current namenew-name: the node’s new name
Options:
-h,--help: show this help message and exit--section id: the .expt Experiment section (an ‘optimizations:’ entry id) whose config-side optimizer/payoff references get updated; needed only for an optimizer or payoff rename in a document that defines more than one, and refused for a sensitivity rename--json: print one machine-readable JSON summary on stdout instead of plain-text lines
Exit codes:
The same table as node-add.
Example:
experimenter node-rename experiment.expt payoff "Old Name" "New Name"results
Read back what a finished run wrote. These are the facts that the GUI Monitor
shows after a run. run-folder is the output folder of a run: the batch
folder, a Sequence folder, or the folder of one job. The command prints the
status, mode, attempt count and Detail text of each job. It also prints each
Sequence stage and every collated file (Output.csv by default) with its row
count, column list and layout. The entry of a wide file adds steps, the
number of time-step columns. Its row count is the number of job-variable rows.
The Detail text is the same text the Monitor shows. It is a convergence note
and best payoff for an optimization job, and the failure evidence for a failed
job. --json prints the same data as one object with the keys folder,
status, jobs, sequences and outputs. Later versions add keys and never
rename one. Each job also prints its write list. This is a table of variable,
base value, Job value and source, the same rows as the Write List in the
Monitor. In --json each job object carries the list as writes, an array of
rows, or null when the Batch record holds no list. A Script
step is a job entry too. A Script that failed under continue_on_error keeps
its own failed row and does not make the folder failed. The command
refuses a record whose format key is not 3 and names the key. The command
reads files only. It starts no run and writes nothing.
Usage:
experimenter results [-h] [--json] <run-folder>Arguments:
run-folder: a run’s output folder (the batch folder, a Sequence folder, or one job’s folder). A folder that arun --detachchild is still writing reads as status ‘running’, with the jobs finished so far, and exits 0
Options:
-h,--help: show this help message and exit--json: print one machine-readable JSON object on stdout instead of plain text
Exit codes:
| Code | Meaning |
|---|---|
0 | the folder holds a Batch record and no job failed |
1 | at least one job or Sequence failed |
2 | the folder does not exist, or holds no batch.json |
Examples:
experimenter results Output/Experiment
experimenter results --json Output/Experiment | jq '.jobs[] | select(.status != "ok")'record
Print the Batch record of one Batch folder. batch-folder is the folder that
holds batch.json. Without --json, the command prints a summary: the Batch
id, status, Experiment, scope, engine, launch and end times, each component of
the environment with its version and source, and the status of each job.
--json prints the batch.json document as it is on disk. The record holds
metadata only. The command reads batch.json and no result file, so it never
opens an Output.csv. It refuses a folder with no batch.json and a record
whose format key is not 3. Over MCP, op record of the monitor tool
returns the same document. The command starts no run and writes nothing.
Usage:
experimenter record [-h] [--json] <batch-folder>Arguments:
batch-folder: the Batch folder that holds batch.json
Options:
-h,--help: show this help message and exit--json: print the batch.json document on stdout instead of the plain-text summary
compare
Compare the collated outputs of two finished Batch folders per series and step.
Each argument is a Batch folder that holds batch.json. A bundle zip is
refused: bundle verify owns bundles. The command runs no engine, writes no
file and adds no journal entry.
A is the reference. The relative difference of a step divides by the value of A, and A gives the order of the rows. Swapping the two folders can change a verdict near the bar.
The command pairs the collated files that the two records name by their path in
the Batch folder, then pairs the series. A series is one variable of one Run.
Its key is the source, dataset, sequence, level, group and sample
cells and the variable name. The key leaves out engine, started_at,
batch_id and record_hash, so a Stella Batch and an Experimenter engine Batch
of one Experiment pair. A long file and a wide file pair as well. Rows with
source_kind saved_run are observed data that only Stella writes. The command
leaves them out and counts them.
For each step, floor = max(floor_fraction * max|a|, 1e-12), where max|a| is
the largest finite absolute value of the series in A. The relative difference is
rel = |b - a| / max(|a|, floor). A step passes when rel <= rtol, and a series
passes when every step passes. --rtol sets the bar and defaults to 1e-6.
--floor sets the floor fraction and defaults to 1e-6. The floor lets a series
that crosses zero pass on noise near zero. The bar is pointwise, so it is
stricter than the range-normalized bar of bundle verify at the same number.
--exact passes a step only when the two cells hold equal text. It still sizes
each differing step with the rule above. --exact and --rtol cannot be given
together. NaN in both cells passes. NaN in one cell fails. Equal infinities pass.
A text cell or a blank passes only on equal text.
A step pairs by the value of its time cell. A series whose time points differ
fails with the note time points differ. A series in one Batch only fails with
the note missing in A or missing in B.
The plain text names the engine of each Batch as batch.json records it, the
rule, the counts, the worst series with its worst time and the first time past
tolerance, and the failing series, worst first. --top caps that list at 10
rows, and 0 lists all. --json prints one object with the keys a, b,
rule, outcome, exit_code, counts, worst and series. It lists every
series, passing ones included. An infinite max_rel is the string inf. Over
MCP, op compare of the monitor tool takes folder_a, folder_b, rtol and
exact and returns the same object.
Usage:
experimenter compare [-h] [--rtol RTOL] [--exact] [--floor FLOOR] [--top TOP] [--json] <batch-a> <batch-b>Arguments:
batch-a: the reference Batch folder, the one that holds batch.jsonbatch-b: the Batch folder to measure against A
Options:
-h,--help: show this help message and exit--rtol RTOL: the relative bar of one step, default 1e-06. A is the reference, so swapping the two folders can change a verdict near the bar--exact: pass a step only when the two cells hold equal text. Each differing step still gets a size--floor FLOOR: the floor of the denominator as a fraction of the largest |A| of the series, default 1e-06 (never below 1e-12)--top TOP: list at most this many failing series, worst first, default 10. 0 lists all. –json lists every series--json: print one machine-readable JSON object on stdout instead of plain text
Exit codes:
| Code | Meaning |
|---|---|
0 | pass: every paired series passes, and no file or series is missing |
1 | fail: a series fails, a series or a file is missing, or the time points differ |
2 | unreadable: a folder does not exist or holds no batch.json, or a collated file cannot be read as an Output.csv |
3 | incomplete: a record is still queued or running, or no series pairs |
approve
Approve a dry-run plan by its hash. run --dry-run prints the plan and its
plan_hash. The hash covers the resolved plan, the sha256 of the .expt, of
the model and of each resolved import file. It holds paths relative to the
folder of the .expt, so a clone in another folder gets the same hash. An edit
of the Experiment, the model or a data file gives a new hash.
Approvals that an earlier build wrote match no plan now. Run run --dry-run
and give the new hash to this command.
The command writes an approve entry with the hash to the journal beside the
Experiment. The Approve button of the Dry run window writes the same entry.
Turn on the Trust setting Runs need an approved plan to use it. Then a launch
with no entry for its plan hash refuses with one line that names the hash.
The command does not compare the hash with the current plan. A launch compares its own hash. An MCP agent can read the hash of a dry run. No MCP tool approves a plan, and the command refuses a call from an MCP agent. When an MCP agent starts a launch, the refusal does not show the hash or this command.
Approval stops an agent that has MCP access only. The command cannot tell whether a person or an agent types it in a shell of your user account. An agent that runs shell commands as you can run this command too.
Usage:
experimenter approve [-h] <plan-hash> <experiment>Arguments:
plan-hash: the plan_hash that run –dry-run printsexperiment: the Experiment (.expt) of the plan
Options:
-h,--help: show this help message and exit
Exit codes:
| Code | Meaning |
|---|---|
0 | the command wrote the approve entry |
2 | no entry. The path is no Experiment, the hash has the wrong form, an MCP agent called, or the write failed |
Example:
experimenter approve 3f9a1c2d4e5b6a7980f1e2d3c4b5a69788796a5b4c3d2e1f0a9b8c7d6e5f4a3b experiment.exptreproduce
Re-run a finished Batch from its record and compare the results. Give a Batch
folder, the folder that holds batch.json. The record gives the Experiment
file, the section, the engine, the output layout and the seeds. The command
re-runs into a temporary folder and removes it at the end. It compares each
collated file with the re-run, as bundle verify does.
Before the re-run, the table shows what the record holds and what the command
finds now. It checks the hash of each output file, the sha256 of the .expt,
the git commit and the journal head. A changed .expt still re-runs, but the
outcome is at best incomplete. A git or journal difference is a warning.
The record row fails when the environment or launch section of
batch.json no longer gives its record_hash, because someone edited the
record after the launch. This build has one collation merge. A collation_merge
key in an old record has no effect on the re-run.
The match policy of the record decides what a version difference does. A
record with no policy takes the Default match for new bundles. A refuse
component that differs stops the command before the re-run. The re-run covers
the Runs that the record names.
Give a bundle zip and the command gives the result of bundle verify. For a
Batch folder, the command writes nothing into the folder and no journal entry.
Usage:
experimenter reproduce [-h] [--run-scripts] [--json] <batch-or-bundle>Arguments:
batch-or-bundle: a Batch folder that holds batch.json, or a bundle zip
Options:
-h,--help: show this help message and exit--run-scripts: run the Scripts of the Experiment during the re-run. Without this flag reproduce runs no Script, reports incomplete (exit 3) and names each one--json: print the table and the outcome as one JSON object on stdout
Exit codes:
| Code | Meaning |
|---|---|
0 | pass: every file and the .expt hash match the record |
1 | fail: a file or an output hash differs, the re-run failed, or a refuse component differs |
2 | unreadable: no batch.json, no Experiment file, a bad zip, or a cancel |
3 | incomplete: the .expt changed, a Script did not run, an engine is absent, or a stochastic series has no seed |
Example:
experimenter reproduce Output/Demosettings
Print the values that the settings file holds, and the path of the file. The
values are the default engine, the three Stella binary paths, the output file
name, the output file location and the output layout. A key that the file does
not set prints as (unset). A Wide choice prints wide. The command never
fills in the default that the Settings window shows, and it does not read the
EXPERIMENTER_ARCHITECT_BINARY override.
Use --workers or --clear-workers to change the saved worker count. To
change another of these values, use the Settings window or edit the file. The
trust command prints and changes the Trust settings.
Usage:
experimenter settings [-h] [--workers N] [--clear-workers] [--json]Options:
-h,--help: show this help message and exit--workers N: save N (1 or more) as the worker count every launch uses unless an Experiment’s workers: key orrun --workerssets its own--clear-workers: remove the saved worker count, so launches use the default--json: print one machine-readable JSON object on stdout instead of plain text
Exit codes:
Exits 0. A missing settings file prints every key as (unset).
Example:
experimenter settings --json | jq '.values'trust
Print the Trust settings, or change them. The first two are Refuse a launch with uncommitted inputs and Runs need an approved plan. The third is the default match of each component for new bundles. Each shows the value that a launch uses. The Trust tab of the Settings window sets the same values.
Give --refuse-dirty-inputs or --require-approved-plan the value on or
off. Give --bundle-match an item component=level:action, as for
bundle create --match. An item with only a level or only an action keeps the
other part. Use --clear-bundle-match to remove the saved match of one
component.
No MCP tool changes a Trust setting, and the agent tool list leaves this command out. An agent with MCP access only cannot turn off a refusal.
Usage:
experimenter trust [-h] [--refuse-dirty-inputs REFUSE_DIRTY_INPUTS] [--require-approved-plan REQUIRE_APPROVED_PLAN] [--bundle-match COMPONENT=LEVEL:ACTION] [--clear-bundle-match COMPONENT] [--json]Options:
-h,--help: show this help message and exit--refuse-dirty-inputs REFUSE_DIRTY_INPUTS: save the Trust setting Refuse a launch with uncommitted inputs--require-approved-plan REQUIRE_APPROVED_PLAN: save the Trust setting Runs need an approved plan--bundle-match COMPONENT=LEVEL:ACTION: save the default match of one component for new bundles, as in stella=exact:refuse, stella=exact or stella=refuse. Repeat it for each component--clear-bundle-match COMPONENT: remove the saved default match of one component, so it takes the built-in value--json: print one machine-readable JSON object on stdout instead of plain text
Exit codes:
| Code | Meaning |
|---|---|
0 | the command saved the options it names and printed the Trust settings |
2 | an option has a bad value. The command saved nothing |
force-close
Kill a stuck Stella instance immediately, for a machine with no one at the GUI to click Force Close. Unsaved Stella work is lost.
Usage:
experimenter force-close [-h] [--engine NAME]Options:
-h,--help: show this help message and exit--engine NAME: the Stella edition to close: architect (the default), professional or simulator
Exit codes:
| Code | Meaning |
|---|---|
0 | no instance was running, or the command killed it |
1 | the instance survived the kill |
2 | process control does not support this platform (POSIX only) |
Example:
experimenter force-closelicense
Install the license block from your email, or print the license this
build reads. A licensed build refuses every other command until a
license that opens it is installed. force-close, gui, license, settings, terms, tools, --help and --version work without
one (see Licensed builds). A build without the license gate never reads the
license file.
Usage:
experimenter license [-h] {install,show} ...Options:
-h,--help: show this help message and exit
license install
Verify the license file and install it beside the settings file. This is the step that the File menu of the GUI takes, for a machine with no GUI. The command refuses a file that it cannot read, that did not verify, or that needs a newer version of Experimenter. The installed license stays as it was. The command also refuses a file whose term ends before the term of an installed license that still opens. The command then prints the license id, the term end and the state that the build now reads. A replacement file installed this way opens the build at once.
Usage:
experimenter license install [-h] [<license-file>]Arguments:
license-file: a file that holds the license block from your email (experimenter-<license_id>.json), or-to read the block from standard input
Options:
-h,--help: show this help message and exit
Exit codes:
| Code | Meaning |
|---|---|
0 | the command installed the license and it opens this build |
1 | the command installed the license, but it does not open this build. Its state is needs_renewal or revoked |
2 | nothing was installed: the build reads no license file, the file could not be read, or the file was refused |
Example:
experimenter license install experimenter-L-0123456789AB.jsonlicense show
Print the installed license. The output has the holder, license id, plan, seat, issue date, term end, days left, contact address, the state, and the latest date that the app remembers. A file that did not verify shows its state and no other field. From 30 days before the term end, and after it, the output also carries the warning line that each gated command prints on stderr.
Usage:
experimenter license show [-h] [--json] [--block]Options:
-h,--help: show this help message and exit--json: print one machine-readable JSON object on stdout instead of plain text--block: print the installed license as a block, to install on a second machine
Exit codes:
| Code | Meaning |
|---|---|
0 | the license opens this build, or the build reads no license file |
1 | the license does not open this build: none is installed, or it needs renewal (needs_renewal), is withdrawn (revoked), is unreadable, did not verify, or needs a newer version |
Example:
experimenter license show --json | jq '.state'terms
Print the Experimenter terms, or accept them. A gated build refuses every other command
except gui until you accept the current terms version. An ungated build checks no
terms. terms accept stores the same accepted version that the terms
screen of the app stores. An agent cannot accept for a person, so terms is not in the tool schema.
Usage:
experimenter terms [-h] {show,accept} ...Options:
-h,--help: show this help message and exit
terms show
Print the terms text and its version, then the accepted version stored in
the settings file, or none.
Usage:
experimenter terms show [-h]Options:
-h,--help: show this help message and exit
Exit codes:
Exits 0, or 2 when the bundled terms text cannot be read.
Example:
experimenter terms showterms accept
Store the current terms version as accepted. A CI or server host runs this once per settings directory, before its first command. Accepting a newer terms version later takes another run of this command.
Usage:
experimenter terms accept [-h]Options:
-h,--help: show this help message and exit
Exit codes:
| Code | Meaning |
|---|---|
0 | the command stored the current terms version as accepted |
2 | the command could not read the terms text, or could not read or write the settings file |
Example:
experimenter terms acceptbundle
Pack an Experiment, its model, its data files and one batch of output into a
zip. Check a zip by running it again, or unpack a zip. A bundle lets a reader
check that the files give the same outputs. bundle open only unpacks. To
open the Experiment in the app, run experimenter gui <path>.
Usage:
experimenter bundle [-h] {create,verify,open} ...Options:
-h,--help: show this help message and exit
bundle create
Write <Experiment>-bundle-<date>.zip into --out (default: the folder of the
Experiment). The file table prints on stderr before the write. --dry-run
prints the table and writes nothing. --exclude leaves a file out of the zip
and records it as withheld, so bundle verify reports incomplete. A size
warning prints and does not refuse. create never overwrites a zip.
Usage:
experimenter bundle create [-h] [--batch FOLDER] [--section SECTION] [--exclude PATH] [--out DIR] [--match COMPONENT=LEVEL[:ACTION]] [--dry-run] [--json] <experiment>Arguments:
experiment: Experiment document (.expt)
Options:
-h,--help: show this help message and exit--batch FOLDER: the batch folder to bundle (the folder that holds the job folders). Default: the latest batch of this Experiment--section SECTION: the section the batch came from (run, sensitivity or optimization). Needed only when the batch records fit more than one--exclude PATH: withhold a file from the zip: a path under files/ or a glob. Repeatable. A withheld file is listed in bundle.json and verify reportsincomplete--out DIR: folder to write the zip into (default: the Experiment’s folder). An existing zip of the same name is never overwritten--match COMPONENT=LEVEL[:ACTION]: set the match policy of one component for this bundle, for example stella=exact:refuse. Levels: exact, major.minor, any. Actions: warn, refuse. Components: experimenter, experimenter_engine, stella, python, rscript. Repeatable. Without it the bundle takes the Trust default, which warns on every component. bundle verify and reproduce refuse on arefusecomponent; a plain run only warns--dry-run: print the file list and the warnings, and write nothing--json: print one machine-readable JSON object on stdout instead of the plain-text table
Exit codes:
| Code | Meaning |
|---|---|
0 | the command wrote the zip, or with --dry-run planned it |
2 | the command wrote nothing. It could not read the Experiment or batch, the batch section is ambiguous, an --exclude matched nothing, or the zip exists |
Examples:
experimenter bundle create Study.expt --dry-run
experimenter bundle create Study.expt --out Share --exclude files/Data/private.csvbundle verify
Unpack the bundle into a temporary folder and check every sha256. Run the
model again with the recorded engine and compare every output column. The
command prints the table and one final line, outcome: <word>. The run can
take as long as the original batch. Ctrl-C stops it.
Usage:
experimenter bundle verify [-h] [--run-scripts] [--json] <bundle>Arguments:
bundle: a bundle zip
Options:
-h,--help: show this help message and exit--run-scripts: run the Scripts of the bundled Experiment during the re-run. A bundle comes from another person and a Script is a program that runs with your rights. Without this flag verify runs no Script, reports incomplete (exit 3) and names each one--json: print the table and the outcome as one JSON object on stdout
Exit codes:
| Code | Meaning |
|---|---|
0 | pass: every output matched |
1 | fail: a file or an output differs |
2 | unreadable: the file is not a bundle, the zip is unsafe or too new, or the disk is too small |
3 | incomplete: a file was withheld, or only the hash check could run |
130 | interrupted by Ctrl-C |
Example:
experimenter bundle verify Share/Study-bundle-2026-10-06.zip --json | jq '.outcome'bundle open
Unpack the bundle into dest-folder. Check the sha256 of each file while it
unpacks, print one warning for each mismatch, then print the path of the
Experiment inside. The command never starts the app and never writes into a
folder that exists.
Usage:
experimenter bundle open [-h] [--json] <bundle> <dest-folder>Arguments:
bundle: a bundle zipdest-folder: the folder to create. It must not exist
Options:
-h,--help: show this help message and exit--json: print one machine-readable JSON object on stdout
Exit codes:
| Code | Meaning |
|---|---|
0 | the command unpacked the bundle. A hash mismatch prints a warning and keeps this code |
2 | the command unpacked nothing. The destination exists, or the zip is not a readable bundle |
Example:
experimenter bundle open Share/Study-bundle-2026-10-06.zip Study-copygui
Launch the editor and run monitor. You can open an Experiment file with it. A file picker opens if you give none.
Usage:
experimenter gui [-h] [<experiment>]Arguments:
experiment: Experiment (.expt); a picker opens if omitted
Options:
-h,--help: show this help message and exit
Exit codes:
Exits 2 when the GUI dependencies are not installed.
A licensed build with no license that opens it still starts the window. The landing shows the refusal and opens no file. Use File, Install License.
Example:
experimenter gui experiment.exptcall
Run one command of the command layer. The commands list of tools --json
names them. The --args option gives the inputs as one JSON object. The
--expt option opens an Experiment first.
Each call is a new process. An edit stays only if the call saves it, with
--save or with document_save. A save writes the model file only when
Write changes to model file is on in Settings. The write_model input sets
it for one call.
An agent cannot change agent_connect or an agent_confirm.* setting. The
call then returns refused. With --json, the call prints one object with
command, status, result and saved.
Usage:
experimenter call [-h] [--args JSON] [--expt PATH] [--save] [--json] <command>Arguments:
command: the command id, astools --jsonlists it undercommands
Options:
-h,--help: show this help message and exit--args JSON: the inputs of the command as one JSON object (default: {})--expt PATH: open this Experiment before the command runs--save: save the Experiment after the command, with the document_save command--json: print the result as one JSON object on stdout
Exit codes:
| Code | Meaning |
|---|---|
0 | the command ran and returned its result |
1 | the command returned refused, needs_input or busy, or the save of --save did |
2 | the call did not start. The command id is unknown, --args is not a JSON object, or the Experiment did not open |
Example:
experimenter call run_set_retries --expt experiment.expt --args '{"i": 0, "value": 2}' --savemcp
Serve the MCP protocol on stdin and stdout for one agent client, such as
Claude Code or Claude Desktop. The client starts this command. The server
lists the tools of the mcp_tools list of tools --json.
With --headless, the server opens and saves Experiment files in its own
process. It needs no app window. With --attach, it drives the open app
window, and each change shows in the window. The window must have Settings ▸
Let agents connect on, or --attach exits 2.
With no flag, the server attaches when an app window lets agents connect. It
starts headless when no window does. The mode stays the same for the whole
session. When the window closes during a session, every later call returns
refused with the text “app window closed”. The server never falls back to
headless.
Some actions ask the person first. They are a model file write, a file
overwrite, a Settings change, a Batch launch and a Script command.
The server asks through the client, so the client must support elicitation.
A client without it gets refused for such an action while its switch in
Settings is on. In attached mode the app window asks the person instead, so
any client can confirm.
The server checks the license and the terms when it starts. It checks them again on every tool call, because a session can last longer than a license.
Usage:
experimenter mcp [-h] [--headless] [--attach]Options:
-h,--help: show this help message and exit--headless: work on Experiment files in this process, without the app window--attach: drive the open app window that lets agents connect
Exit codes:
| Code | Meaning |
|---|---|
0 | the client closed the session |
2 | the server did not start. No app window answered --attach, the MCP library cannot load, or the license or the terms refused |
Example:
experimenter mcp --headlesstools
Print the machine-readable schema of Experimenter’s agent tool surface, so a
program can drive Experimenter without parsing English. The scope is
read, write and run. The schema names validate, inspect, node-add, node-remove, node-rename, results, record, compare, settings, run, bundle and call, and nothing else. The schema leaves out gui and force-close on
purpose. gui opens a window and force-close kills a process. The run
entry carries notes for an agent. --max-runs bounds jobs, the plan entries. A
calibration step counts as one job, and optimizer evaluations are not
counted. A gated build refuses every command, tools included, until the
person accepts the terms. The command reads argument names, required flags, choices,
and help text off this same live parser. The --json output keys and the exit
codes of each tool are authored constants that the document records alongside,
because the parser holds neither.
The document also carries two lists read from the command registry. The
commands list names every command with the JSON Schema of its inputs and
its result. The call command runs any of them. The mcp_tools list is the
shorter list of the MCP server. Each of its tools has an op that names one
command.
The tool_list_version field versions the two lists as MAJOR.MINOR. A new
command or a new optional input raises MINOR. A removed command or a changed
type raises MAJOR. Before version 1.0 every change raises MINOR.
The --json option prints the full document. Without it, the command prints
the tool names and the two counts.
Usage:
experimenter tools [-h] [--json]Options:
-h,--help: show this help message and exit--json: print the full schema as one JSON object on stdout (otherwise a short plain-text list of tool names)
Exit codes:
Always exits 0.
Example:
experimenter tools --json | jq '.tools[].name'Exit codes for every command
Terms guard
A gated build exits 2 on every command when you have not accepted the current
terms version. Only terms show, terms accept, gui, --help and --version work without
acceptance. The window shows its own terms screen. An ungated build does not check terms. Stdout stays empty. Stderr names the
two commands, terms show and terms accept. A gated build checks
the terms before it checks the license.
Licensed builds
A licensed build exits 2 before any other work, with the reason on stderr,
when no license that opens the build is installed. This applies to every
command except force-close, gui, license, settings, terms, tools, --help and --version. From 30 days before the term end, and after it, each
gated command runs and prints one warning line on stderr first.
Output on stdout, --json included, does not change.
After a beta license ends, the license reads read_only. bundle verify, reproduce and run exit
2 with the refusal on stderr, and run --dry-run is one of them. Every other
command runs and prints the warning line. A paid license never reads
read_only. Its build keeps working after the term end. Only a build
released after the term end needs a renewal (state needs_renewal, exit 2).
See also
- Experiment file: the Experiment file format
- Monitor: Stop / Ctrl-C, run status, and the log
- Outputs & Manifest: the field shape of the
--jsonobject, and where results land - Troubleshooting:
architect: binary not found, a missing engine, and Stella dialogs