Vai al contenuto principale

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

FlagComportamento
--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

OpzioneDescrizione
--outPercorso file o -
--top-nMax URL
--search-queryGuida la scoperta
--include-subdomain / --no-include-subdomainSottodomini
--include-url / --exclude-urlPattern ripetibili
--cursorPaginazione
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.
OpzioneDescrizione
--outFile o -
--json-formatSuggerimento opzionale per output strutturato (stringa oggetto JSON)
--poll-interval / --poll-timeoutPolling (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).
OpzioneDescrizione
--formatsSeparati da virgola
--countryCodice paese
--wait-before-scrapingMs da attendere prima dello scrape
--payload-jsonOpzioni avanzate come stringa oggetto JSON
--payload-fileStesso, 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.
OpzioneDescrizione
--formatsmarkdown, html, json
--countryOpzionale
--parser-idParser di estrazione strutturata
--poll-seconds, --log-every, --items-limitPolling / paginazione
--dry-runStampa solo il payload
olostep batch-scrape urls.csv --formats markdown,html

batch-update: metadati batch

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:
ComandoPredefinito
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

Flag globali

FlagDescrizione
-V, --versionVersione
-h, --helpAiuto

Documentazione correlata

Repository: github.com/olostep-api/CLI

Sicurezza

Tieni le chiavi API fuori dal controllo del codice sorgente; ruotale se vengono divulgate.