/crawl4ai:switch
Switch between cloud and local backends for Crawl4AI.
Instructions
- •
Read current config: Read
~/.crawl4ai/claude_config.json. Report the current mode. - •
Switch to the other mode:
- •If currently "cloud", switch to "local"
- •If currently "local", switch to "cloud"
- •Or if the user specifies a mode, switch to that
- •
Handle prerequisites:
- •Switching to cloud: Ask for API key if not already set (check env var CRAWL4AI_API_KEY too)
- •Switching to local: Check
python3 -c "import crawl4ai". If missing:pip install crawl4ai && crawl4ai-setup
- •
Write new config: Update
~/.crawl4ai/claude_config.jsonwith the new mode. - •
Verify: Use the
crawlMCP tool to crawl https://example.com with the new backend. Confirm it works. - •
Report: Tell the user the switch is complete and the new active mode.