ββββββββββββββββ ββββββ βββ ββββββββββββ ββββββββββ βββ
ββββββββββββββββββββββββββββ βββββββββββββ βββββββββββ βββ
βββ βββββββββββββββββββββββ βββ βββ βββ βββ
βββ βββββββββββββββββββββββ βββ βββ βββ βββ
βββ βββ ββββββ ββββββ βββ βββ βββββββββββββββββββ
βββ βββ ββββββ ββββββ βββ βββ ββββββββββββββββββ
A CLI and AI agent plugin for Trakt.tv using the Trakt API. Search movies and shows, view and manage your watchlist (add/remove), view and edit watch history (add/remove), track show progress, check the upcoming-episodes calendar, and mark items as watched.
Ships as both a standalone Go CLI and as plugins for OpenClaw and Claude Code.
go install github.com/omarshahine/trakt-plugin@latestOr grab a binary from the releases.
openclaw plugins install trakt-toolsclaude --plugin-dir /path/to/trakt-plugingit clone https://github.com/omarshahine/trakt-plugin
cd trakt-plugin
go build -o trakt-cli .trakt-cli auth
Please go to https://trakt.tv/activate and enter the following code: XXXXXXXX
Successfully authenticated, creds written to ~/.trakt.yaml
The CLI ships with built-in OAuth credentials. To use your own Trakt API app instead, pass --client-id and --client-secret flags, or set TRAKT_CLIENT_ID and TRAKT_CLIENT_SECRET environment variables.
All commands support --json for machine-readable output.
Search for movies and TV shows.
trakt-cli search "Severance"
trakt-cli search "Inception" --type movie --json| Flag | Values | Default |
|---|---|---|
--type |
movie, show, movie,show |
movie,show |
View watch history.
trakt-cli history --json
trakt-cli history --type shows --limit 20
trakt-cli history --type movies --json| Flag | Description | Default |
|---|---|---|
--type |
movies or shows |
all |
--limit |
Items per page | 10 |
--page |
Page number | 1 |
Mark movies or shows as watched. Searches by title and prefers exact matches.
trakt-cli history add "Severance" --json
trakt-cli history add "The Sopranos" "The Wire" --json
trakt-cli history add --type movie "The Godfather" --json
trakt-cli history add --watched-at 2025-06-15 "Dark" --json| Flag | Description | Default |
|---|---|---|
--type |
show or movie |
show |
--watched-at |
YYYY-MM-DD or RFC3339 | now |
Undo a mark-as-watched. Removing a show wipes ALL its episode plays; removing a movie wipes all its watches. There is no per-watch granular removal β Trakt's API removes by trakt id, not by timestamp.
trakt-cli history remove "Severance" --json
trakt-cli history remove --type movie "The Godfather" --json| Flag | Description | Default |
|---|---|---|
--type |
show or movie |
show |
View your watchlist.
trakt-cli watchlist --json
trakt-cli watchlist --type shows --limit 100
trakt-cli watchlist --type movies --json| Flag | Description | Default |
|---|---|---|
--type |
movies or shows |
all |
--limit |
Items per page | 10 |
--page |
Page number | 1 |
Add movies or shows to your watchlist. Searches by title and prefers exact matches. Items already on the list are reported under existing_* counts (not an error).
trakt-cli watchlist add "Severance" --json
trakt-cli watchlist add "The Bear" "Shrinking" --json
trakt-cli watchlist add --type movie "Oppenheimer" --json| Flag | Description | Default |
|---|---|---|
--type |
show or movie |
show |
Remove movies or shows from your watchlist. Searches by title. Items that were not on the list are silent no-ops (deleted_*=0, not an error).
trakt-cli watchlist remove "Severance" --json
trakt-cli watchlist remove --type movie "Oppenheimer" --json| Flag | Description | Default |
|---|---|---|
--type |
show or movie |
show |
Show upcoming episodes of shows you watch. This is the only read command that returns forward-looking data β ideal for proactive "what airs next?" workflows.
trakt-cli calendar --json
trakt-cli calendar --days 14 --json
trakt-cli calendar --start 2026-04-10 --days 7 --json
trakt-cli calendar --new --days 30 --json # series premieres only| Flag | Description | Default |
|---|---|---|
--days |
Number of days to look ahead | 7 |
--start |
Start date (YYYY-MM-DD) | today |
--new |
Only series premieres (S01E01 airings) | off |
Show watch progress for watchlist TV shows.
trakt-cli progress --json
trakt-cli progress --all --json| Flag | Description | Default |
|---|---|---|
--all |
Include not_started and completed | in-progress only |
The openclaw/ directory contains a native OpenClaw plugin that registers typed tools: trakt_search, trakt_history, trakt_history_add, trakt_history_remove, trakt_watchlist, trakt_watchlist_add, trakt_watchlist_remove, trakt_calendar, trakt_progress, and trakt_auth.
Install from ClawHub:
openclaw plugins install trakt-toolsOr locally:
openclaw plugins install -l ./openclawConfiguration (via OpenClaw settings):
cliPath: Path to trakt-cli binary (auto-detected on PATH)clientId: Trakt API client IDclientSecret: Trakt API client secret
The .claude-plugin/ and skills/ directories provide a Claude Code plugin with a skill that teaches Claude how to use the CLI.
claude --plugin-dir /path/to/trakt-pluginOriginally forked from angristan/trakt-cli. Extended with watchlist, progress, history add commands, --json output, and AI agent plugin packaging.
MIT