#!/usr/bin/env sh # Ephemera installer — drops three text files into the current project and verifies each # against a published checksum before it lands. Nothing is executed; nothing outside these # files is touched. Prefer to read them first? Every file is linked on the page, and this # script does nothing you can't do by hand: # # curl -fsSL https://ephemera.daystra.com/EPHEMERA.md -o EPHEMERA.md # curl -fsSL https://ephemera.daystra.com/EPHEMERA-TEMPLATE.md -o EPHEMERA-TEMPLATE.md # curl -fsSL https://ephemera.daystra.com/skills/claude/SKILL.md -o .claude/skills/ephemera/SKILL.md # # Run it the audited way: curl -fsSL .../install.sh -o install.sh # read it, then: sh install.sh # Or the fast way: curl -fsSL .../install.sh | sh set -e BASE="https://ephemera.daystra.com" # pick a sha-256 tool (macOS ships shasum; most Linux ships sha256sum) if command -v sha256sum >/dev/null 2>&1; then SHA() { sha256sum "$1" | cut -d' ' -f1; } elif command -v shasum >/dev/null 2>&1; then SHA() { shasum -a 256 "$1" | cut -d' ' -f1; } else SHA() { echo "NO_SHA_TOOL"; } fi echo "Ephemera -> installing the contract into $(pwd)" echo " writes exactly 3 files, each verified against $BASE/SHA256SUMS.txt:" echo " EPHEMERA.md . EPHEMERA-TEMPLATE.md . .claude/skills/ephemera/SKILL.md" echo # published checksums (generated at release time, alongside the files they cover) SUMS="$(curl -fsSL "$BASE/SHA256SUMS.txt" 2>/dev/null || true)" fetch() { # remote="$1"; local="$2" dir=$(dirname "$local"); [ "$dir" = "." ] || mkdir -p "$dir" curl -fsSL "$BASE/$remote" -o "$local" want=$(printf '%s\n' "$SUMS" | awk -v k="$remote" '$2==k {print $1}') got=$(SHA "$local") if [ -z "$want" ]; then echo " ! $local written, but no published checksum for '$remote' to verify against" elif [ "$got" = "NO_SHA_TOOL" ]; then echo " ~ $local written (no sha-256 tool on PATH to verify)" elif [ "$got" = "$want" ]; then echo " + $local (sha-256 verified)" else echo " x CHECKSUM MISMATCH for $local -- refusing to trust it." >&2 echo " expected $want" >&2 echo " got $got" >&2 rm -f "$local" exit 1 fi } fetch "EPHEMERA.md" "EPHEMERA.md" fetch "EPHEMERA-TEMPLATE.md" "EPHEMERA-TEMPLATE.md" fetch "skills/claude/SKILL.md" ".claude/skills/ephemera/SKILL.md" echo echo "Done. The plan is the program; your agent is the runtime -- the file you review is the file that runs." echo echo "Point your agent at EPHEMERA.md:" echo " * Claude Code -> the skill above is already wired." echo " * Codex / Cursor / Gemini / Antigravity -> add $BASE/AGENTS.block.md to your AGENTS.md." echo " * anything else -> tell it: \"read EPHEMERA.md and follow it.\"" echo echo "Then author or fetch a plan (one reviewable Markdown file):" echo " catalog: $BASE/catalog.json plans: $BASE/plans/ contract: $BASE/EPHEMERA.md"