# Layer-local Justfile — scaffolded by Katalyst
# Unknown recipes fall back to the repo root Justfile (which imports stack.just).
set fallback

# Resolved from this Justfile's location on disk.
export LAYER_DIR := justfile_directory()
export STACK_DIR := parent_directory(justfile_directory())

# Default environment: reads the first */environment.yaml found in this layer,
# or falls back to "dev" if none exist yet.
export ENV := env_var_or_default("ENV", `sh -c 'f=$(ls */environment.yaml 2>/dev/null | head -1); [ -n "$f" ] && grep "^environment:" "$f" | cut -d" " -f2 || echo dev'`)
