olostep.
Durante l’installazione, un passaggio postinstall scarica il binario corrispondente dalle release di GitHub del pacchetto. Se questo fallisce, conferma che esista una release per questa versione del pacchetto e per la tua piattaforma, quindi reinstalla.
Installazione
Requisiti: Node.js 16+ (solo pernpm / npx; la CLI stessa è un binario nativo).
Chiave API
ImpostaOLOSTEP_API_KEY nel tuo ambiente, o in un file .env nella directory dove esegui olostep.
Crea chiavi: Olostep API Keys.
Output
| Flag | Comportamento |
|---|---|
--out <path> | Scrive JSON su un file (le directory genitore vengono create se necessario). |
--out - | Scrive JSON solo su stdout (UTF-8, indentato). Utile per pipe e cattura di sottoprocessi. |
--out, i file vanno sotto output/ (vedi Percorsi predefiniti --out).
Comandi
Usaolostep <command> --help per ogni opzione. La maggior parte dei comandi accetta --timeout (HTTP, secondi).
map: scopri URL
| Opzione | Descrizione |
|---|---|
--out | Percorso file o - |
--top-n | Max URL |
--search-query | Guida la scoperta |
--include-subdomain / --no-include-subdomain | Sottodomini |
--include-url / --exclude-url | Pattern ripetibili |
--cursor | Paginazione |
--top-n, non --limit (rimosso).
answer: risposta ricercata
Interroga fino a quando la risposta è pronta.
| Opzione | Descrizione |
|---|---|
--out | File o - |
--json-format | Suggerimento opzionale per output strutturato (stringa oggetto JSON) |
--poll-interval / --poll-timeout | Polling (secondi) |
--json-format, non --model (rimosso).
scrape: un URL
Formati: html, markdown, text, json, raw_pdf, screenshot (separati da virgola; predefinito markdown).
| Opzione | Descrizione |
|---|---|
--formats | Separati da virgola |
--country | Codice paese |
--wait-before-scraping | Ms da attendere prima dello scrape |
--payload-json | Opzioni avanzate come stringa oggetto JSON |
--payload-file | Stesso, da file (non insieme a --payload-json) |
scrape-get: per ID scrape
crawl: crawl del sito
Recupera formati: markdown, html, json.
Flag notevoli: --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 (stampa payload, nessuna richiesta).
batch-scrape: CSV
Colonne CSV: custom_id o id, e url.
| Opzione | Descrizione |
|---|---|
--formats | markdown, html, json |
--country | Opzionale |
--parser-id | Parser per estrazione strutturata |
--poll-seconds, --log-every, --items-limit | Polling / paginazione |
--dry-run | Stampa solo il payload |
batch-update: metadati batch
Richiede uno di --metadata-json o --metadata-file (oggetto JSON).
Percorsi predefiniti --out
Quando --out è omesso:
| Comando | Predefinito |
|---|---|
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 |
Flag globali
| Flag | Descrizione |
|---|---|
-V, --version | Versione |
-h, --help | Aiuto |