curllm

curllm Documentation v2

Current documentation for curllm - Browser Automation with Multi-Provider LLM support.

πŸš€ Quick Start

# Install
pip install curllm

# Extract data (uses local Ollama by default)
curllm "https://example.com" -d "Extract all links"

# Use cloud provider (auto-detects API key from environment)
CURLLM_LLM_PROVIDER=openai/gpt-4o-mini curllm "https://example.com" -d "Extract products"

πŸ€– LLM Providers

curllm supports multiple LLM providers via litellm:

Provider Format Environment Variable
Ollama (local) ollama/qwen2.5:7b -
OpenAI openai/gpt-4o-mini OPENAI_API_KEY
Anthropic anthropic/claude-3-haiku-20240307 ANTHROPIC_API_KEY
Gemini gemini/gemini-2.0-flash GEMINI_API_KEY
Groq groq/llama3-70b-8192 GROQ_API_KEY
DeepSeek deepseek/deepseek-chat DEEPSEEK_API_KEY
from curllm_core import CurllmExecutor, LLMConfig

# Auto-detects API key from OPENAI_API_KEY
executor = CurllmExecutor(LLMConfig(provider="openai/gpt-4o-mini"))

# Or specify explicitly
executor = CurllmExecutor(LLMConfig(
    provider="anthropic/claude-3-haiku-20240307",
    api_token="sk-ant-..."
))

πŸ“ Documentation Structure

docs/v2/
β”œβ”€β”€ architecture/                  # System architecture docs
β”‚   β”œβ”€β”€ ARCHITECTURE.md            # Core architecture
β”‚   β”œβ”€β”€ DSL_SYSTEM.md              # πŸ†• Strategy-based extraction
β”‚   β”œβ”€β”€ ATOMIC_QUERY_SYSTEM.md     # DOM Toolkit
β”‚   β”œβ”€β”€ STREAMWARE.md              # Component system
β”‚   β”œβ”€β”€ LLM.md                     # LLM integration
β”‚   └── COMPONENTS.md              # Component reference
β”œβ”€β”€ features/                      # Feature documentation
β”‚   β”œβ”€β”€ FORM_FILLING.md            # Form automation
β”‚   β”œβ”€β”€ ITERATIVE_EXTRACTOR.md     # Atomic extraction
β”‚   β”œβ”€β”€ HIERARCHICAL_PLANNER.md    # 3-level LLM optimization
β”‚   └── VISION_FORM_ANALYSIS.md    # Visual form detection
β”œβ”€β”€ guides/                        # User guides
β”‚   β”œβ”€β”€ Installation.md            # Setup instructions
β”‚   β”œβ”€β”€ EXAMPLES.md                # Code examples
β”‚   β”œβ”€β”€ Docker.md                  # Docker deployment
β”‚   └── Troubleshooting.md
└── api/                           # API reference
    β”œβ”€β”€ API.md                     # REST API
    └── CLI_COMMANDS.md            # CLI reference

πŸ†• Recent Additions

December 2024

November 2024

πŸ“‚ Code Examples

See the examples/ directory for runnable code:

Example Description Link
LLM Providers Use OpenAI, Anthropic, Gemini, Groq examples/llm-providers/
Product Extraction Extract product data examples/extraction/products/
Form Filling Automate contact forms examples/forms/contact/
BQL Queries Browser Query Language examples/bql/
Streamware Component pipelines examples/streamware/
API Clients Node.js, PHP clients examples/api-clients/

πŸ“ Contributing to Documentation

Documentation improvements are welcome! To contribute:

  1. Edit the relevant .md file in docs/
  2. Ensure navigation links are maintained
  3. Test all internal links
  4. Submit a pull request

Documentation Standards

πŸ’‘ Tips


πŸ“š Documentation Index ⬆️ Back to Top Main README