Skip to content

Examples

sarr-io edited this page Jun 19, 2026 · 9 revisions

Examples

YAML shape

circuitry: "0.8.2"
name: bash status

in:
  - $command

shell:
  status:
    surface: unix-bash.bash
    in:
      command: $command
    out:
      output: $output
      exit: $exit

out:
  - $output
  - $exit

Run it:

zn run examples/bash-status.circuitry.yaml command="pwd"

Markdown shape

---
circuitry: "0.8.2"
name: bash status

in:
  - $command

shell:
  status:
    surface: unix-bash.bash
    in:
      command: $command
    out:
      output: $output
      exit: $exit

out:
  - $output
  - $exit
---

# Bash status

The body is for humans. Zinc runs the front matter.

Run it:

zn run examples/bash-status.circuitry.md command="pwd"

Parallel ready wave

circuitry: "0.8.2"
name: parallel smoke

in:
  - $a
  - $b

batch:
  left:
    surface: unix-bash.bash
    in:
      command: $a
    command: $a
    out:
      output: $left
      exit: $left_exit

  right:
    surface: unix-bash.bash
    in:
      command: $b
    command: $b
    out:
      output: $right
      exit: $right_exit

  final:
    surface: unix-bash.bash
    in:
      left: $left
    command: pwd
    out:
      output: $done
      exit: $done_exit

out:
  - $left
  - $right
  - $done

Run it:

zn run /tmp/parallel-smoke.circuitry.yaml a="pwd" b="ls"

With runtime.parallel: 4, Zinc can run left and right in the same wave. final waits for $left.

Clone this wiki locally