CLI Guide

The shmpipeline CLI provides four headless workflows:

  • validate a pipeline config

  • describe the derived graph

  • run a pipeline until interrupted or for a bounded duration

  • serve one pipeline manager over HTTP and SSE

Validate

shmpipeline validate pipeline.yaml

This loads the YAML, validates graph constraints, and checks each kernel binding against the registered kernel set without creating shared memory.

Describe

shmpipeline describe pipeline.yaml
shmpipeline describe pipeline.yaml --json

This derives the graph before worker startup. The JSON form is useful for automation and external tooling.

The graph payload includes:

  • shared-memory definitions and roles

  • upstream and downstream kernel dependencies

  • source streams, sink streams, and orphaned streams

  • directed graph edges between streams and kernels

Run

shmpipeline run pipeline.yaml
shmpipeline run pipeline.yaml --duration 5.0
shmpipeline run pipeline.yaml --duration 5.0 --json-status

The run command builds shared memory, starts workers, polls runtime status, and shuts the pipeline down on exit.

Serve

shmpipeline serve pipeline.yaml
shmpipeline serve pipeline.yaml --host 127.0.0.1 --port 8765
shmpipeline serve pipeline.yaml --host 0.0.0.0 --port 8765 --token change-me

The serve command hosts one PipelineManager behind a small HTTP control plane.

Use it when you want:

  • a remote status endpoint for scripts or dashboards

  • lifecycle control from another process or machine

  • a stable bridge between the in-process manager API and external tooling

See control plane for the endpoint model and Python client example.

Logging

Set CLI verbosity with --log-level:

shmpipeline --log-level DEBUG describe pipeline.yaml

Supported values:

  • DEBUG

  • INFO

  • WARNING

  • ERROR