# SETUP FOR BEGINNERS — PlaylistPipeline

**No experience needed.** This guide walks you through everything, click by click.
If you can send an email, you can do this. ~10 minutes total.

---

## What this tool does (in plain English)

You give it a YouTube playlist link. It downloads the *text* (transcript) of every
video in that playlist and saves it as files on your computer — so you can read,
search, and quote instead of re-watching.

## What you need

- A computer (Windows, Mac, or Linux)
- Internet connection
- **Free:** [Node.js](https://nodejs.org/) — a small free program. You only install it once.

That's it. No YouTube account, no API key, no subscription.

---

## Step 1 — Install Node.js (only once, ~3 minutes)

1. Go to **https://nodejs.org/**
2. Click the big green button that says **LTS** (left side).
3. The download starts. Open the downloaded file.
4. Click **Next** (or **Continue**) through every screen, then **Install** / **Finish**.
5. Done. You will not see Node.js anywhere — it works quietly in the background.

> **Already have Node?** Skip this step. To check: open a terminal and type
> `node --version` — if you see a number like `v18` or higher, you're good.

## Step 2 — Unzip PlaylistPipeline

1. Find `playlist-pipeline.zip` in your Downloads folder.
2. Right-click it → **Extract All** (Windows) or double-click (Mac).
3. A new folder appears: `playlist-pipeline`. Keep it in Downloads, that's fine.

## Step 3 — Run the one-click setup

**Windows:**
1. Open the `playlist-pipeline` folder.
2. **Double-click `setup.bat`.** A black window opens and installs the two small
   parts it needs (about 30 seconds).
3. When it says *Done*, press any key to close.

**Mac or Linux:**
1. Open the `playlist-pipeline` folder in Finder/Files.
2. Right-click `install.sh` → **Open with → Terminal**. If Mac asks about a
   program you don't recognize, click **Open** — it's our own installer.
   (If it won't run, open Terminal, type `cd Downloads/playlist-pipeline`,
   press Enter, then `bash install.sh`, press Enter.)
3. Wait until it says *Done*.

## Step 4 — Try it for free (no license needed)

1. In the same folder, open a terminal:
   - **Windows:** click the address bar at the top of the folder window, type `cmd`, press Enter.
   - **Mac:** right-click the folder → **New Terminal at Folder** (or open Terminal and type `cd Downloads/playlist-pipeline`).
2. Copy this line, paste it, press Enter:
   ```
   node src/index.mjs "https://youtube.com/playlist?list=PLcUY9vPTiVwzTTjXGLhrhHxK7u0vOW5iU"
   ```
   (That's a real public playlist you can test with.)
3. You'll see it counting videos. When it finishes, a new `out` folder appears
   with your transcript files.

**Demo mode** works without a license for the first 10 videos of a playlist —
try before you buy.

## Step 5 — Unlock with your license (after you buy)

1. In the `playlist-pipeline` folder, find the file named **`.env.example`**.
2. Right-click → **Rename**, and change its name to exactly **`.env`**
   (keep the dot at the front!).
3. Open `.env` with Notepad (right-click → **Open with → Notepad**).
4. Find the line that starts with `DS_LICENSE_KEY=` and paste your license key
   right after the `=` sign. Save and close.
5. Run the command from Step 4 again — now every video in any playlist unlocks.

> **Tip:** On Windows, if you don't see `.env.example`, it's because hidden files
> are invisible. In the folder, click **View** → tick **File name extensions** and
> **Hidden items**.

---

## Optional extras (not required)

- **AI summaries:** want a one-paragraph summary per video? Add a free key from
  **https://console.groq.com/keys** (free tier, 2 minutes) and paste it next to
  `GROQ_API_KEY=` in `.env`. Then add `--summarize` to the command.
- **Subtitles (.srt):** add `--format srt` to the command.
- **Only the first N videos:** add `--max 5` (for example).

## Common questions

- **It says "ytpl failed… headless browser fallback"?** Your internet provider is
  blocking the fast path. Run `npm i playwright && npx playwright install chromium`
  in the folder once, then try again. Not needed for most home connections.
- **I lost my license key?** Visit **https://smadsolutions.com/agent-b/recover/** and
  enter the email + order ID from your PayPal receipt.
- **It's installed on my old computer, new computer doesn't work?** Your key allows
  3 devices. Release the old one at **https://smadsolutions.com/agent-b/manage/**.
- **Stuck?** Email us via the studio contact on smadsolutions.com — we reply fast.
