#!/bin/sh # AI Agents Decks — installs Deck Host for the current user (macOS, Linux) into ~/.local/bin. # curl -fsSL https://aiagentsdecks.com/install.sh | sh # Downloads one binary from aiagentsdecks.com/download, checks its SHA-256, and moves it into place. Nothing else. set -eu BASE="https://aiagentsdecks.com/download" os=$(uname -s); arch=$(uname -m) case "$os-$arch" in Darwin-arm64) f=deck-host-darwin-arm64 ;; Darwin-x86_64) f=deck-host-darwin-x64 ;; Linux-x86_64) f=deck-host-linux-x64 ;; *) echo "Deck Host isn't built for $os $arch yet." >&2; exit 1 ;; esac dir="${DECK_HOST_DIR:-$HOME/.local/bin}" mkdir -p "$dir" tmp=$(mktemp -d) trap 'rm -rf "$tmp"' EXIT echo "Downloading $f…" curl -fsSL "$BASE/$f" -o "$tmp/deck-host" curl -fsSL "$BASE/SHA256SUMS.txt" -o "$tmp/sums" want=$(grep " $f\$" "$tmp/sums" | cut -d' ' -f1) if command -v shasum >/dev/null 2>&1; then got=$(shasum -a 256 "$tmp/deck-host" | cut -d' ' -f1); else got=$(sha256sum "$tmp/deck-host" | cut -d' ' -f1); fi if [ -z "$want" ] || [ "$want" != "$got" ]; then echo "Checksum mismatch — not installing." >&2; exit 1; fi chmod +x "$tmp/deck-host" mv "$tmp/deck-host" "$dir/deck-host" echo "Installed $dir/deck-host ($("$dir/deck-host" --version))" case ":$PATH:" in *":$dir:"*) ;; *) echo "Add $dir to your PATH: echo 'export PATH=\"$dir:\$PATH\"' >> ~/.zshrc" ;; esac echo "Start it with: deck-host"