Skip to Content
sheppyCLI reference

CLI reference

sheppy with a manifest path (or nothing) opens the TUI. If the manifest is missing or isn’t valid YAML, it prints the error and exits 1 instead. With a verb, it runs headless — the verbs never import Textual, so they work over SSH on a machine with no display.

sheppy [MANIFEST] # open the TUI (MANIFEST defaults to ./sheppy-manifest.yaml) sheppy <verb> [...] # headless: up, status, logs, restart, down, daemon sheppy --version # or -V

Verbs

sheppy up <profile> [--manifest PATH]

Bring the system to a profile. <profile> is a name: sheppy up mock reads profiles/mock.yaml next to the manifest. --manifest defaults to ./sheppy-manifest.yaml.

It prints a plan (start, restart, or stop per node), then:

  • starts selected nodes that aren’t running, and restarts ones running a different alternative, command, or params;
  • stops nodes in the manifest that the profile doesn’t select;
  • leaves nodes from other manifests alone.

All the starts go out at once, with no ordering between nodes. It then waits up to 30 seconds for every node to settle and prints each node’s final state. Running it twice in a row prints already converged the second time.

up is the only verb that starts sheppyd when it isn’t running, and the daemon keeps this terminal’s environment — see ROS integration.

Exit code: 1 if the manifest or profile can’t be loaded, if sheppyd can’t start, if any node is crashed once things settle, or if they don’t settle within 30 seconds. Recoverable problems, such as a profile selection the manifest no longer has, print as warning: on stderr and don’t stop the launch.

sheppy status

One line per node sheppyd supervises: name, state, alternative, pid, and uptime or exit code.

$ sheppy status clock running ticker pid=3948253 up 22s worker crashed flaky pid=3948421 exit=1

It exits 0 even when a node has crashed, so read the output rather than the exit code. It prints (nothing supervised) for an empty table and sheppyd: not running when there’s no daemon.

sheppy logs <node> [-n N]

Print the last N (default 50) lines of a node’s output. sheppyd keeps the last 300 lines in memory; the full per-run log files are under ~/.sheppy/logs/<node>/. Exits 1 if the node is unknown or the daemon isn’t running.

sheppy restart <node>

Restart a node, including a crashed one, with the command it was launched with. restart doesn’t pick up manifest edits; use sheppy up for that. Exits 1 if the node is unknown or the daemon isn’t running. sheppy woof, its old name, still works.

sheppy down

Stop every node sheppyd supervises, from any manifest, printing stopped <node> for each, then stop the daemon itself. Exits 0 even if the daemon wasn’t running.

There’s no headless verb to stop or start a single node. Use x and space in the TUI, or sheppy up a profile that doesn’t select that node.

sheppy daemon status / sheppy daemon stop

status reports whether sheppyd is running and how many nodes it supervises. stop stops the daemon and leaves the nodes running; the next launch starts a new daemon, which re-adopts them. That is the difference from sheppy down, which stops the nodes too.

Recipes

Bring up a profile and look at it:

sheppy up mock; sheppy status

Find out why a node crashed, then try again:

sheppy status # which node, and its exit code sheppy logs camera -n 200 # its last output sheppy restart camera

Apply a manifest edit to a running system:

sheppy up mock # restarts only the nodes whose command changed

Start over with a different shell environment:

sheppy down source /home/me/ws/install/setup.bash sheppy up mock

Exit codes at a glance

SituationCode
Success0
TUI: manifest missing or not valid YAML1
Daemon not running — down, status, daemon0
Daemon not running — logs, restart1
Unknown node (logs, restart)1
up: manifest/profile failed to load, sheppyd couldn’t start, a node crashed, or settle timeout1

sheppyd

You normally never run the daemon yourself — the first launch action spawns it. Running sheppyd by hand starts it in the foreground: it takes the single-instance lock, re-adopts surviving children, and serves on the local socket until SIGTERM/SIGINT. See the sheppyd guide for its lifecycle, configuration, and protocol.

Environment

VariableEffect
SHEPPY_HOMEPin logs, state, config, and the socket under this directory instead of ~/.sheppy (the socket otherwise prefers $XDG_RUNTIME_DIR). Useful for test isolation. Keep it short: the socket path must fit in 107 bytes, or sheppyd won’t start.
NO_COLORSet to any non-empty value to turn off the colors in the headless verbs’ output. They’re already off when output goes to a pipe or file.
COLORTERM=truecolorRequired for the TUI’s full palette over SSH — see colors washed out over SSH?

Edit this page on GitHub