#!/bin/sh # Install the Pindrop Agent Skill from https://pindrop.orchestra.ai # # curl -fsSL https://pindrop.orchestra.ai/install.sh | sh # # By default it installs into the user-level skill folders for BOTH Claude Code # (~/.claude/skills/pindrop) and Codex (~/.agents/skills/pindrop). Override: # curl -fsSL https://pindrop.orchestra.ai/install.sh | SKILLS_DIR=.claude/skills sh # project-local Claude Code # curl -fsSL https://pindrop.orchestra.ai/install.sh | SKILLS_DIR=.agents/skills sh # project-local Codex # curl -fsSL https://pindrop.orchestra.ai/install.sh | DEST=/path/to/skills/pindrop sh # FORCE=1 replaces an existing folder that isn't a Pindrop skill. # # It also writes ~/.pindrop/config.json with this server's URL if that file # doesn't exist yet. There is no API key to write: the first time your agent uses # Pindrop, it opens your browser so you approve it (paste the code it shows, then # click Approve), and the CLI saves its own token there, readable only by you. set -eu ORIGIN='https://pindrop.orchestra.ai' FILES='SKILL.md assets/skeletons/clickable-flow.html assets/skeletons/flowchart.html assets/skeletons/prompt-tuner.html assets/skeletons/slide-deck.html assets/skeletons/triage-board.html references/api.md references/page-types.md scripts/pindrop.mjs' if [ -n "${DEST:-}" ]; then TARGETS="$DEST" elif [ -n "${SKILLS_DIR:-}" ]; then TARGETS="$SKILLS_DIR/pindrop" else TARGETS="$HOME/.claude/skills/pindrop $HOME/.agents/skills/pindrop" fi info() { printf '\033[1;34m==>\033[0m %s\n' "$1"; } ok() { printf '\033[1;32m✓\033[0m %s\n' "$1"; } warn() { printf '\033[1;33m!\033[0m %s\n' "$1"; } die() { printf '\033[1;31merror:\033[0m %s\n' "$1" >&2; exit 1; } command -v curl >/dev/null 2>&1 || die "curl is required." STAGE="$(mktemp -d)" trap 'rm -rf "$STAGE"' EXIT INT TERM info "Downloading the Pindrop skill from $ORIGIN" for f in $FILES; do mkdir -p "$STAGE/$(dirname "$f")" curl -fsSL "$ORIGIN/skill/pindrop/$f" -o "$STAGE/$f" || die "could not download $f" done chmod +x "$STAGE/scripts/pindrop.mjs" grep -q '^name: pindrop$' "$STAGE/SKILL.md" || die "downloaded SKILL.md looks wrong" for dest in $TARGETS; do if [ -e "$dest" ] || [ -L "$dest" ]; then if [ -f "$dest/SKILL.md" ] && grep -q '^name: pindrop$' "$dest/SKILL.md"; then info "Updating $dest" elif [ "${FORCE:-0}" = "1" ]; then info "Replacing $dest (FORCE=1)" else die "$dest exists and is not a Pindrop skill. Re-run with FORCE=1 to replace it." fi rm -rf "$dest" fi mkdir -p "$dest" cp -R "$STAGE"/. "$dest"/ ok "Installed the 'pindrop' skill to $dest" done CONFIG="$HOME/.pindrop/config.json" if [ ! -f "$CONFIG" ]; then mkdir -p "$HOME/.pindrop" (umask 077 && printf '{\n "url": "%s"\n}\n' "$ORIGIN" > "$CONFIG") ok "Wrote $CONFIG (server: $ORIGIN)" elif ! grep -q "\"$ORIGIN\"" "$CONFIG"; then warn "$CONFIG points at a different server; left unchanged. Set PINDROP_URL=$ORIGIN to use this one." fi if ! command -v node >/dev/null 2>&1; then warn "Node 18+ was not found. The skill's CLI needs it (or use the curl API in references/api.md)." fi cat <