CLI Reference
The Scraper.bot CLI lets you manage flows, trigger runs, and extract data directly from your terminal.
Installation
npm / Homebrew
npm install -g @scraper-bot/cli
# or
brew install scraper-botAuthentication
bash
scraper auth login
# Opens browser for OAuth login
scraper auth token scr_live_your_key_here
# Set API key directlyCommands Reference
| Command | Description |
|---|---|
scraper flows list | List all flows |
scraper flows create --url URL --mode extract | Create a flow |
scraper flows run FLOW_ID | Trigger a flow run |
scraper flows export FLOW_ID > flow.json | Export flow as JSON |
scraper flows import flow.json | Import flow from JSON |
scraper runs list --flow FLOW_ID | List runs for a flow |
scraper runs logs RUN_ID | Stream run logs in real-time |
scraper runs watch RUN_ID | Watch a run with live progress |
scraper extract --url URL --query "product names and prices" | One-shot extraction |
scraper templates list | Browse templates |
scraper templates use TEMPLATE_ID | Create flow from template |
scraper config set KEY VALUE | Set configuration |
scraper status | Check platform status |
Example Workflows
Quick Extraction
scraper extract --url "https://news.ycombinator.com" \
--query "top 10 stories with title, points, and URL" \
--format jsonCreate and Schedule a Monitor
scraper flows create \
--name "Price Watch" \
--url "https://amazon.com/dp/B09V3KXJPB" \
--mode monitor \
--schedule "0 */6 * * *"Watch a Run in Real-time
scraper runs watch run_abc123Global Options
| Flag | Description |
|---|---|
--format json|table|csv | Output format (default: table) |
--quiet | Suppress non-essential output |
--verbose | Show debug information |
--api-key KEY | Override API key for this command |
--profile NAME | Use a named profile |
Configuration
Configuration is stored in ~/.scraper-bot/config.json. Use named profiles for multiple environments:
bash
scraper config set api-key scr_live_... --profile production
scraper config set api-key scr_test_... --profile staging
# Use a profile
scraper flows list --profile staging