Skip to main content

Sync Trakt watch history to Letterboxd

Project description

trakt-to-letterboxd

Sync Trakt movie watches to Letterboxd via the ttl CLI.

  • Pull new watches from Trakt into export.csv (accumulates)
  • Upload export.csv to Letterboxd, then clear it on success
  • Manual Cloudflare Turnstile in Chrome when Letterboxd requires it

Install

Requires pipx and Google Chrome.

pipx install trakt-to-letterboxd

From GitHub (latest main, or before a PyPI release exists):

pipx install git+https://github.com/louiscrc/trakt-to-letterboxd.git

This installs the ttl command globally. Check with ttl --help.

Setup

ttl init
# Prompts for Letterboxd username/password and Trakt client ID/secret

Non-interactive (writes a template to edit by hand):

ttl init --non-interactive

Get Trakt API credentials at https://trakt.tv/oauth/applications/new (redirect URI: urn:ietf:wg:oauth:2.0:oob).

On first Trakt sync you'll authenticate via device code.

config.yml stores your Letterboxd password in plaintext. Keep the data directory private and never commit that file.

Usage

ttl --version
ttl init                      # interactive config setup
ttl init --non-interactive    # write template config only
ttl trakt                     # pull new watches from Trakt into export.csv
ttl letterboxd                # upload export.csv to Letterboxd, then clear it
ttl sync                      # trakt then letterboxd (stops if trakt fails)
ttl letterboxd --no-diary     # skip diary entries on Letterboxd import
ttl letterboxd --manual-sign-in  # fill credentials but do not auto-click Sign In
ttl trakt --dry-run           # Trakt: fetch only, no CSV writes
ttl letterboxd --dry-run      # Letterboxd: stop before Import Films (Ctrl-C to exit)
ttl trakt -v                  # verbose progress logs
ttl trakt --config /path.yml  # custom config path

Letterboxd upload flow

ttl letterboxd opens Chrome and:

  1. Navigates to letterboxd.com — complete Turnstile if Cloudflare shows it
  2. If not logged in, opens sign-in, pre-fills credentials, and tries to click Sign In automatically. Use --manual-sign-in to click yourself when the automatic click fails (Cloudflare sometimes treats it as a bot).
  3. Uploads export.csv, clicks Import Films, waits for Saved N films.

Data directory

ttl stores all user data in a fixed app folder (created automatically). It does not use your current working directory.

Platform Directory
macOS ~/Library/Application Support/trakt-to-letterboxd/
Linux ~/.local/share/trakt-to-letterboxd/ (or $XDG_DATA_HOME/trakt-to-letterboxd/)
Windows %LOCALAPPDATA%\trakt-to-letterboxd\

Layout:

Path Description
config.yml Credentials and Trakt OAuth state
csv/export.csv Pending queue for Letterboxd (grows with ttl trakt, cleared after successful ttl letterboxd)
csv/merged.csv Full Trakt merged history (ratings + watch history)
csv/ratings.csv Trakt ratings
csv/watched.csv Trakt watch history
chrome_profile/ Persistent Chrome session (Letterboxd login)

CSV format: Title,Year,Rating10,Rewatch,imdbID,WatchedDate

ttl init prints the resolved paths. Override only the config file with --config /path/to/config.yml if needed; CSVs and the Chrome profile always stay under the data directory above.

Automation limits

Fully unattended / headless mode is not reliable: starting Chrome headless systematically re-triggers Cloudflare. In normal (headed) mode you usually only need to complete Turnstile (and occasionally Sign In) once in a while; a warm chrome_profile keeps most runs automated.

Development

Install from source:

git clone https://github.com/louiscrc/trakt-to-letterboxd.git
cd trakt-to-letterboxd
pipx install -e .

Optional environment overrides for Chrome (advanced):

Variable Purpose
CHROME_BIN Path to the Chrome/Chromium binary
CHROMEDRIVER_PATH Path to a local chromedriver (skips webdriver-manager)

License

MIT © Louis Cresci. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trakt_to_letterboxd-0.1.0.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trakt_to_letterboxd-0.1.0-py3-none-any.whl (22.3 kB view details)

Uploaded Python 3

File details

Details for the file trakt_to_letterboxd-0.1.0.tar.gz.

File metadata

  • Download URL: trakt_to_letterboxd-0.1.0.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for trakt_to_letterboxd-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a5b91fca8cc3a7277c356b3c5283f7112c73f59bc3ed23396966c4c967107102
MD5 00bcbb68b7d363ed848092d64c6199d4
BLAKE2b-256 aadd31827b7f8b93409370c9b0a1c9f252c04ff0844942dd6a3b3b29ca84405a

See more details on using hashes here.

Provenance

The following attestation bundles were made for trakt_to_letterboxd-0.1.0.tar.gz:

Publisher: publish.yml on louiscrc/trakt-to-letterboxd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file trakt_to_letterboxd-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for trakt_to_letterboxd-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1927d937a457ff46d8a8fb005b093564c0e2e8cd3429b0dfc3557c55b72857fd
MD5 0f3a39420aa46f5e780200eb1a396c0b
BLAKE2b-256 2d58bc4e59525e96363f5b0f4aaa93145f505758e6cf5f1823eb413738f0de0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for trakt_to_letterboxd-0.1.0-py3-none-any.whl:

Publisher: publish.yml on louiscrc/trakt-to-letterboxd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page