> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://summarize.martino.im/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://summarize.martino.im/_mcp/server.

# Raycast Extension

Summarize video URLs with [Raycast](https://www.raycast.com/), a keyboard-first launcher. The extension is called **Summarize**.

> **Note**
>
> Raycast 2.0 runs on **macOS** and **Windows** (public beta). An **iOS** version is also in alpha. This guide focuses on the desktop app.

## What It Does

The extension provides **two commands**:

* **Summarize** — type or paste the video URL directly next to the command (no need to copy to clipboard first).
* **Summarize Clipboard** — read the video URL from your clipboard (classic behavior).

Both send the URL to the Summarize HTTP API and show the result in a Raycast detail view. You can copy or paste the summary with one keystroke.

## Requirements

* Raycast installed on macOS or Windows
* The Summarize HTTP API running and reachable from your computer

## Install the Extension

The extension source is inside this repository at `extensions/raycast-summarize`. Raycast can import local extensions directly on both macOS and Windows.

### Step 1: Start the Summarize API

Install the server extra in an isolated environment and start the HTTP API:

```bash
pipx install "martino-summarize[server]"
summarizer serve
```

By default the API runs at `http://localhost:8000`. If you are developing from a cloned repo, use `pip install -e ".[server]"` inside a venv instead. See [Installation](../getting-started/installation) if startup fails with dependency errors.

### Step 2: Build the Extension

Open a terminal in the extension folder and install its dependencies:

#### macOS / Linux

```bash
cd extensions/raycast-summarize
npm install
npm run build
```

#### Windows

```powershell
cd extensions/raycast-summarize
npm install
npm run build
```

A successful build creates a `dist/` folder and confirms there are no TypeScript errors.

### Step 3: Import Into Raycast

1. Open Raycast and run the **Import Extension** command.
2. Select the `extensions/raycast-summarize` folder.
3. Raycast loads the extension and adds **Summarize** (plus **Summarize Clipboard**) to your commands.

## Configure

1. Open Raycast and run **Preferences → Extensions → Summarize**.
2. Set **Summarize API Endpoint** to your API base URL (default: `http://localhost:8000`).
3. Optionally set:
   * **Provider** — a provider name from your `summarizer.yaml`
   * **Prompt Type** — a summary style such as `Summarization` or `Distill Wisdom`

## Usage

### Option A: Paste the URL directly (no clipboard needed)

1. Open Raycast and run **Summarize**.
2. Raycast shows an input field right next to the command — type or paste the video URL (e.g. a YouTube link) there and press Enter.
3. Wait a few seconds while the API processes the video.
4. The summary appears in a detail view. Press:
   * **↵ Return** to copy the summary
   * **⌘ V** (macOS) or **Ctrl + V** (Windows), or the paste action, to insert it into the frontmost app

### Option B: Summarize from Clipboard

1. Copy a video URL to your clipboard.
2. Open Raycast and run **Summarize Clipboard**.
3. Wait a few seconds while the API processes the video.
4. The summary appears in a detail view. Use the same copy/paste shortcuts as above.

## Development

To make changes to the extension:

```bash
cd extensions/raycast-summarize
npm install
npm run dev
```

`npm run dev` watches your source files and rebuilds automatically. Re-import the extension in Raycast after any change, or keep it imported while developing.

Use `npm run build` to verify the extension compiles before committing.