CLI tool for publishing your trakt watched history to your letterboxd account
TypeScript
130
933 commits
updated May 8, 2026
A package to migrate your trakt movie history and ratings to letterboxd. Optionally the trakt Watchlist can also be exported. Currently letterboxd only supports importing from a csv, so thats all this package does at the moment. When a proper API is added, I'll update this to push the data right into your letterboxd history.
The easiest way to use this currently is with npx. You can install that globally with yarn global add npx or npm i -g npx. Once you have that, just run:
npx trakt-to-letterboxd -u username -f filename
where username is the user whose data you want to export, and filename is the name of the csv file you want to output to.
To export your watchlist use
npx trakt-to-letterboxy -u username -w watchListFilename
Both options can also be used together:
npx trakt-to-letterboxd -u username -f filename -w watchListFilename
If only a username is given it will correspond to the following command:
npx trakt-to-letterboxd -u username -f history.csv -w watchlist.csv
Schema for the output csv. Based on https://letterboxd.com/about/importing-data/
Default values for letterboxd object shape
HTTP headers to send with our request to trakt's api
Export a trakt user's history to csv to be uploaded to letterboxd
props Object Properties passed from argv
Returns Promise<void> We dont return anything
The fetch options object (only really needs headers)
The instance of CsvBuilder we'll use to export the data. We need to remap the format of the last watched date to YYYY-MM-DD to comply with letterboxd's formatting
Maps a trakt history entry to a letterboxd history entry
movie TraktRatingMergedHistoryEntityType A trackt movie history entityisWatchlist boolean Whether to map the history or the watchlist, defaults to the historyReturns LetterboxdHistoryEntityType A letterboxd movie history entity
Fetch the ratings of a user and merge them with the movie history based on the movie's Trakt ID
user string The username we're getting data forwatched TraktMovieHistoryType A list of movies that have been watchedReturns Promise<TraktRatingMergedHistoryType> Promise that resolves to Trakt movie data with merged rating
Maps an array of trakt history entries to an array of letterboxd history entities
movieList Array<TraktRatingMergedHistoryEntityType> Trakt HistoryisWatchlist boolean Whether to map the history or the watchlist, defaults to the history (optional, default false)Returns Array<LetterboxdHistoryEntityType> letterboxd history
Fetches the user's history data from the trakt api
user string The username we're getting data forisWatchlist boolean Whether to fetch the history or the watchlist, defaults to the history (optional, default false)Returns Promise<Array<LetterboxdHistoryEntityType>> Promise that resolves to mapped Letterboxd data
809 commits
66 commits
49 commits
8 commits
TypeScript
51.6%
JavaScript
48.4%
CLI tool for publishing your trakt watched history to your letterboxd account
TypeScript
130
933 commits
updated May 8, 2026
A package to migrate your trakt movie history and ratings to letterboxd. Optionally the trakt Watchlist can also be exported. Currently letterboxd only supports importing from a csv, so thats all this package does at the moment. When a proper API is added, I'll update this to push the data right into your letterboxd history.
The easiest way to use this currently is with npx. You can install that globally with yarn global add npx or npm i -g npx. Once you have that, just run:
npx trakt-to-letterboxd -u username -f filename
where username is the user whose data you want to export, and filename is the name of the csv file you want to output to.
To export your watchlist use
npx trakt-to-letterboxy -u username -w watchListFilename
Both options can also be used together:
npx trakt-to-letterboxd -u username -f filename -w watchListFilename
If only a username is given it will correspond to the following command:
npx trakt-to-letterboxd -u username -f history.csv -w watchlist.csv
Schema for the output csv. Based on https://letterboxd.com/about/importing-data/
Default values for letterboxd object shape
HTTP headers to send with our request to trakt's api
Export a trakt user's history to csv to be uploaded to letterboxd
props Object Properties passed from argv
Returns Promise<void> We dont return anything
The fetch options object (only really needs headers)
The instance of CsvBuilder we'll use to export the data. We need to remap the format of the last watched date to YYYY-MM-DD to comply with letterboxd's formatting
Maps a trakt history entry to a letterboxd history entry
movie TraktRatingMergedHistoryEntityType A trackt movie history entityisWatchlist boolean Whether to map the history or the watchlist, defaults to the historyReturns LetterboxdHistoryEntityType A letterboxd movie history entity
Fetch the ratings of a user and merge them with the movie history based on the movie's Trakt ID
user string The username we're getting data forwatched TraktMovieHistoryType A list of movies that have been watchedReturns Promise<TraktRatingMergedHistoryType> Promise that resolves to Trakt movie data with merged rating
Maps an array of trakt history entries to an array of letterboxd history entities
movieList Array<TraktRatingMergedHistoryEntityType> Trakt HistoryisWatchlist boolean Whether to map the history or the watchlist, defaults to the history (optional, default false)Returns Array<LetterboxdHistoryEntityType> letterboxd history
Fetches the user's history data from the trakt api
user string The username we're getting data forisWatchlist boolean Whether to fetch the history or the watchlist, defaults to the history (optional, default false)Returns Promise<Array<LetterboxdHistoryEntityType>> Promise that resolves to mapped Letterboxd data
809 commits
66 commits
49 commits
8 commits
TypeScript
51.6%
JavaScript
48.4%