# Set the human up for Depesha

These are instructions from Depesha for you, an AI coding agent, to set the human up to send transactional email with Depesha. Read them once, then act on them. The human who handed you this document wants you to do the setup, not to explain it back to them. Run the commands yourself, except the one step below that the human does: entering their key.

Depesha is transactional email for every project you run: sign-in codes, password resets and "your result is ready" messages, each sent from the project's own domain through one small API. It is in private beta. Everything below works today:

- The `depesha` CLI (the Python package `depesha` on PyPI), which wraps Depesha's API.
- The `/depesha` skill, bundled in the CLI, which teaches you how to add Depesha to a project.
- `depesha login`, which stores a Depesha key for the CLI.

Two rules hold throughout:

- **Never ask the human to paste a key into this chat**, and never print, echo, log or commit one. A key is entered in a hidden prompt or read from a file, never typed into the conversation.
- **Send no email without the human's go-ahead.** Setting up sends nothing.

---

## 1. Decide which

Ask the human one question if you don't already know the answer: "Do you have a Depesha key? It starts with `dp_live_` or `dp_test_`."

| The human | Do |
|---|---|
| Has a key (during the beta, it comes with an invitation) | Sections 2, 3 and 4, then 5 |
| Has no key | Sections 2 and 3, then send them to the waitlist (section 4, last paragraph), then 5 |

There is no self-serve sign-up. Don't try to create an account or a key.

---

## 2. Install the CLI

The CLI needs Python 3.12 or newer. Use the first of these that works:

```
uv tool install depesha
pipx install depesha
```

If neither `uv` nor `pipx` is available and the human doesn't want a tool installed, run the CLI without installing it by prefixing every `depesha` command below with `uvx`, for example `uvx depesha --version`.

Check it:

```
depesha --version
```

It prints `depesha 0.1.0` or later. If the `depesha` command isn't found after `uv tool install`, run `uv tool update-shell` and tell the human to open a new terminal.

---

## 3. Install the skill

The skill is bundled in the CLI. Use the section for your agent below. `depesha skill install` refuses to replace a copy the human edited; don't pass `--force` unless they ask.

### Claude Code

```
depesha skill install --target claude
```

It copies the skill to `~/.claude/skills/depesha`. For this project only, use `--target project` instead (`./.claude/skills/depesha`). Then tell the human to start a new Claude Code session (or restart this one) so the `/depesha` skill loads.

### Codex

```
depesha skill install --target codex
```

It copies the skill to `$CODEX_HOME/skills/depesha` (`~/.codex/skills/depesha` by default). Then tell the human to restart Codex.

### Other agents

If your agent reads skills from `~/.agents/skills`:

```
depesha skill install --target agents
```

If it reads skills from another directory, pass that directory:

```
depesha skill install --dir <your agent's skills directory>
```

The skill lands in `<directory>/depesha`. If your agent has no skills directory, read the skill when you need it: `depesha skill show` prints it, and it is also published at `https://depesha.com/skill/SKILL.md`.

---

## 4. Log in

`depesha login` checks the key against `https://api.depesha.com` and stores it in `~/.depesha/credentials.json` (mode 600) as a profile. It never takes the key as a command-line argument. Your shell has no terminal for its hidden prompt, so offer the human one of these two ways, and wait:

- **In their own terminal** (a separate window, not this chat), the human runs:

  ```
  depesha login
  ```

  It asks for the key with a hidden prompt.

- **From a file:** the human saves the key in a file outside the repository, for example `~/.depesha-key`, and tells you the path. Then you run:

  ```
  depesha login --token-file ~/.depesha-key
  ```

  Don't open, print or copy the file. Once the login succeeds, suggest the human delete it.

For a second project or key, add `--profile <name>` to the login; `depesha profile list` shows the stored profiles without their keys.

Then check it:

```
depesha whoami
```

It shows the key's kind (`live` or `test`), its prefix, the project and the API URL, never the key itself.

A `dp_test_` key runs the whole send path but delivers only to the project's confirmed test recipients; for anyone else it returns the rendered message and sends nothing.

**No key?** Depesha is in private beta, and keys come with an invitation. Send the human to the waitlist at https://depesha.com/#waitlist with their project and the domain they'd send from. Projects are invited one at a time. Stop here, and tell them to hand you this document again once they have a key.

---

## 5. First check

With a key, look around without sending anything:

```
depesha domain list
depesha send --help
```

`depesha domain list` shows the project's sending domains and their state (it needs a key with the `read` scope). During the beta Depesha adds a project's domain for it; `depesha domain status <domain>` shows the CNAME records the domain owner adds once.

Don't send a test email on your own. Offer to, and send one only when the human says yes, to an address they give you. The skill explains templates, idempotency keys and sending from the project's code.

---

Once done, tell the human:

```
┌─ Depesha agent setup ──────────────────────────────────┐
│  ✓ CLI     depesha <version>  (uv tool, pipx or uvx)   │
│  ✓ Skill   <path>/depesha                              │
│  ✓ Login   profile <name>, project <slug>, <kind> key  │
│                                                        │
│  → Restart your agent to load the /depesha skill       │
└────────────────────────────────────────────────────────┘
```

Without a key, the Login line reads `–  Login   no key: join the waitlist at https://depesha.com/#waitlist`.

---

## Read next

- The skill: `depesha skill show`, or https://depesha.com/skill/SKILL.md
- Every command: `depesha --help` and `depesha <command> --help`
- The CLI on PyPI: https://pypi.org/project/depesha/
- What Depesha is, in brief: https://depesha.com/llms.txt

These instructions are published at https://depesha.com/agent-setup/prompt.md, so you can check them against the source at any time.
