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.
Pacchetto NPM: olostep-cli
CLI per l’API di Olostep: map, answer, scrape, scrape-get, crawl, batch-scrape e batch-update. Le risposte sono in formato JSON (formattato) per script, CI e agenti.
Installare questo pacchetto scarica un binario standalone per il tuo sistema operativo. Non hai bisogno di Python per eseguire olostep.
Durante l’installazione, un passaggio postinstall scarica il binario corrispondente dai rilasci di GitHub del pacchetto. Se questo fallisce, conferma che esista un rilascio per questa versione del pacchetto e la tua piattaforma, quindi reinstalla.
Installazione
Requisiti: Node.js 16+ (solo per npm / npx; la CLI stessa è un binario nativo).
npm install -g olostep-cli
Esegui senza un’installazione globale:
npx -y olostep-cli@latest --help
Piattaforme: macOS (Apple Silicon e Intel), Linux x64, Windows x64.
Chiave API
Imposta OLOSTEP_API_KEY nel tuo ambiente, o in un file .env nella directory in cui esegui olostep.
Crea chiavi: Chiavi API di Olostep.
export OLOSTEP_API_KEY=your_key_here
olostep --help
Output
| Flag | Comportamento |
|---|
--out <path> | Scrive il JSON in un file (le directory genitore vengono create se necessario). |
--out - | Scrive il JSON solo su stdout (UTF-8, indentato). Ottimo per pipe e cattura di sottoprocessi. |
Le linee di progresso e log vanno su stderr, quindi stdout rimane analizzabile.
olostep map "https://example.com" --top-n 20 --out - | jq '.urls[:10]'
olostep scrape "https://example.com" --out - | jq .result.markdown_content
Se ometti --out, i file vanno sotto output/ (vedi Percorsi predefiniti --out).
Comandi
Usa olostep <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 |
Usa --top-n, non --limit (rimosso).
olostep map "https://example.com" --top-n 100 --search-query "blog"
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) |
Usa --json-format, non --model (rimosso).
olostep answer "What does this company build?" --out answer.json
olostep answer "Extract facts" --json-format '{"company":"","year":""}' --out -
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) |
olostep scrape "https://example.com" --formats markdown,html
olostep scrape "https://example.com" --payload-file scrape-options.json --out -
scrape-get: per ID scrape
olostep scrape-get "scrape_abc123" --out -
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).
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
Colonne CSV: custom_id o id, e url.
| Opzione | Descrizione |
|---|
--formats | markdown, html, json |
--country | Opzionale |
--parser-id | Parser di estrazione strutturata |
--poll-seconds, --log-every, --items-limit | Polling / paginazione |
--dry-run | Stampa solo il payload |
olostep batch-scrape urls.csv --formats markdown,html
Richiede uno di --metadata-json o --metadata-file (oggetto JSON).
olostep batch-update "batch_abc123" --metadata-json '{"team":"growth"}'
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 |
Documentazione correlata
Repository: github.com/olostep-api/CLI
Sicurezza
Tieni le chiavi API fuori dal controllo del codice sorgente; ruotale se vengono divulgate.