# Run it from Claude Code

Install the recruit command, sign in with a key, and let Claude Code find affiliates, email them and answer replies. You say yes at every card.

Claude Code can run RecruitAffiliates.ai for you from your terminal. It sets up your brand and finds people who fit. Then it finds their emails, writes the campaign, sends it and answers the replies. You stay in charge. Before anything costs a credit or sends an email, Claude shows you a **card**: a short summary of exactly what will happen. Nothing happens until you say yes.

It works through `recruit`, our command-line tool. A **command-line tool** is a program you run by typing in a terminal, which is what Claude Code does all day.

## 1. Install the tool

You need Node.js 20 or later. In a terminal, run:

```bash
npm i -g @recruitaffiliates/cli
```

Check it worked with `recruit --help`. Both `recruit` and `recruitaffiliates` run it. [The command-line guide](/cli) covers it in more depth, and [the command reference](/cli-reference) lists every command.

## 2. Make a key

A **key** is a long password that lets a tool act on your account.

1. In RecruitAffiliates.ai, open **Settings**, then **Developers**.
2. Give the key a name, like "Claude Code".
3. Choose **Live** to work on your real people. A test key only sees sample data and never sends.
4. Choose **Read and change**.
5. Tick **Can send email** if you want Claude to send for you. See the next section first.
6. Press **Make key**, then **Copy key**. You only see it once.

## 3. Sign in

```bash
recruit login
```

Paste the key when it asks. It's saved on your computer, readable only by you, so you do this once. Run `recruit whoami` to check it worked.

Never paste the key into the chat with Claude. Claude never needs to see it.

## What "Can send email" allows

Without the tick, Claude can do everything up to a finished draft campaign: search, save, find emails and write the emails. You then approve and start the campaign in the app.

With the tick, Claude can also:

- send you a test of the first email
- launch a campaign
- reply to someone who wrote back
- send the apply link to someone who said yes

Every one of those shows you a card first. After your yes there is a wait before anything leaves: 10 minutes for a campaign, 2 minutes for a reply. That wait is the **hold**. Say "stop" during the hold and Claude pulls it back, and nothing is sent. A test to your own address goes straight away, because only you get it.

Your sending hours, your daily limit and your do-not-contact list still apply to every email, the same as when you press the buttons yourself.

## Get Claude to use it

Download [the RecruitAffiliates.ai skill](https://docs.recruitaffiliates.ai/skill/recruitaffiliates-skill-latest.zip) and unzip it into `~/.claude/skills/`. A **skill** is a set of instructions Claude Code reads when a job needs it. This one teaches Claude the whole loop and tells it to stop for your yes at every card.

Then ask in plain words, for example "find me 25 affiliates for my Shopify app and get them ready to email".

## Or use the MCP instead

**MCP** is the standard way an assistant connects to an app. Rather not install anything? Add `https://mcp.recruitaffiliates.ai/mcp` to Claude Code as a remote server. Send your key as a bearer token, kept in an environment variable. You get the same tools and the same cards. Or run `recruit mcp`, which connects with the key you already saved.

The command-line tool is the better pick for Claude Code: it uses fewer tokens, because Claude only loads a command's help when it needs it.

Claude.ai and ChatGPT have no terminal, so they connect with the Connect and Allow button instead. Those connections never send email. See [Use RecruitAffiliates.ai from your AI assistant](/mcp).

## One loop, card by card

Here is a first run, with what each card shows. The numbers are an example.

| Step | What Claude runs | What the card shows you |
| --- | --- | --- |
| Set up | `recruit setup --country US --seed "best tools for Shopify stores"` | One search, and how many you have left after it |
| Wait | `recruit searches wait` | No card. A first search takes 10 to 25 minutes |
| Review | `recruit affiliates list --view discover --fit strong` | No card. Claude reads you each match and why it fits. You pick who to save |
| Find emails | `recruit email-lookups create` | 20 people, up to 20 email lookups, and your balance after. Anyone with no email found costs nothing |
| Draft | `recruit campaigns build` | No card. A draft sends nothing. Claude shows you every email so you can fix any |
| Test | `recruit campaigns test-send` | The email goes to your own address, marked [Test]. Check it on your phone |
| Start sending | `recruit campaigns launch` | 20 people, 60 emails over 9 days, from your mailbox, the first at 09:30 your time, your daily limit, and who your lists left out. Then the 10-minute hold |
| Each day | `recruit week` | No card. Replies to answer, people who said yes, campaigns that finished, searches to review and lookups left |
| Reply | `recruit threads reply` | Every word that will go out, signature included. Then a 2-minute hold |
| Said yes | `recruit threads invite` | Your apply link and the words around it. Then a 2-minute hold |
| Board | `recruit pipeline move` | No card. Moves someone along, for example to Negotiating |

If you change your mind after a yes, say so before the hold ends. Claude runs `recruit agent-actions undo` and nothing goes out. After the hold, Claude can pause the campaign instead.

## What stays in the app

Some things only you can do, in RecruitAffiliates.ai. They're billing and plans, your team, making keys, connecting a mailbox and deleting your account. So is accepting the sending terms before your first send. When Claude needs one of these, it gives you the link.

Related: [Let your assistant send](/agent/send) has every send and what each refusal means.
