USE WHEN: pricing cards or decks, exporting to Moxfield, generating shopping lists, calculating draw probabilities (hypergeometric), pauper commander format, budget analysis. COVERS: deck pricing, card pricing, Moxfield export, shopping list generator, hypergeometric calculator, pauper commander workflow.
🚨 NEVER use printf/echo for pricing! Always use dedicated scripts:
npm run price <deck-file> # Price entire deck (requires cache)
npm run price-cards "Card 1" "Card 2" # Price individual cards (batch up to 15)
npm run price-cards -- --cache-stats # Show cache health
npm run price-cards -- --clean-cache # Remove expired entries
Key Features:
Troubleshooting Double-Faced/Split Cards:
Cards without price data are often listed incorrectly:
Murderous Rider → ✅ Murderous Rider // Swift EndFire → ✅ Fire // IceLovestruck Beast → ✅ Lovestruck Beast // Heart's DesireFix: Look up full name on Scryfall, update deck file with // separator, re-fetch and re-price.
npm run export <deck-file> # Export to .moxfield.mtg
npm run export <deck-file> custom-output.txt # Custom output path
Features:
## Category Name to // Category Name comments1 Card Name and 1x Card Name formats// separator for double-faced cardsWhen to use: After building a deck, sharing online, before major changes (backup).
npm run shopping-list <deck-file> [output-file]
Checks collection ownership, fetches prices, organizes by price tier:
Calculates probabilities for drawing specific cards.
# Basic: probability of 2-4 lands in opening hand (38 lands, 100 cards)
npm run hyper -- --target 38 --draw 7 --between 2 4
# Exactly 3 lands in opening hand
npm run hyper -- --target 38 --draw 7 --exactly 3
# At least 3 Swamps by turn 5 (21 Swamps, 12 cards seen)
npm run hyper -- --target 21 --draw 12 --at-least 3
# Multi-group: 2-4 lands AND 1+ ramp in opening hand
npm run hyper -- --draw 7 --group 38 2 4 --group 8 1
# Combo: at least 1 of each piece by turn 8
npm run hyper -- --draw 15 --group 3 1 --group 2 1
Parameters:
-d, --deck N - Total cards (default: 100)-t, --target K - Target cards in deck-n, --draw n - Cards drawn (default: 7)-e, --exactly k - Exactly k targets-al, --at-least k - At least k targets-am, --at-most k - At most k targets-b, --between k1 k2 - Between k1 and k2 targets-g, --group <count> <min> [max] - Multi-group (repeatable)MTG Turn Reference (cards seen):
| Turn | On Play | On Draw |
|---|---|---|
| Opening | 7 | 7 |
| Turn 3 | 9 | 10 |
| Turn 5 | 11 | 12 |
| Turn 7 | 13 | 14 |
| Turn 10 | 16 | 17 |
When to use: Land counts, mulligan decisions, combo consistency, commander cast timing.
Workflow:
npm run pauper:collection - Filter collection by rarity (uncommon commanders, common cards)npm run pauper:validate <deck-file> - Validate Pauper Commander rulesnpm run pauper:validate <deck-file> --1v1 - Validate for 1v1 formatFormat Rules:
npm run price <deck-file> - Identify expensive cardsYYYYMMDD-budget.mtg with swaps documented in headernpm run analyze + npm run count