Firecrawl CLI
Command-line interface for Firecrawl web scraping and crawling
Firecrawl CLI
Use Firecrawl web scraping and crawling from the command line.
Prerequisites
# Install the package
npm install firecrawl-aisdk
# Set your API key
export FIRECRAWL_API_KEY=fc-your-api-keyCommands
List Tools
# List all tools including Firecrawl
praisonai-ts tools list
# Filter by scraping tag
praisonai-ts tools list --tag scrapingTool Information
# Get Firecrawl tool info
praisonai-ts tools info firecrawl
# JSON output
praisonai-ts tools info firecrawl --jsonHealth Check
# Check if Firecrawl is configured
praisonai-ts tools doctorTest Tool
# Dry run
praisonai-ts tools test firecrawl
# Live test
praisonai-ts tools test firecrawl --liveScraping
Basic Scrape
praisonai-ts agent run \
--tools firecrawl:scrape \
--prompt "Scrape https://example.com and summarize the content"Scrape with Options
praisonai-ts agent run \
--tools "firecrawl:scrape,formats=markdown" \
--prompt "Scrape https://docs.firecrawl.dev and extract the main content"Crawling
Basic Crawl
praisonai-ts agent run \
--tools firecrawl:crawl \
--prompt "Crawl https://docs.firecrawl.dev and list all pages"Crawl with Limits
praisonai-ts agent run \
--tools "firecrawl:crawl,limit=10,maxDepth=2" \
--prompt "Crawl the documentation site and summarize each section"Search
praisonai-ts agent run \
--tools firecrawl:search \
--prompt "Search for web scraping best practices"Map Site
praisonai-ts agent run \
--tools firecrawl:map \
--prompt "Map the structure of https://firecrawl.dev"Batch Scraping
praisonai-ts agent run \
--tools "firecrawl:batchScrape" \
--prompt "Scrape these URLs and compare: https://site1.com, https://site2.com"Tool Options
| Option | Type | Default | Description |
|---|---|---|---|
limit | number | 50 | Max pages to crawl |
maxDepth | number | 2 | Crawl depth |
formats | string | markdown | Output format |
waitFor | number | 0 | Wait time (ms) |
Examples
Documentation Analysis
praisonai-ts agent run \
--instructions "You analyze documentation structure" \
--tools "firecrawl:crawl,limit=20" \
--prompt "Analyze the structure of https://docs.firecrawl.dev"Content Extraction
praisonai-ts agent run \
--tools "firecrawl:scrape,firecrawl:extract" \
--prompt "Extract pricing information from https://firecrawl.dev"Competitive Analysis
praisonai-ts agent run \
--instructions "You are a competitive analyst" \
--tools "firecrawl:scrape" \
--prompt "Scrape and compare features from competitor websites"JSON Output
praisonai-ts agent run \
--tools firecrawl:scrape \
--prompt "Scrape https://example.com" \
--jsonCombining Tools
# Search and scrape
praisonai-ts agent run \
--tools "exa,firecrawl:scrape" \
--prompt "Find AI blogs and scrape their latest posts"
# Crawl and analyze
praisonai-ts agent run \
--tools "firecrawl:crawl,firecrawl:extract" \
--prompt "Crawl the site and extract all product information"Environment Variables
| Variable | Required | Description |
|---|---|---|
FIRECRAWL_API_KEY | Yes | Firecrawl API key |
OPENAI_API_KEY | Yes | OpenAI API key |
Troubleshooting
Rate Limiting
# Reduce crawl limits
praisonai-ts agent run \
--tools "firecrawl:crawl,limit=5" \
--prompt "..."Timeout Issues
# Increase wait time for slow pages
praisonai-ts agent run \
--tools "firecrawl:scrape,waitFor=3000" \
--prompt "..."Related Commands
praisonai-ts tools list– List all toolspraisonai-ts tools doctor– Check tool healthpraisonai-ts agent run– Run agent with tools