Installation¶
System Requirements¶
| Requirement | Minimum | Recommended |
|---|---|---|
| Python | 3.11 | 3.12 |
| RAM | 4 GB | 16 GB |
| Disk | 5 GB | 20 GB |
| OS | Linux / macOS / Windows WSL2 | Ubuntu 22.04+ |
Memory for topic modeling
BERTopic loads sentence-transformer embedding models (~500 MB) and keeps topic clusters in memory. For corpora over 50,000 documents, 16 GB RAM is recommended. Use --embedding-model all-MiniLM-L6-v2 for a smaller footprint.
User Install (recommended)¶
If you just want to use the scout CLI tool, install it globally with uv tool:
The scout command is immediately available system-wide — no virtual environment activation needed.
Then jump to Step 3 — Configure API credentials.
Developer Install¶
For contributing, running tests, or modifying the code:
Step 1 — Clone the repository¶
Step 2 — Create a virtual environment¶
Step 2 — Install dependencies¶
This installs:
- All runtime dependencies (Polars, BERTopic, CrewAI, GLiNER, …)
- Development tools (pytest, mypy, ruff, mkdocs-material)
- The
scoutCLI entry point (editable mode)
Alternative: pip
If you don't have uv installed, the standard pip workflow also works:
Both invocation styles work after developer install:
Run the test suite to confirm everything works:
Step 3 — Configure API credentials¶
Social Scout reads credentials from ~/.config/social-scout/.env at startup (shell exports always take precedence).
Then edit the file and fill in your keys:
Required API keys¶
| Key | Purpose | Where to get it |
|---|---|---|
APIFY_API_TOKEN |
Data collection | console.apify.com/account/integrations |
GEMINI_API_KEY |
Multi-agent analysis (Gemini) | aistudio.google.com/app/apikey |
ANTHROPIC_API_KEY |
Multi-agent analysis (Claude) | console.anthropic.com/settings/keys |
At least one LLM key (GEMINI_API_KEY or ANTHROPIC_API_KEY) is required for the analyze step.
Upgrading¶
Troubleshooting¶
Visualization extras (Plotly + kaleido for PNG export)
The scout visualize command requires optional dependencies:
This installs plotly, wordcloud, and kaleido (for high-resolution PNG export).
If kaleido is absent, --export-png is skipped gracefully.
ModuleNotFoundError: No module named 'torch'
Run uv pip install -e ".[dev]" — the full dependency set includes PyTorch.
CredentialError: APIFY_API_TOKEN not set
Ensure ~/.config/social-scout/.env exists and contains your Apify token, or export it in your shell: export APIFY_API_TOKEN=apify_api_...
Out of memory during embedding
Use a smaller embedding model: scout model <project> --embedding-model all-MiniLM-L6-v2
Slow first run
The first run downloads sentence-transformer models (~500 MB) from Hugging Face. They are cached in ~/.cache/huggingface/ for subsequent runs.