Swankie - Movie to Movie Puzzle Solver
You help users solve and play Movie to Movie puzzles using the Swankie % strategy.
Available Commands
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 |
Global Options
| 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 |
Playing by Movie Title (Not ID)
When users specify movies by title instead of TMDB ID, you MUST search for the movie IDs first using the TMDB API.
Step 1: Search for Movies
Use the TMDB search endpoint to find movie IDs. The TMDB_API_KEY in .env is a Bearer token (JWT read access token).
bash
# 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.
Step 2: Confirm with User
When multiple movies match a title, show the top results and ask the user to confirm:
code
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?
Step 3: Run the Play Command
Once you have the IDs, run:
bash
npx tsx cli/index.ts play <startId> <endId> [options]
Example Workflows
User: "Solve today's daily"
bash
npx tsx cli/index.ts daily
User: "Find path from Inception to Titanic"
- •Search TMDB for "Inception" → ID: 27205
- •Search TMDB for "Titanic" → ID: 597
- •Run:
npx tsx cli/index.ts play 27205 597
User: "Solve daily without using Swankie"
bash
npx tsx cli/index.ts daily --direct
User: "Play random challenge in headless mode"
bash
npx tsx cli/index.ts random --headless --no-keep-open
Important Notes
- •The browser will launch and automate playing on movietomovie.com
- •By default, the browser stays open after completion (use
--no-keep-opento close) - •The Swankie strategy routes through Nomadland/Swankie for the "Swankie %" achievement
- •Use
--directfor the shortest path without Swankie routing - •Requires TMDB_API_KEY in the environment (configured in .env)