docs · pre-release
Menu
Start here / Getting started

Getting started

shep is one binary. Running it starts a daemon called the shepherd, which keeps a flock of your long-running processes alive. This page takes you from a clone to a running flock.

careful

There is no install script and no crates.io release yet. Building from source is the only path, and only macOS and Linux work. On Windows every command prints shep does not yet support Windowsand exits 1.

1. Build it

Rust 1.88 or newer, edition 2024.

$ git clone https://github.com/TurtIeSocks/shep.git
$ cd shep
$ cargo build --release
$ ./target/release/shep --help

Put target/release/shep on your PATH, or keep typing the full path — everything below works either way.

2. Write a Flockfile

Two fields is a complete one. Flockfile.toml,.yaml, .json and .json5 all work, discovered by searching ten filenames in a fixed order.

Flockfile.toml
[[app]]
name   = "web"
script = "./server"
note

Unknown fields are a parse error, not a shrug — a typo tells you at load instead of at 3am. Durations and sizes are strict on purpose:512M and 30s parse; 512MB,1.5G and 30S do not.

3. Start the flock

You never launch the daemon yourself. shep start notices nothing is listening and re-execs itself in the background.

$ shep start Flockfile.toml
$ shep ls
ID NAME STATUS PID RESTARTS CPU MEM UPTIME FOLD
1   web    online  1001  1         12.5%  48.1M  1m      backend
2   worker online  1002  2         12.5%  48.1M  2m      backend
3   cron    online  1003  3        -      48.1M  30s    backend

The CPU column prints - rather than 0.0% when a reading is unavailable, because a confident zero is worse than an obvious blank.

4. Watch what it prints

shep bleats follows the logs; --no-followprints the tail and exits. If you prefer the boring word,shep logs is the same command and always will be.

shep bleats
same as shep logs
shep flock
same as shep list / ls
shep muster
same as resurrect
shep thatlldo
same as graceful stop

5. Pipe it somewhere

Every command renders as --format json too, under a versioned envelope, so nothing has to scrape columns.

"schema_version": 1, "command": "flock", "data": [ { "id": 1, "name": "web", "status": "online", "pid": 1001, "restarts": 1, "uptime_ms": 60000, "fold": "backend", "cpu_percent": 12.5, "memory_bytes": 50462720, "dog": null } ] }

Where to go next