Trakt
Scanned@mjrussell
npx machina-cli add skill @mjrussell/trakt --openclawTrakt CLI
Query your trakt.tv watch history and search for movies/TV shows.
Installation
npm install -g trakt-cli
Setup
- Create an app at https://trakt.tv/oauth/applications/new
- Run:
trakt-cli auth --client-id <id> --client-secret <secret> - Visit the URL shown and enter the device code
- Credentials saved to
~/.trakt.yaml
Commands
Watch History
trakt-cli history # Recent history (default: 10 items)
trakt-cli history --limit 25 # Show more
trakt-cli history --page 2 # Paginate
Search
trakt-cli search "Breaking Bad"
trakt-cli search "The Matrix"
Usage Examples
User: "What have I been watching lately?"
trakt-cli history
User: "Show me my last 20 watched items"
trakt-cli history --limit 20
User: "Find info about Severance"
trakt-cli search "Severance"
Notes
- Search works without authentication
- History requires authentication
- Read-only access to watch history
Overview
Trakt CLI lets you query your trakt.tv watch history and search for movies or TV shows from the command line. It helps you quickly recall what you’ve watched and find details about titles, using history (requires login) or search (works without authentication).
How This Skill Works
Install trakt-cli via npm, create a trakt app, authenticate, and credentials are saved to ~/.trakt.yaml. Use commands like trakt-cli history to fetch recent watched items or trakt-cli search "<title>" to look up shows and movies. History access is read-only and requires authentication, while search works without login.
When to Use It
- When you want to see your recent watch history.
- When you need the last N items you've watched.
- When you want to look up info on a title (e.g., Severance).
- When you want to browse history with pagination (history --page).
- When you want to search titles without signing in.
Quick Start
- Step 1: npm install -g trakt-cli
- Step 2: trakt-cli auth --client-id <id> --client-secret <secret> and follow the on-screen instructions
- Step 3: Use trakt-cli history or trakt-cli search "<title>" to start querying
Best Practices
- Use quotes around multi-word titles in search.
- Use history --limit N to control how many items you fetch.
- Use history --page to paginate through large histories.
- Keep your credentials secure in ~/.trakt.yaml.
- Remember that search does not require authentication.
Example Use Cases
- User asks what I’ve been watching lately → trakt-cli history
- User wants the last 20 items they've watched → trakt-cli history --limit 20
- User asks for Severance details → trakt-cli search "Severance"
- User asks for The Matrix details → trakt-cli search "The Matrix"
- User asks if they can search without signing in → trakt-cli search "Breaking Bad"