@ckanthony/opencode-crawl4aiCrawl4AI plugin for OpenCode - web scraping, crawling, LLM extraction, and structured data via the Crawl4AI CLI
1
19
近 7 天 3
26.3
生态多维模型
2 个月前
2026-05-31
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@ckanthony/opencode-crawl4ai@1.0.0"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@ckanthony/opencode-crawl4ai@1.0.0"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D @ckanthony/opencode-crawl4aiopencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
OpenCode plugin for Crawl4AI — gives your AI agent reliable web scraping, deep crawling, LLM-powered extraction, and structured data via the Crawl4AI CLI.
Installation
1. Install the OpenCode plugin
npm install -g @ckanthony/opencode-crawl4ai
Or add it to your opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugins": ["@ckanthony/opencode-crawl4ai"]
}
Then install the Crawl4AI CLI globally:
pip install -U crawl4ai
# or
pipx install crawl4ai
After installation, run the browser setup once:
crwl --setup
What it does
This plugin registers the Crawl4AI CLI skill with OpenCode. Once installed, the agent can:
- Scrape any webpage to clean markdown, HTML, or structured data
- Deep crawl entire websites recursively (BFS or DFS)
- LLM Q&A — ask questions about page content using AI
- Structured extraction — extract data matching a JSON schema via LLM
- Content filtering — filter pages by relevance, regex, or cosine similarity
- Parallel crawling — run multiple scrapes in parallel for speed
All output is written to a .crawl4ai/ directory to avoid flooding context.
Docker Server Mode (Optional)
If you prefer to run Crawl4AI as a server instead of using the CLI, you can start it via Docker:
docker pull unclecode/crawl4ai:latest
docker run -d -p 11235:11235 --shm-size=1g unclecode/crawl4ai:latest
Then configure the agent to use http://localhost:11235 as the base URL. The skill covers both CLI and REST API usage.
Links
License
MIT