> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Firecrawl CLI

> Command-line interface for Firecrawl web scraping and crawling

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    U[Input] --> A[Agent]
    A --> O[Output]

    classDef agent fill:#8B0000,color:#fff
    classDef tool fill:#189AB4,color:#fff

    class A agent
    class U,O tool
```

# Firecrawl CLI

Use Firecrawl web scraping and crawling from the command line.

## Prerequisites

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Install the package
npm install firecrawl-aisdk

# Set your API key
export FIRECRAWL_API_KEY=fc-your-api-key
```

## Commands

### List Tools

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# List all tools including Firecrawl
praisonai-ts tools list

# Filter by scraping tag
praisonai-ts tools list --tag scraping
```

### Tool Information

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Get Firecrawl tool info
praisonai-ts tools info firecrawl

# JSON output
praisonai-ts tools info firecrawl --json
```

### Health Check

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Check if Firecrawl is configured
praisonai-ts tools doctor
```

### Test Tool

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Dry run
praisonai-ts tools test firecrawl

# Live test
praisonai-ts tools test firecrawl --live
```

## Scraping

### Basic Scrape

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts agent run \
  --tools firecrawl:scrape \
  --prompt "Scrape https://example.com and summarize the content"
```

### Scrape with Options

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts agent run \
  --tools "firecrawl:scrape,formats=markdown" \
  --prompt "Scrape https://docs.firecrawl.dev and extract the main content"
```

## Crawling

### Basic Crawl

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts agent run \
  --tools firecrawl:crawl \
  --prompt "Crawl https://docs.firecrawl.dev and list all pages"
```

### Crawl with Limits

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts agent run \
  --tools "firecrawl:crawl,limit=10,maxDepth=2" \
  --prompt "Crawl the documentation site and summarize each section"
```

## Search

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts agent run \
  --tools firecrawl:search \
  --prompt "Search for web scraping best practices"
```

## Map Site

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts agent run \
  --tools firecrawl:map \
  --prompt "Map the structure of https://firecrawl.dev"
```

## Batch Scraping

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
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

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
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

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts agent run \
  --tools "firecrawl:scrape,firecrawl:extract" \
  --prompt "Extract pricing information from https://firecrawl.dev"
```

### Competitive Analysis

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts agent run \
  --instructions "You are a competitive analyst" \
  --tools "firecrawl:scrape" \
  --prompt "Scrape and compare features from competitor websites"
```

## JSON Output

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts agent run \
  --tools firecrawl:scrape \
  --prompt "Scrape https://example.com" \
  --json
```

## Combining Tools

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# 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

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Reduce crawl limits
praisonai-ts agent run \
  --tools "firecrawl:crawl,limit=5" \
  --prompt "..."
```

### Timeout Issues

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Increase wait time for slow pages
praisonai-ts agent run \
  --tools "firecrawl:scrape,waitFor=3000" \
  --prompt "..."
```

## Related Commands

* `praisonai-ts tools list` - List all tools
* `praisonai-ts tools doctor` - Check tool health
* `praisonai-ts agent run` - Run agent with tools
