A powerful set of scripts designed to analyze and optimize your Magic: The Gathering collection. These tools fetch card data, analyze synergies, and assist in building optimized Commander decks using cards you already own.
- Data Fetcher: Pulls detailed card information from the Scryfall API.
- Synergy Analyzer: Evaluates and compares cards to generate detailed synergy reports.
- Local Database Integration: Processes your collection data for highly personalized analysis.
- Customizable Scoring: Leverages Oracle text, color identity, and other attributes to determine compatibility.
- Detailed Reports:
- Creates a folder of individual synergy reports per card for easy reference.
- Outputs JSON files for flexibility and further processing.
Fetches card data from the Scryfall API and saves it to a local JSON file (local_card_database.json
).
A JSON database containing:
- Card name, Oracle text, and mana cost.
- Type, color identity, set details.
- Quantity, condition, and purchase price.
Run the following command in your terminal:
node 1_fetcher.js
Analyzes the cards from the local database and generates synergy reports. Each card is compared against all others, and the results are saved as individual JSON files in the synergy_reports directory.
A folder synergy_reports containing:
- Individual JSON files for each card with synergy comparisons.
- Each file lists the most compatible cards, sorted by synergy score.
Run 1_fetcher.js
to fetch and create your local database:
node 1_fetcher.js
Run 2_analyzer.js
to analyze your cards and generate synergy reports:
node 2_analyzer.js
Open the synergy_reports
folder to review individual JSON files for each card.
All the scripts are released under the MIT License.
The contents derived from the Scryfall API are subject to the Scryfall Terms of Use.
The image edited in banner.png
is sourced from here, created by "Richard Wright" and is used under the CreativeCommons 4.0 License.