Quickstart
Installing shep and getting a flock running takes about two minutes.
Already running pm2? Start at Coming from pm2 instead.
./server is your own binary or start script, and shep writes neither: point script at something that already exists or the start fails to spawn. Nothing to hand yet? shep serve ./site puts a real sheep in the flock out of the install you just did, no Flockfile needed. See Serve.
shep stop has no graceful signal to send unless your app reads the shepherd channel, and shep startup is not built there. Your flock lives in %USERPROFILE%\.shep on Windows, since it sets no HOME.Other ways to install
Homebrew:
Scoop:
If shep.exe will not start, it wants the Visual C++ redistributable: scoop bucket add extras, thenscoop install extras/vcredist2022.
Prebuilt binaries:
- macOS, Apple silicon
- macOS, Intel
- Linux x86-64
- Linux x86-64, static
- Linux arm64
- Linux arm64, static
- Windows x86-64
Each link redirects to the newest release. Checksums are in SHA256SUMS.
Or build it yourself:
Rust 1.88 or newer, edition 2024.
Shell completions and the first-run greeting
shep completions <shell> prints a completion script for your shell. It completes verbs and flags only, never sheep or fold names. shep welcome reprints the one-time greeting a fresh $SHEP_HOME shows on its own.
Scripts that need an interpreter
script is run directly, so a compiled binary or a file with a shebang and the executable bit needs nothing further. A plain server.js has neither, and shep will not guess: guessing is how a process manager ends up with opinions you did not ask for.
Instead you tell it once. On first run shep writes a starter mapping into ~/.shep/shep.toml, commented so you can see exactly what it will do:
[interpreters] js = "node" py = "python3" sh = "sh"
From then on shep start server.js works. The table is yours to edit: add an extension, or delete it to turn interpreters off. An individual app can override it with its own interpreter field, and a single run can override both with --interpreter; the last one named wins.
Reading the flock table
The CPU column prints - rather than 0.0% when a reading is unavailable, because a confident zero is worse than an obvious blank. EXIT uses the same convention, and shows why a stopped sheep stopped. CFG reads - until a sheep has config waiting on it; see Overrides.
Piping it somewhere
Every command renders as --format json too, under a versioned envelope, so nothing has to scrape columns.