CLI Command

shiro run

Execute a workflow. Auto-detects .shiro/workflow.json by default.

Usage

bash
shiro run [flags]
shiro run -workflow <path> [flags]

Flags

FlagDefaultDescription
-workflow.shiro/workflow.jsonPath to workflow JSON file
-config.shiro/config.yamlPath to config file
-shiro-dir.shiroPath to .shiro directory
-state-storememoryState storage backend: memory, filesystem, gitlab
-freshfalseStart fresh, ignore previous state
-dry-runfalseValidate workflow without executing
-quietfalseSuppress output, only show errors

Examples

Run Default Workflow

Auto-detects .shiro/workflow.json

bash
shiro run

Run Specific Workflow

bash
shiro run -workflow .shiro/workflows/deploy.json

Run with Custom Config

bash
shiro run -config configs/production.yaml

Dry Run Mode

Validate workflow without executing

bash
shiro run -dry-run

# Output:
=== Dry Run Mode ===
Workflow will be validated but not executed
Workflow: my-workflow
Total Steps: 3

--- Execution Plan (DAG Order) ---
1. Step: step1
   Type: git.diff
   Config: 2 keys

2. Step: step2
   Type: ai.generate
   Depends On: [step1]

Quiet Mode

Suppress output, only show errors

bash
shiro run -quiet

GitLab CI with State Storage

bash
shiro run -state-store gitlab -fresh

Environment Variables

Shiro automatically picks up common CI environment variables:

  • CI_PROJECT_ID - GitLab project ID
  • CI_MERGE_REQUEST_IID - Merge request IID
  • CI_COMMIT_SHA - Commit SHA
  • CI_JOB_TOKEN - GitLab CI job token
  • GITHUB_TOKEN - GitHub token