Add searxng skill with portable configuration

This commit is contained in:
Stefano Fiorini
2026-03-08 20:34:29 -05:00
parent 0324ef0810
commit ae90cda182
11 changed files with 828 additions and 0 deletions

50
docs/searxng.md Normal file
View File

@@ -0,0 +1,50 @@
# searxng
Search the web through a local or self-hosted SearXNG instance.
## What this skill is for
- General web search
- News, image, and video search
- Privacy-respecting search without external API keys
- Programmatic search output via JSON
## Runtime requirements
- `python3`
- Python packages: `httpx`, `rich`
## Configuration
Preferred:
- `SEARXNG_URL` environment variable
Optional config file:
- workspace `.clawdbot/credentials/searxng/config.json`
- or `~/.clawdbot/credentials/searxng/config.json`
Example:
```json
{
"url": "https://search.fiorinis.com"
}
```
## Wrapper
Use the bundled script directly:
```bash
python3 skills/searxng/scripts/searxng.py search "OpenClaw" -n 5
python3 skills/searxng/scripts/searxng.py search "latest AI news" --category news
python3 skills/searxng/scripts/searxng.py search "OpenClaw" --format json
```
## Notes
- Falls back to `http://localhost:8080` if no URL is configured.
- Prints the URL it attempted when connection fails.
- Uses the SearXNG JSON API endpoint.