# Install the Verbiflow SDK

Verbiflow is sequencing infrastructure for growth teams: sourcing, enrichment,
multi-step email + LinkedIn sequences, deliverability, and a shared reply inbox.
The Python SDK (`import verbiflow as vf`) lets an AI agent — Claude Code,
Codex, Cursor, or any agent with a shell — research accounts, build lists,
draft sequences, and stage plays on that infrastructure.

If you are an AI agent, follow these steps in order. Each step prints what to
check before moving on.

## 1. Install

```sh
curl -fsSL https://verbiflow.com/install.sh | sh
```

This installs, on macOS or Linux (Python 3.11+):

- the `verbiflow` Python package in an isolated venv at `~/.verbiflow/sdk-venv`
  (your system Python is untouched)
- the `verbiflow` CLI at `~/.verbiflow/sdk-venv/bin/verbiflow`, linked to
  `~/.local/bin/verbiflow`
- the `verbiflow` agent Skill for Claude Code (`~/.claude/skills/verbiflow`)
  and Codex (`~/.codex/skills/verbiflow`)
- `uv` (if missing) and a Playwright Chromium build for browser-backed work

If the default `python3` is older than 3.11, rerun with
`PYTHON=/path/to/python3.11 sh`.

## 2. Verify

```sh
~/.verbiflow/sdk-venv/bin/verbiflow --help
~/.verbiflow/sdk-venv/bin/python -c "import verbiflow as vf; print(vf.__version__)"
```

## 3. Log in

Run SDK scripts with the venv interpreter. First login is a claim flow: the
SDK returns a URL, a human opens it in their browser, and the token lands in
the SDK's local state.

```python
# ~/.verbiflow/sdk-venv/bin/python
import verbiflow as vf

login = vf.auth.login()          # or provider="magic_link", target_email="you@company.com"
print(login["claim_url"])        # show this URL to the user; they open it and sign in
print(vf.auth.claim_status(claim_token=login["claim_token"]))
```

Then confirm on every later run:

```python
import verbiflow as vf

vf.auth.ensure_logged_in()
print(vf.auth.status(validate=True))
```

Never paste tokens into files or agent memory — auth lives in the SDK's local
state DB.

## 4. Work

- **Claude Code / Codex**: restart the session so the `verbiflow` Skill is
  picked up, then just ask for GTM work — the Skill covers audience discovery,
  research, enrichment, sequence staging, and plays.
- **Cursor / other agents**: run scripts with
  `~/.verbiflow/sdk-venv/bin/python` and read
  `~/.claude/skills/verbiflow/SKILL.md` for the full function map.
- **CLI**: `verbiflow functions search <topic>` and
  `verbiflow functions describe <name>` document every SDK function, arguments,
  and examples.

## Update

```sh
verbiflow update
```

Upgrades the package and refreshes the installed Skills. Re-running the
installer does the same on a machine that drifted.

## Uninstall

```sh
rm -rf ~/.verbiflow ~/.claude/skills/verbiflow ~/.codex/skills/verbiflow
rm -f ~/.local/bin/verbiflow
```

## Troubleshooting

- `import verbiflow` fails → you are on the wrong interpreter; use
  `~/.verbiflow/sdk-venv/bin/python`.
- Skill not visible in Claude Code / Codex → confirm
  `~/.claude/skills/verbiflow/SKILL.md` (or `~/.codex/skills/verbiflow/SKILL.md`)
  exists, then restart the agent session.
- `verbiflow` not on PATH → add `~/.local/bin` to PATH, or call
  `~/.verbiflow/sdk-venv/bin/verbiflow` directly.
- Anything else → https://verbiflow.com or book time at
  https://cal.com/team/getverbiflow/30-mins.
