rembric-tui-installer-e2elisted
Install: claude install-skill susomejias/rembric
# Rembric TUI installer — e2e validation
Run this before merging/deploying an install/distribution change so a regression is caught locally, not in a broken release. Layers are ordered by cost/feasibility — always run the headless + local layers; run the interactive + Docker layers when a real terminal / Docker is available.
`REPO=$(git rev-parse --show-toplevel)` in every snippet below.
## Layer 1 — Headless (CI-safe, always run)
```bash
# 1a. The headless test suite (args, preflight, server install incl. empty-token
# refill, server update, agent routing, output degradation, root-shim parity).
cd "$REPO/apps/server" && pnpm vitest run ../../install.test.ts
# 1b. POSIX syntax — dash-compatible, no bashisms.
cd "$REPO"
sh -n install.sh
sh -n apps/plugin/install.sh
for f in apps/plugin/.*/install.sh apps/plugin/.*/uninstall.sh; do [ -f "$f" ] && sh -n "$f"; done
```
## Layer 2 — Local install round-trips (no network, throwaway HOME)
`REMBRIC_SRC` makes the installer read everything from the working tree (cp, no curl).
```bash
HOME_T=$(mktemp -d); CWD_T=$(mktemp -d)
# opencode install → version detectable → uninstall removes it, leaves config.
HOME="$HOME_T" REMBRIC_SRC="$REPO" REMBRIC_NONINTERACTIVE=1 sh "$REPO/install.sh" --agent=opencode --action=install
test -f "$HOME_T/.config/opencode/plugins/rembric.ts" || echo "FAIL: opencode not installed"
HOME="$HOME_T" REMBRIC_SRC="$REPO" REMBRIC_NONINTERACTIVE=1 sh "$REPO/install.sh" --agent=opencode --action=uninstall
t