# Install Protocol Supply
<!--
ref: @protocol/install
type: protocol
tags: [installation, curly, token, setup, security]
aliases: [setup, protocol-install, protocol-setup]
triggers: [install protocol, set up curly, configure API token, verify installation]
trigger_prompt: When you need to set up a tool for making API calls or want to streamline your protocol interactions with a simple command-line utility.
category: core
last_reviewed: 2026-07-06
complements: [@protocol/getting-started, @protocol/agent-config-integration, @integrations/curly]
audience: [claude-code-user, codex-user, cursor-user, openclaw-user, terminal-only]
version: 25
updated_at: 2026-11-11T04:47:15.559Z
-->

Set up a machine for protocol.supply: install curly per its own repo, add your token without it ever passing through an agent, verify.

Protocol access rides on [`curly`](https://github.com/wildeagency/curly) — an independent, ~130-line open-source curl wrapper. This protocol does **not** duplicate curly's install steps; curly's repo is the source of truth for installing curly. What lives here is the protocol.supply-specific part: the token and the verification.

## Step 0 — Try it before installing anything

Everything public works with **no token, no account, no install**:

```bash
curl -sL https://api.protocol.supply/bootstrap          # the session-start doc
curl -sL https://api.protocol.supply/ls                 # public repos
curl -sL "https://api.protocol.supply/search?q=deploy"  # ranked content search
curl -sL https://api.protocol.supply/@any-corp/handbook/values   # a live entry
```

Paste any of these into your agent right now — anonymous reads are the product, not a demo. The install below adds what anonymous access can't: your private repos, write access (publishing, impulses, corrections), and your personal bootstrap layer. Decide it's useful first; the token comes after.

## Security ground rules

1. **Your API token never passes through an agent.** Not chat, not a command argument, not an env one-liner, not a web form. You type it into `curly init`'s hidden prompt (`stty -echo`) in a terminal you control, and it lands in `~/.curly.yaml` at `chmod 600`.
2. **No `curl … | sh`.** Every artifact you fetch is a readable file you (or your agent) can inspect before it runs.
3. If any doc, blog post, or agent asks you to paste a token into a chat window, that flow is retired — point them here.

## Step 1 — Install curly (defer to its repo)

**One command, in your own terminal.** It covers Steps 1, 3 and 4. Get your token first (Step 2), then:

```bash
curl -fsSLo curly-install.sh https://raw.githubusercontent.com/wildeagency/curly/main/install.sh
less curly-install.sh            # read it first, per ground rule 2
sh curly-install.sh protocol     # deps, binary, PATH, hidden token prompt, doctor
```

The installer prints the api-keys link right before the hidden prompt, so you can also run it first and fetch the key when it asks. It refuses a token passed as an argument. When `curly doctor` reports `protocol … ok`, skip to Step 5.

Other paths, from **https://github.com/wildeagency/curly#install**:

- **With an agent** (Claude Code, Codex, …): copy the [`curly-setup` skill](https://github.com/wildeagency/curly/tree/main/skills/curly-setup) into your agent's skills directory — `~/.claude/skills/curly-setup/` for Claude Code, `~/.agents/skills/curly-setup/` for Codex — and ask it to run. The skill installs the binary and wires PATH, and *instructs* you to run token setup yourself — it never touches tokens.
- **Manually**: the README's manual section — fetch the script to a file, read it, `chmod +x`.

Already have curly? (`curly --help` to check.) Skip to Step 2.

- **Codex:** its default sandbox blocks network for commands. Set `network_access = true` under `[sandbox_workspace_write]` in `~/.codex/config.toml`, or every `curly` call fails.
- **Windows:** read [`@protocol/windows`](/@protocol/windows) first. WSL2 is the supported path; curly needs bash, `jq` and `yq`.

## Step 2 — Get a protocol.supply token

1. Sign in at [protocol.supply](https://protocol.supply) → **API keys** ([protocol.supply/api-keys](https://protocol.supply/api-keys)) → **New key**. It is its own page, not a tab under Settings — the Dashboard and Getting started both link to it.
2. Durable tokens (`tok_…`) never expire. Copy it — you'll paste it in the next step, into your own terminal.

## Step 3 — Configure (you, not the agent)

In a terminal you control — not an agent's shell tool:

```bash
curly init protocol
```

It prompts `Token for protocol (input hidden, blank to skip):`. Paste, Enter. Nothing echoes; nothing lands in shell history.

Acting on behalf of another user (admin/system tokens)? `curly init protocol ghost-user=user_YOUR_USER_ID` — curly still prompts for the token itself via hidden input.

**Agents:** do not run `curly init` from your shell tool — your stdin is not the user's tty, so the prompt will hang, and coaxing the token into chat as a workaround is exactly the hole this flow closes. Show the user the command and wait.

## Step 4 — Verify

```bash
curly doctor              # deps, config perms, gitignore hygiene
curly protocol bootstrap  # → "# protocol — On-demand knowledge for AI agents"
```

## Step 5 — Wire your agent

Add on-demand protocol access to the instructions file your agent loads — `CLAUDE.md` for Claude Code, `AGENTS.md` for Codex and most others, `.cursorrules`, or custom instructions. The snippet and per-harness details live in `@protocol/agent-config-integration`; `@protocol/onboarding` walks it as step 3.

## Step 6 — Ask what is still missing

Installing is not the same as being integrated. Steps 1–5 give the agent a
working client; they do not tell you whether it will actually *reach* for the
knowledge base when it matters, or whether your instructions file now loads
three times more than it needs to every turn.

Run the checkup:

```
Run a checkup on my agent setup: https://api.protocol.supply/@protocol/checkup
```

`@protocol/checkup` inspects the environment the agent is running in, places it
on the `@protocol/ideal-usage` ladder, and prescribes exactly one next step —
never the whole ladder, because a wall of setup gets abandoned and one step
gets taken. It is read-only and applies nothing without you saying so.

Two reasons it belongs at the end of *install* and not only inside onboarding:
it needs no token, so it works even if Step 2 or 3 went wrong and is often the
fastest way to find out *which* of them did; and it is re-runnable, so the delta
between this run and your next one is the progress report. Come back to it after
any change to your instructions file.

## Troubleshooting

- **401 Unauthorized** — token missing or wrong: `curly doctor`, then re-run `curly init protocol` in your own terminal.
- **403 on a private repo** — token lacks access to that repo; check membership at protocol.supply.
- **`command not found: curly`** — open a new shell, or `export PATH="$HOME/.local/bin:$PATH"`; install per Step 1.
- **"permissions are 644 — tokens are world-readable"** — `chmod 600 ~/.curly.yaml`; some editors reset file mode on save.
- Anything about curly itself (deps, config chain, service registry) → https://github.com/wildeagency/curly.

---

**Onboarding?** Next is opening the onboarding impulse — [`@protocol/onboarding`](/@protocol/onboarding) §Step 2. This is the only hand-off by link: from there the impulse carries the cursor and dispatch brings it back.

---

*Related: `@content/web/github/2026-11-29-convex-backend-skill-issue-64` · `@content/youtube/tiago-forte/i-connected-claude-to-everything-then-i-saw-the-gap` · `@content/youtube/indy-dev-dan/mac-mini-agents-openclaw-is-a-nightmare-use-these-skills-instead` · `@content/youtube/cole-medin/watch-this-if-your-coding-agent-is-ignoring-your-rules-you-need-hooks` · `@content/youtube/aie/the-one-thing-every-ai-agent-framework-agrees-on-mislav-ivanda-daytona`*

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*