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.
NPM-Paket: olostep-cli
CLI für die Olostep API: map, answer, scrape, scrape-get, crawl, batch-scrape und batch-update. Antworten sind JSON (formatiert) für Skripte, CI und Agenten.
Die Installation dieses Pakets lädt ein eigenständiges Binary für dein Betriebssystem herunter. Du benötigst kein Python, um olostep auszuführen.
Bei der Installation lädt ein Postinstall-Schritt das passende Binary von den GitHub-Releases des Pakets herunter. Wenn das fehlschlägt, überprüfe, ob ein Release für diese Paketversion und deine Plattform existiert, und installiere es erneut.
Installation
Anforderungen: Node.js 16+ (nur für npm / npx; die CLI selbst ist ein natives Binary).
npm install -g olostep-cli
Ohne globale Installation ausführen:
npx -y olostep-cli@latest --help
Plattformen: macOS (Apple Silicon und Intel), Linux x64, Windows x64.
API-Schlüssel
Setze OLOSTEP_API_KEY in deiner Umgebung oder in einer .env-Datei im Verzeichnis, in dem du olostep ausführst.
Schlüssel erstellen: Olostep API-Schlüssel.
export OLOSTEP_API_KEY=your_key_here
olostep --help
Ausgabe
| Flag | Verhalten |
|---|
--out <path> | Schreibe JSON in eine Datei (übergeordnete Verzeichnisse werden bei Bedarf erstellt). |
--out - | Schreibe JSON nur an stdout (UTF-8, eingerückt). Gut für Pipes und Subprozess-Erfassung. |
Fortschritts- und Protokollzeilen gehen an stderr, sodass stdout parsebar bleibt.
olostep map "https://example.com" --top-n 20 --out - | jq '.urls[:10]'
olostep scrape "https://example.com" --out - | jq .result.markdown_content
Wenn du --out weglässt, gehen Dateien unter output/ (siehe Standard---out-Pfade).
Befehle
Verwende olostep <command> --help für jede Option. Die meisten Befehle akzeptieren --timeout (HTTP, Sekunden).
map: URLs entdecken
| Option | Beschreibung |
|---|
--out | Dateipfad oder - |
--top-n | Maximale URLs |
--search-query | Entdeckung leiten |
--include-subdomain / --no-include-subdomain | Subdomains |
--include-url / --exclude-url | Wiederholbare Muster |
--cursor | Paginierung |
Verwende --top-n, nicht --limit (entfernt).
olostep map "https://example.com" --top-n 100 --search-query "blog"
answer: recherchierte Antwort
Fragt ab, bis die Antwort bereit ist.
| Option | Beschreibung |
|---|
--out | Datei oder - |
--json-format | Optionale strukturierte Ausgabehinweis (JSON-Objekt-String) |
--poll-interval / --poll-timeout | Abfrage (Sekunden) |
Verwende --json-format, nicht --model (entfernt).
olostep answer "What does this company build?" --out answer.json
olostep answer "Extract facts" --json-format '{"company":"","year":""}' --out -
scrape: eine URL
Formate: html, markdown, text, json, raw_pdf, screenshot (komma-getrennt; Standard markdown).
| Option | Beschreibung |
|---|
--formats | Komma-getrennt |
--country | Ländercode |
--wait-before-scraping | Ms zu warten vor dem Scrape |
--payload-json | Erweiterte Optionen als JSON-Objekt-String |
--payload-file | Gleiches, aus Datei (nicht zusammen mit --payload-json) |
olostep scrape "https://example.com" --formats markdown,html
olostep scrape "https://example.com" --payload-file scrape-options.json --out -
scrape-get: nach Scrape-ID
olostep scrape-get "scrape_abc123" --out -
crawl: Seiten-Crawl
Abrufformate: markdown, html, json.
Bemerkenswerte Flags: --max-pages, --max-depth, --include-subdomain, --include-external, --include-url, --exclude-url, --search-query, --top-n, --webhook, --crawl-timeout, --follow-robots-txt / --ignore-robots-txt, --formats, --pages-limit, --pages-search-query, --poll-seconds, --poll-timeout, --dry-run (Payload drucken, keine Anfrage).
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-Spalten: custom_id oder id, und url.
| Option | Beschreibung |
|---|
--formats | markdown, html, json |
--country | Optional |
--parser-id | Parser für strukturierte Extraktion |
--poll-seconds, --log-every, --items-limit | Abfrage / Paginierung |
--dry-run | Nur Payload drucken |
olostep batch-scrape urls.csv --formats markdown,html
Erfordert eines von --metadata-json oder --metadata-file (JSON-Objekt).
olostep batch-update "batch_abc123" --metadata-json '{"team":"growth"}'
Standard---out-Pfade
Wenn --out weggelassen wird:
| Befehl | Standard |
|---|
map | output/map.json |
answer | output/answer.json |
scrape | output/scrape.json |
scrape-get | output/scrape_get.json |
crawl | output/crawl_results.json |
batch-scrape | output/batch_results.json |
batch-update | output/batch_update.json |
Globale Flags
| Flag | Beschreibung |
|---|
-V, --version | Version |
-h, --help | Hilfe |
Verwandte Dokumentation
Repository: github.com/olostep-api/CLI
Sicherheit
Halte API-Schlüssel aus der Versionskontrolle heraus; rotiere sie, wenn sie geleakt sind.