Authoring Workflow¶
Demonator includes two features to streamline the process of writing and testing demo configs: dry-run mode and hot reload.
Dry-run mode¶
Preview the entire demo flow without typing animation or command execution:
Dry-run output shows:
- Each step with the configured prompt
- Chapter boundaries (if using chapters)
- Setup and teardown commands
- Annotations for special features:
[no-exec]— step won't execute the command[fake-output]— step has pre-defined output (shown indented with>)[wait-for]— step waits for a pattern[interactive]— step has expect/send interactions[conditional]— step hasiforunlessconditions[capture]— step captures output
Example dry-run output:
[setup]
mkdir -p /tmp/demo
echo 'ready'
── Setup ──
~ $ git clone git@github.com:example/myproject.git
~ $ cd myproject
── Build ──
This builds in release mode.
~ $ cargo build --release [wait-for]
~ $ cargo test
── Deploy ──
~ $ kubectl apply -f deploy.yml [conditional]
[teardown]
rm -rf /tmp/demo
Hot reload¶
Watch the config file and automatically re-run the demo when it changes:
The workflow:
- The demo runs normally (you press Enter through steps)
- After the last step, demonator prints "watching for changes..."
- Edit and save your YAML file
- The screen clears and the demo restarts automatically
- Press Ctrl+C to exit
This gives you a tight feedback loop when authoring demos — make a change, see the result immediately.
Combining both¶
A good authoring workflow:
-
Start with
--dry-runto sketch out the structure: -
Switch to
--watchto iterate on timing and output: -
Do a final run without flags to rehearse the real presentation:
Tips¶
- Dry-run is instant — use it to quickly check that your YAML parses correctly and the step order makes sense
- Hot reload polls the file every 500ms, so changes are picked up almost immediately
- Hot reload clears the screen before each re-run, so you always see a fresh start
- Setup commands still run in dry-run mode (so your environment is ready), but teardown does not