Integrate with Trakt.tv to track watch history and provide personalized show/movie recommendations.
📚 Trakt API Documentation:
Before using this skill, run the interactive setup:
python3 scripts/setup.py
This will guide you through:
If automated setup doesn't work, follow the manual steps in the Setup section below.
When a user asks to "install Trakt" or "set up Trakt integration," OpenClaw should:
INSTALL.md for detailed interactive flowpython3 scripts/setup.py and guide user through prompts```bash
# Install via pip (with --break-system-packages if needed)
pip3 install requests
# OR use a virtual environment (recommended)
python3 -m venv ~/.openclaw-venv
source ~/.openclaw-venv/bin/activate
pip install requests
```
Alternatively, install via Homebrew if available:
```bash
brew install python-requests
```
~/.openclaw/trakt_config.json (see setup below)urn:ietf:wg:oauth:2.0:oob (for PIN auth)Create ~/.openclaw/trakt_config.json with your credentials:
{
"client_id": "YOUR_CLIENT_ID_HERE",
"client_secret": "YOUR_CLIENT_SECRET_HERE",
"access_token": "",
"refresh_token": ""
}
Replace YOUR_CLIENT_ID_HERE and YOUR_CLIENT_SECRET_HERE with your actual values from step 1.
Note: Leave access_token and refresh_token empty - they'll be filled automatically after authentication.
Run the authentication script:
python3 scripts/trakt_client.py auth
This will output a PIN URL. Visit it, authorize the app, and run:
python3 scripts/trakt_client.py auth <PIN>
Authentication tokens are saved to ~/.openclaw/trakt_config.json
When a user asks for show/movie recommendations:
python3 scripts/trakt_client.py recommend
This returns personalized recommendations based on the user's watch history and ratings.
python3 scripts/trakt_client.py history
Returns the user's recent watch history.
python3 scripts/trakt_client.py watchlist
Shows content the user has saved to watch later.
python3 scripts/trakt_client.py search "Breaking Bad"
Search for specific shows or movies.
python3 scripts/trakt_client.py trending
Get currently trending shows and movies.
When a user asks "What should I watch?" or similar:
```bash
python3 scripts/trakt_client.py recommend
```
See references/api.md for detailed Trakt API endpoint documentation.
"What should I watch tonight?"
"Add [show] to my watchlist"
"What have I been watching lately?"
"Is [show] trending?"
"Authentication failed"
~/.openclaw/trakt_config.json"No recommendations returned"
"API request failed"
共 1 个版本