Examples
Hello World
The simplest possible Shiro workflow — a great starting point to understand the structure.
Overview
This example prints two messages in sequence using the built-in print module. It demonstrates basic workflow structure, step sequencing, and DAG-based dependency ordering.
Workflow File
Save as .shiro/workflow.json:
json
{
"name": "hello-world",
"description": "My first Shiro workflow",
"steps": [
{
"id": "greeting",
"type": "print",
"config": {
"message": "Hello from Shiro!",
"level": "info"
}
},
{
"id": "done",
"type": "print",
"config": {
"message": "Workflow completed successfully.",
"level": "info"
},
"depends_on": ["greeting"]
}
]
}Run It
bash
# Via Docker (recommended)
docker run --rm -v $(pwd):/workspace -w /workspace \
ghcr.io/rajitk13/shiro-automation:latest shiro run
# Or with a local binary
shiro runExpected output
text
[Shiro] Loaded workflow: hello-world
[Shiro] Starting workflow: hello-world
[Shiro] Step greeting completed: true
[Shiro] Step done completed: true
=== Workflow Results ===
Step: greeting ✓
Step: done ✓Key Concepts
- • id — unique identifier for each step, used in
depends_on - • type — the module to run (
print,shell, etc.) - • config — module-specific input parameters
- • depends_on — ensures
doneruns only aftergreetingsucceeds