Zum Hauptinhalt springen
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 wird ein Postinstall-Schritt ausgeführt, der das passende Binary von den GitHub-Releases des Pakets herunterlädt. Wenn das fehlschlägt, überprüfe, ob ein Release für diese Paketversion und deine Plattform existiert, und installiere es erneut.

Installation

Voraussetzungen: 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=dein_schlüssel_hier
olostep --help

Ausgabe

FlagVerhalten
--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 Unterprozess-Erfassung.
Fortschritts- und Protokollzeilen gehen an stderr, sodass stdout analysierbar 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, werden Dateien unter output/ gespeichert (siehe Standard --out-Pfade).

Befehle

Verwende olostep <command> --help für jede Option. Die meisten Befehle akzeptieren --timeout (HTTP, Sekunden).

map: URLs entdecken

OptionBeschreibung
--outDateipfad oder -
--top-nMaximale URLs
--search-queryEntdeckung leiten
--include-subdomain / --no-include-subdomainSubdomains
--include-url / --exclude-urlWiederholbare Muster
--cursorPaginierung
Verwende --top-n, nicht --limit (entfernt).
olostep map "https://example.com" --top-n 100 --search-query "blog"

answer: recherchierte Antwort

Fragt, bis die Antwort bereit ist.
OptionBeschreibung
--outDatei oder -
--json-formatOptionale strukturierte Ausgabevermutung (JSON-Objekt-String)
--poll-interval / --poll-timeoutAbfrage (Sekunden)
Verwende --json-format, nicht --model (entfernt).
olostep answer "Was baut dieses Unternehmen?" --out answer.json
olostep answer "Fakten extrahieren" --json-format '{"company":"","year":""}' --out -

scrape: eine URL

Formate: html, markdown, text, json, raw_pdf, screenshot (komma-getrennt; Standard markdown).
OptionBeschreibung
--formatsKomma-getrennt
--countryLändercode
--wait-before-scrapingMs zum Warten vor dem Scraping
--payload-jsonErweiterte Optionen als JSON-Objekt-String
--payload-fileDasselbe, 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.
OptionBeschreibung
--formatsmarkdown, html, json
--countryOptional
--parser-idStrukturierter Extraktionsparser
--poll-seconds, --log-every, --items-limitAbfrage / Paginierung
--dry-runNur Payload drucken
olostep batch-scrape urls.csv --formats markdown,html

batch-update: Batch-Metadaten

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:
BefehlStandard
mapoutput/map.json
answeroutput/answer.json
scrapeoutput/scrape.json
scrape-getoutput/scrape_get.json
crawloutput/crawl_results.json
batch-scrapeoutput/batch_results.json
batch-updateoutput/batch_update.json

Globale Flags

FlagBeschreibung
-V, --versionVersion
-h, --helpHilfe

Verwandte Dokumentation

Repository: github.com/olostep-api/CLI

Sicherheit

Halte API-Schlüssel aus der Versionskontrolle heraus; rotiere sie, wenn sie geleakt sind.