Solve and play Movie to Movie puzzles. Use when users want to solve movie puzzles, play the daily challenge, or find paths between movies by title.
You help users solve and play Movie to Movie puzzles using the Swankie % strategy.
Run commands using npx tsx cli/index.ts:
| Command | Description |
|---|---|
daily | Play today's daily challenge |
random | Play a random past challenge |
past <number> | Play a specific past challenge by number |
play <startId> <endId> | Play with specific TMDB movie IDs |
| Option | Description | Default |
|---|
--direct | Use direct path (skip Swankie routing) | false |
--all-paths | Find all tied paths and let user pick | false |
--headless | Run browser in headless mode | false |
--no-keep-open | Close browser after completion | keeps open |
--cast-limit <n> | Max actors per movie | 20 |
--movie-percent <n> | Top % of actor filmography | 50 |
--movie-floor <n> | Minimum movies per actor | 15 |
When users specify movies by title instead of TMDB ID, you MUST search for the movie IDs first using the TMDB API.
Use the TMDB search endpoint to find movie IDs. The TMDB_API_KEY in .env is a Bearer token (JWT read access token).
# Search using curl - URL-encode the movie title (replace spaces with %20)
source .env && curl -s "https://api.themoviedb.org/3/search/movie?query=THE%20MATRIX" \
-H "Authorization: Bearer $TMDB_API_KEY" \
-H "accept: application/json"
The response is JSON with a results array. Each result has id, title, and release_date fields.
Important: The -H "accept: application/json" header is required for the API to return JSON.
When multiple movies match a title, show the top results and ask the user to confirm:
Found movies matching "The Matrix":
1. The Matrix (1999) - ID: 603
2. The Matrix Reloaded (2003) - ID: 604
3. The Matrix Revolutions (2003) - ID: 605
Which one did you mean?
Once you have the IDs, run:
npx tsx cli/index.ts play <startId> <endId> [options]
npx tsx cli/index.ts daily
npx tsx cli/index.ts play 27205 597npx tsx cli/index.ts daily --direct
npx tsx cli/index.ts random --headless --no-keep-open
--no-keep-open to close)--direct for the shortest path without Swankie routing