Guides

Recipes

Shell functions, long jobs in steps, waiting for a yes, Makefiles and CI.

A shorter word

A shell function saves typing for the commands you watch every day.

# ~/.zshrc
w() { evlat watch -- "$@"; }

w cargo build --release
w pytest -x

A long job in steps

Move one row along as the job goes, and end it green or red.

steps=(fetch build test package)
for i in "${!steps[@]}"; do
  evlat signal release --label "Release" --detail "${steps[$i]}" \
    --progress "$(echo "$i / ${#steps[@]}" | bc -l)"
  ./scripts/"${steps[$i]}".sh || { evlat signal release --label "Release" --failed; exit 1; }
done
evlat signal release --label "Release" --done

Ask before going on

Turn the row amber while the script waits for you, so you notice it from another app.

evlat signal deploy --label "Deploy to prod" --detail "confirm in the terminal" --waiting
read -r -p "Deploy? [y/N] " ok
evlat signal deploy --clear
[ "$ok" = y ] && evlat watch --label "Deploy to prod" -- ./deploy.sh

Makefiles and npm scripts

# Makefile
test:
	evlat watch --label "tests" -- go test ./...
// package.json
"scripts": {
  "build": "evlat watch --label build -- vite build"
}

Where Evlat isn’t

On a CI machine or a colleague’s laptop without Evlat, evlat watch runs the command and exits as it does, and evlat signal exits 0. If evlat itself might be missing, guard it:

command -v evlat >/dev/null && evlat signal nightly --label "Nightly" --done

Many jobs at once

Each evlat watch gets a row of its own, so jobs run in parallel show side by side:

for shard in 1 2 3 4; do
  evlat watch --label "tests · shard $shard" -- ./test.sh --shard "$shard" &
done
wait