Skip to content

trakts CLI Reference

Krut Patel edited this page Jul 7, 2020 · 8 revisions

All commands have descriptive help messages available. So in case of doubt, simply add --help to the (sub)command to see the help docs (Example: trakts autostart --help and trakts --help). For reference, the various available commands are:

auth

Shows the status of the trakt authentication. If no token is found, or if the token in expired, it runs the authetication flow for trakt.tv.

$ trakts auth

Options

  • --force: Ignore the existing token, and force the authentication again.

autostart

Controls the autostart behaviour of the scrobbler.

$ trakts autostart <subcommand>

Subcommands

enable

Registers the app to be started automatically with computer startup.

disable

Disables app autostart.

backlog

Manage the backlog of watched media yet to be synced with trakt servers (mostly due to internet connectivity issues). Read this for more info.

$ trakts backlog <subcommand>

Subcommands

list

Lists all the files in the backlog.

clear

Try to add the unsynced files to trakt history.

config

Edits the scrobbler config settings. See Configuration section for more details.

$ trakts config <subcommand>

Subcommands

list

This command will list the parameters in the config, along with their current values.

$ trakts config list
players.monitored = ['mpv', 'vlc']
players.skip_interval = 5
general.enable_notifs = True
fileinfo.whitelist = ['/path/to/movies', '/path/to/anime', '/path/to/TV']
Options
  • --all: List ALL the config parameters, including those not overriden by the user.

set

Set the value for a config parameter, overriding the previous value.

  • Separate multiple values with spaces.
$ trakts config set players.monitored mpv vlc mpc-be
User config updated with 'players.monitored = ['mpv', 'vlc', 'mpc-be']'
  • For values containing space(s), surround them with double-quotes.
$ trakts config set fileinfo.whitelist D:\Media\Movies "C:\Users\My Name\Shows"
User config updated with 'fileinfo.whitelist = ['D:\\Media\\Movies', 'C:\\Users\\My Name\\Shows']'
Options
  • --add: Avoid overwriting the previous list values (whitelist, monitored, etc.).
$ trakts config set players.monitored mpv vlc
User config updated with 'players.monitored = ['mpv', 'vlc']'
$ trakts config set --add players.monitored plex mpc-hc  # NOTE "--add" used here
User config updated with 'players.monitored = ['mpv', 'vlc', 'plex', 'mpc-hc']'

unset

Reset a config value to its default.

$ trakts config unset players.mpc-hc.poll_interval
Successfully unset players.mpc-hc.poll_interval

init

Runs the initial setup of the scrobbler.

$ trakts init

log

Access the log file, mainly for debugging purposes.

$ trakts log <subcommand>

Subcommands

open

Opens the latest log file in your default editor. If this doesn't work, use the path command and open the file yourself.

path

Prints the location of the log file.

plex

Command to run the auth flow for Plex.

$ trakts plex
Options
  • --force: Ignore the existing token, and force the authentication again.

run

Run the scrobbler in the foreground. Mainly needed in case you have disabled the autostart service, and want to run the app manually.

$ trakts run

start

Starts the trakt-scrobbler service. If already running, does nothing.

$ trakts start
Options
  • --restart: Force restart the service.

status

Shows the status of trakt-scrobbler service.

$ trakts status

stop

Stops the trakt-scrobbler service.

$ trakts stop

whitelist

Shortcut command to add folder(s) to whitelist in config.

$ trakts whitelist <subcommand>

Subcommands

add

Add folder(s) to whitelist. Don't forget to restart the scrobbler after this.

$ trakts whitelist add D:\Media\Movies "C:\Users\My Name\Shows"
  • For folders containing spaces, use double quotes

show

List the current folders in whitelist.

$ trakts whitelist show

remove

Interactively remove folder(s) from whitelist.

$ trakts whitelist remove
# follow the on screen instructions now

test

Check whether the given file/folder is in the whitelist.

$ trakts whitelist test D:\Media\Movies
Clone this wiki locally