> ## Documentation Index
> Fetch the complete documentation index at: https://docs.olostep.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Olostep CLI

> Command-line interface voor scrape, search, map, crawl, answers, en batches — JSON-uitvoer voor scripts, CI, en AI-agenten

**NPM-pakket:** [olostep-cli](https://www.npmjs.com/package/olostep-cli)
**Repository:** [github.com/olostep-api/olostep-cli](https://github.com/olostep-api/olostep-cli)

CLI voor de [Olostep API](https://www.olostep.com/) — **scrape**, **search**, **map**, **crawl**, **answer**, en **batch** het web vanuit je terminal. Elke opdracht retourneert **JSON** zodat het netjes kan worden doorgevoerd naar `jq`, agenten, en CI.

Pure JavaScript, Node 18+, geen native binaries om te downloaden. Installeert in minder dan een seconde, start in \~200 ms, wordt geleverd als een enkele \~100 KB bundle.

## Installeren

**Vereisten:** Node.js **18+**.

<Tabs>
  <Tab title="npm (aanbevolen)">
    ```bash theme={null}
    npm install -g olostep-cli
    olostep init
    ```
  </Tab>

  <Tab title="One-liner (macOS / Linux)">
    ```bash theme={null}
    curl -fsSL https://olostep.com/install.sh | sh
    olostep init
    ```

    Het script controleert Node 18+, voert `npm install -g olostep-cli` uit, en valt terug op `sudo` indien nodig.
  </Tab>

  <Tab title="One-liner (Windows)">
    ```powershell theme={null}
    iwr -useb https://olostep.com/install.ps1 | iex
    olostep init
    ```

    Zelfde idee als het macOS/Linux script, maar voor PowerShell.
  </Tab>

  <Tab title="Geen installatie (npx)">
    ```bash theme={null}
    npx -y olostep-cli@latest --help
    ```

    Goed om een enkele opdracht uit te proberen zonder een globale installatie.
  </Tab>
</Tabs>

`olostep init` is de aanbevolen volgende stap — het logt je in, installeert de Olostep-vaardigheden in je AI-agenten, en configureert de MCP-server, alles in één opdracht. De one-liner scripts omhullen `npm install -g olostep-cli` met een Node 18+ controle en een `sudo` fallback, zodat ze werken zelfs als je niet zeker bent van je lokale setup.

**Platforms:** macOS (Apple Silicon en Intel), Linux (x64 en arm64), Windows (x64 en arm64).

## Instellen

Eén opdracht doet alles — inloggen, vaardigheden installeren, en de MCP-server installeren:

```bash theme={null}
olostep init
```

Vlaggen: `--skills-only`, `--mcp-only`, `--no-browser`, `--relogin`.

Om **alleen in te loggen** (geen vaardigheden/MCP):

```bash theme={null}
olostep login
olostep login --no-browser     # print de URL (handig via SSH)
```

De browser opent naar de Olostep-authenticatiepagina; je klikt op **Authorize**, en de CLI slaat je sleutel lokaal op.

**Alternatief — stel een omgevingsvariabele in.** Goed voor CI:

```bash theme={null}
export OLOSTEP_API_KEY=your_key_here
```

Verkrijg een sleutel van het [API Keys dashboard](https://www.olostep.com/dashboard/api-keys).

**Waar de sleutel wordt opgeslagen** (na `olostep login`):

| OS      | Pad                                                          |
| ------- | ------------------------------------------------------------ |
| macOS   | `~/Library/Application Support/olostep-cli/credentials.json` |
| Linux   | `~/.config/olostep-cli/credentials.json`                     |
| Windows | `%USERPROFILE%\AppData\Roaming\olostep-cli\credentials.json` |

## Uitloggen

```bash theme={null}
olostep logout            # vraagt om bevestiging, verwijdert vervolgens credentials.json
olostep logout --dry-run  # alleen voorbeeld — zie wat er zou gebeuren
olostep logout --yes      # sla de bevestiging over (voor scripts)
olostep logout --json     # machineleesbare uitvoer
```

`logout` waarschuwt je ook als `OLOSTEP_API_KEY` / `OLOSTEP_API_TOKEN` omgevingsvariabelen of een `.env` bestand in je huidige directory nog steeds een sleutel bevatten — deze hebben voorrang boven het credentials-bestand, dus alleen het bestand verwijderen is mogelijk niet voldoende. De uitvoer bevat de exacte unset-opdrachten voor PowerShell en bash/zsh.

## Snel starten

```bash theme={null}
olostep login

olostep search "beste web scraping APIs 2025" --limit 5
olostep answer "Wat doet Olostep?"
olostep map "https://example.com" --top-n 20
olostep scrape "https://example.com" --formats markdown
olostep crawl "https://docs.example.com" --max-pages 50
olostep batch-scrape urls.csv --formats markdown,html
```

Elke opdracht print standaard zijn JSON-resultaat naar stdout. Gebruik `--out <path>` om op te slaan naar een bestand.

## Wat kan het doen?

| Jij wilt…                            | Opdracht                        | Olostep product                                 |
| ------------------------------------ | ------------------------------- | ----------------------------------------------- |
| Het web doorzoeken                   | `search`                        | [Searches](/features/search)                    |
| Een onderzocht antwoord krijgen      | `answer`                        | [Answers](/features/answers)                    |
| URL's op een site ontdekken          | `map`                           | [Maps](/features/maps)                          |
| Eén pagina ophalen                   | `scrape`                        | [Scrapes](/features/scrapes)                    |
| Elke pagina op een site ophalen      | `crawl`                         | [Crawls](/features/crawls)                      |
| Veel URL's uit een CSV ophalen       | `batch-scrape`                  | [Batches](/features/batches)                    |
| Gestructureerde velden extraheren    | `--parser-id` op `batch-scrape` | [Parsers](/features/structured-content/parsers) |
| Een resultaat opnieuw ophalen via ID | `scrape-get`                    | [Scrapes](/features/scrapes)                    |
| Een batch taggen/organiseren         | `batch-update`                  | [Batches](/features/batches)                    |

## Uitvoer

Elke opdracht **print standaard zijn JSON-resultaat naar stdout**.

| Vlag           | Gedrag                                           |
| -------------- | ------------------------------------------------ |
| *(geen)*       | Print JSON naar **stdout** (UTF-8, ingesprongen) |
| `--out <path>` | Schrijf JSON naar dat bestand in plaats daarvan  |
| `--out -`      | Expliciet stdout (zelfde als standaard)          |

Voortgangs- en logregels gaan naar **stderr**, zodat stdout schoon blijft voor pipes.

```bash theme={null}
olostep map "https://example.com" --top-n 20 | jq '.urls[:10]'
olostep scrape "https://example.com" | jq .result.markdown_content
olostep search "onderwerp" --json | jq '.links[].url'
```

**Kiezen tussen hen:**

* **`search`** — je wilt een lijst van relevante URL's en snippets voor een query. De CLI doorzoekt het web voor je.
* **`answer`** — je wilt een gesynthetiseerd antwoord, geen ruwe pagina-inhoud. De CLI doet het onderzoek voor je.
* **`scrape`** — je hebt de URL al en wilt schone inhoud eruit.
* **`crawl`** — je wilt elke pagina op een site (of een gefilterde subset) zonder URL's handmatig op te sommen.
* **`batch-scrape`** — je hebt een lijst van URL's en wilt ze parallel verwerken.

## Opdrachten

Gebruik `olostep <command> --help` voor elke optie.

### `search`: live webzoekopdracht

Retourneert gededupliceerde organische links (URL, titel, beschrijving).

| Optie               | Beschrijving                                            |
| ------------------- | ------------------------------------------------------- |
| `--limit`           | Aantal resultaten, standaard 12, max 25                 |
| `--include-domains` | Komma-gescheiden domeinen om resultaten tot te beperken |
| `--exclude-domains` | Komma-gescheiden domeinen om uit te sluiten             |
| `--out`             | Bestand of `-`                                          |
| `--json`            | Machineleesbare uitvoer                                 |

```bash theme={null}
olostep search "TypeScript CLI tools" --limit 10
olostep search "open source projecten" --include-domains "github.com" --limit 5
olostep search "AI agenten" --json | jq '.links[].url'
```

### `answer`: onderzocht antwoord

Synchronous — retourneert wanneer het antwoord klaar is.

| Optie           | Beschrijving                                     |
| --------------- | ------------------------------------------------ |
| `--out`         | Bestand of `-`                                   |
| `--json-format` | Optionele JSON-vorm voor gestructureerde uitvoer |

```bash theme={null}
olostep answer "Wat bouwt dit bedrijf?" --out answer.json
olostep answer "Feiten extraheren" --json-format '{"bedrijf":"","jaar":""}' --out -
```

### `map`: URL's ontdekken

| Optie                                            | Beschrijving                                |
| ------------------------------------------------ | ------------------------------------------- |
| `--out`                                          | Bestandspad of `-`                          |
| `--top-n`                                        | Maximaal aantal URL's om te retourneren     |
| `--search-query`                                 | Optionele query om ontdekking te begeleiden |
| `--include-subdomain` / `--no-include-subdomain` | Subdomeinen                                 |
| `--include-url` / `--exclude-url`                | Herhaalbare URL-patronen                    |
| `--cursor`                                       | Paginering cursor                           |

```bash theme={null}
olostep map "https://example.com" --top-n 100 --search-query "blog"
```

### `scrape`: één URL

**Formaten:** `html`, `markdown`, `text`, `json`, `raw_pdf`, `screenshot` (komma-gescheiden; standaard `markdown`).

| Optie                               | Beschrijving                                                                                                                  |
| ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `--formats`                         | Komma-gescheiden                                                                                                              |
| `--country`                         | Landcode (bijv. `US`, `GB`)                                                                                                   |
| `--wait-before-scraping`            | Wacht voor scrape (ms)                                                                                                        |
| `--payload-json` / `--payload-file` | Geavanceerde opties als JSON (bijv. `"max_age": 86400` om caching in te schakelen — zie [Caching](/features/scrapes#caching)) |

```bash theme={null}
olostep scrape "https://example.com" --formats markdown,html
olostep scrape "https://example.com" --payload-file options.json --out -
```

### `scrape-get`: ophalen via ID

```bash theme={null}
olostep scrape-get "scrape_abc123" --out -
```

### `crawl`: hele site

Start een crawl, pollt totdat het klaar is, en haalt dan de pagina-inhoud op.

**Ophaalformaten:** `markdown`, `html`, `json`.

Opmerkelijke vlaggen: `--max-pages`, `--max-depth`, `--include-subdomain`, `--include-external`, `--include-url`, `--exclude-url`, `--search-query`, `--top-n`, `--webhook`, `--crawl-timeout`, `--formats`, `--pages-limit`, `--pages-search-query`, `--poll-seconds`, `--poll-timeout`, `--dry-run`.

```bash theme={null}
olostep crawl "https://docs.example.com" --max-pages 50 --formats markdown,html
olostep crawl "https://example.com" --max-pages 10 --dry-run
```

### `batch-scrape`: CSV

CSV moet een header-rij hebben met **`custom_id`** (of `id`) en **`url`** kolommen.

```csv theme={null}
custom_id,url
example,https://example.com
iana,https://iana.org
docs,https://docs.olostep.com
```

| Optie                                            | Beschrijving                                  |
| ------------------------------------------------ | --------------------------------------------- |
| `--formats`                                      | `markdown`, `html`, `json` (komma-gescheiden) |
| `--country`                                      | Optionele landcode                            |
| `--parser-id`                                    | Parser ID voor gestructureerde extractie      |
| `--poll-seconds`, `--log-every`, `--items-limit` | Polling en paginering                         |
| `--dry-run`                                      | Print payload en afsluiten                    |

```bash theme={null}
olostep batch-scrape urls.csv --formats markdown,html
olostep batch-scrape urls.csv --parser-id "<PARSER_ID>" --out results.json
```

Synchronous — pollt totdat de batch voltooid is, en haalt dan elk item op.

### `batch-update`: batch metadata

Vereist **een van** `--metadata-json` of `--metadata-file` (JSON-object).

```bash theme={null}
olostep batch-update "batch_abc123" --metadata-json '{"team":"growth"}'
olostep batch-update "batch_abc123" --metadata-file meta.json
```

## Auth-opdrachten

```bash theme={null}
olostep login                      # browser PKCE inloggen
olostep logout                     # verwijder opgeslagen credentials
olostep status                     # toon auth-status, config-paden, versie

olostep auth login                 # hetzelfde als olostep login
olostep auth logout                # hetzelfde als olostep logout
olostep auth status                # hetzelfde als olostep status
olostep auth set-key <key>         # sla een API-sleutel direct op (geen browser)
```

`auth set-key` is handig voor CI en scripts — schrijf de sleutel direct zonder door de browserstroom te gaan.

## Installeer de MCP-server

De CLI schrijft de Olostep MCP-server in de configuratie van je agent — geen JSON-bewerking.

```bash theme={null}
olostep mcp install                          # detecteer agenten, gehoste endpoint
olostep mcp install --agent cursor           # alleen Cursor
olostep mcp install --transport stdio        # lokale npx in plaats van gehost
olostep mcp install --no-global              # schrijf in het huidige project
olostep mcp install --dry-run --json         # alleen plannen
olostep mcp uninstall                        # verwijder de olostep-vermelding
olostep list mcp                             # toon welke agenten het hebben
```

| Optie                              | Beschrijving                                                                                                                                    |
| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `--agent`                          | Specifieke agent, herhaalbaar. Ondersteund: `cursor`, `claude`, `claude-desktop`, `windsurf`, `vscode`, `kilo`, `opencode`, `continue`, `codex` |
| `--all-agents` / `--no-all-agents` | Richt op elke gedetecteerde agent (standaard)                                                                                                   |
| `--transport`                      | `http` (gehost, aanbevolen) of `stdio` (lokaal `npx olostep-mcp`)                                                                               |
| `--global` / `--no-global`         | Per-gebruiker config (standaard) versus project-lokaal                                                                                          |
| `--api-key`                        | Sleutel om in te bedden; standaard naar opgeloste credentials                                                                                   |
| `--dry-run`                        | Toon het plan zonder te schrijven                                                                                                               |
| `--json`                           | Machineleesbare uitvoer                                                                                                                         |

De gehoste endpoint op `https://mcp.olostep.com/mcp` gebruikt `Authorization: Bearer <key>` — geen lokaal Node-proces vereist. De CLI voegt alleen de `olostep` sleutel toe aan je bestaande configuratie. Herstart je agent na installatie.

## Vaardigheden voor AI-agenten

De CLI levert **13 Olostep-vaardigheden** — `SKILL.md` bestanden geïnstalleerd in Claude Code, Cursor, en andere agenten zodat ze weten wat Olostep kan doen en wanneer het te gebruiken.

```bash theme={null}
olostep add skills                     # installeer alles in elke gedetecteerde agent
olostep skills install                 # hetzelfde (alias)
olostep skills update                  # herinstalleer / vernieuw alle vaardigheden
olostep skills list                    # zie wat er is geïnstalleerd en waar
olostep skills uninstall               # verwijder alle vaardigheden
```

Filter wat wordt geïnstalleerd:

```bash theme={null}
olostep add skills --category usage    # alleen kern web-data vaardigheden
olostep add skills --skill scrape --skill map
olostep add skills --agent cursor --agent claude
```

Zie [Vaardigheden](/features/skills) voor de volledige lijst en opties.

## Gezondheidscontroles

```bash theme={null}
olostep doctor                         # voer alle controles uit
olostep doctor --skip-network          # alleen auth + config, geen HTTP-aanroepen
olostep doctor --json                  # NDJSON — één record per controle (goed voor CI)
olostep doctor --fail-on-warn          # exit 1 bij waarschuwingen ook
```

Controles: API-sleutel aanwezig, API-sleutel bereikbaar, MCP-endpoint bereikbaar, configuratiebestand bestaat voor elke gedetecteerde agent.

CI-gebruik:

```bash theme={null}
olostep doctor --json --skip-network | jq 'select(.status == "fail")'
```

## Versie & updates

```bash theme={null}
olostep version                        # CLI-versie, Node-versie, kanaal
olostep version --json                 # machineleesbaar: { cli, node, channel }
olostep update                         # update naar laatste (npm install -g olostep-cli@latest)
olostep update --check                 # controleer of een nieuwere versie beschikbaar is, niet installeren
```

## Omgevingsvariabelen

| Variabele                   | Effect                                                                  |
| --------------------------- | ----------------------------------------------------------------------- |
| `OLOSTEP_API_KEY`           | API-sleutel                                                             |
| `OLOSTEP_API_TOKEN`         | API-sleutel (legacy alias)                                              |
| `OLOSTEP_JSON=1`            | Forceer JSON-uitvoer bij elke opdracht (zelfde als `--json` wereldwijd) |
| `OLOSTEP_NO_UPDATE_CHECK=1` | Stil de "update beschikbaar" melding                                    |
| `OLOSTEP_CLI_CONFIG_DIR`    | Overschrijf de credentials-directory                                    |

## Windows / PowerShell opmerkingen

PowerShell tokenizeert `,` en `*` anders dan bash — quote argumenten:

```powershell theme={null}
olostep scrape "https://example.com" --formats "markdown,html"
olostep map   "https://example.com" --include-url "/*"
olostep answer "Feiten extraheren" --json-format '{"bedrijf":"","jaar":""}'
```

Enkele aanhalingstekens zijn het veiligst voor JSON-waarden (geen `$` interpolatie).

## Zie wat er is geïnstalleerd

```bash theme={null}
olostep list skills    # geïnstalleerde Olostep-vaardigheden en welke agenten ze hebben
olostep list mcp       # welke agenten de Olostep MCP-server hebben, en het transport
```

## Globale vlaggen

| Vlag              | Beschrijving |
| ----------------- | ------------ |
| `-V`, `--version` | Versie       |
| `-h`, `--help`    | Help         |

`--out`, `--timeout`, en `--api-key` zijn beschikbaar bij elke data-opdracht.

## Beveiliging

Houd API-sleutels uit versiebeheer; roteer indien gelekt. `olostep logout` verwijdert het lokale credentials-bestand en vertelt je of er nog omgevingsvariabelen zijn die een sleutel bevatten.

## Gerelateerd

* [Maps](/features/maps) · [Crawls](/features/crawls) · [Batches](/features/batches) · [Answers](/features/answers) · [Searches](/features/search) · [Skills](/features/skills) · [MCP Server](/integrations/mcp-server)
