---
name: sangria-setup
version: 0.1.6
description: Installs or updates the Sangria CLI and skill. Use when the user asks to "set up sangria", "install sangria", or pastes `https://getsangria.com/SKILL.md` / `https://getsangria.com/skill`.
allowed-tools: Bash(npm install -g @sangria-sdk/cli*) Bash(sangria *) Bash(curl *) Bash(mkdir *) Bash(head *) Bash(grep *) Bash(ls *) Bash(printf *) Bash(command *) WebFetch Read
---

# Sangria Setup

Sangria uses one CLI plus one skill file:

- `sangria` CLI — handles auth, discovery, and buying.
- `sangria` skill — tells you how to use the CLI (when to discover, when to ask for approval, when to buy).

## Install Or Update

Install (or update) the CLI:

```bash
command -v npm >/dev/null 2>&1 || { echo "npm not found. Install Node.js (which bundles npm) from https://nodejs.org/ and re-run." >&2; exit 1; }
npm install -g @sangria-sdk/cli@latest
```

Then fetch the latest skill. The canonical source is:

```text
https://getsangria.com/skills/sangria/SKILL.md
```

Save it where your agent loads skills. On Claude Code:

```bash
mkdir -p ~/.claude/skills/sangria
curl -fsSL https://getsangria.com/skills/sangria/SKILL.md -o ~/.claude/skills/sangria/SKILL.md \
  && printf '\033[32m✓\033[0m sangria skill installed\n'
```

On any other agent, save the file wherever your agent loads instructions, or read it from the URL above each session.

If `npm install -g` fails due to permissions, tell the user to run the npm command in their terminal, then continue after `sangria --help` works.

## Auth

```bash
sangria auth status --json
```

If the API key is missing or invalid, send the user to https://getsangria.com/client/dashboard to generate an agent API key (`sg_agents_...`), then:

```bash
sangria auth set "<paste-key-here>"
sangria auth status --json
```

## Report Back

```text
✅ sangria CLI installed
✅ sangria skill v0.1.6 installed
✅ Sangria auth ready
```

If auth is not ready, replace the last line with:

```text
⚠️ Sangria auth not set — run `sangria auth set sg_agents_...`
```

After setup, re-read the skill before doing any Sangria work — the fetched file is authoritative, your in-context copy is not.
