A local-first desktop app for building and refining Magic: The Gathering Commander (EDH) decks, with an AI co-pilot that actually understands your strategy.
Existing online deckbuilders are great at cataloguing cards but mediocre at the part that actually matters: deciding what should be in your deck and why. They are also tied to a browser tab, a login, and a server that may change pricing, rate-limits, or policies at any time.
This project takes a different angle:
- Your collection, your decks, on your machine. Everything lives in a local SQLite database. No account, no cloud sync, no telemetry. You can use it on a plane.
- Commander-first. Rules, validation, color-identity filtering, and the whole UX are built around the EDH format — not generic 60-card constructed shoehorned into a "Commander mode".
- AI where it adds value, not as a gimmick. Three focused workflows — Doctor, Suggestions, Synergy — that take the full deck context (commander, strategy notes, current 99, color identity, mana curve, known combos) and produce structured, explainable advice instead of vague "this card is good" replies.
- Bring Your Own Key. AI features call the Anthropic API directly with your own key. You see the estimated cost before each run, and the actual cost after. No middleman, no markup, no opaque quota.
In short: a deckbuilder that respects your time, your wallet, and the fact that Commander is a deeply contextual format where good advice requires knowing the whole picture.
- Commander picker that surfaces only legal commanders (legendary creatures, planeswalkers with the "can be your commander" clause, partners, etc.) — eligibility is derived from Scryfall's oracle text, so new sets work automatically.
- Color-identity-aware card search — the search panel only shows cards your commander is actually allowed to run.
- Full 100-card deck editor with the commander, mainboard, and category grouping.
- Strategy notes attached to the deck — a short brief of what the deck is trying to do. These notes are fed to the AI for every analysis, so suggestions stay aligned with your intent.
- Import / export decks as plain text (compatible with the formats used by Moxfield, Archidekt, Arena, etc.).
- Deck validation against Commander rules (singleton, 100 cards, color identity, banlist).
- Mana curve, color pip distribution, type breakdown, ramp/draw/removal counts computed locally — no API call, no spinner.
- Combo detection via the Commander Spellbook database: every two-card and multi-card combo present in the deck, with a description of the loop and the colors required.
- Mana base health check — does the deck have enough sources for each pip in its curve?
Three workflows, each running as a multi-step agent loop with tool calls (card search inside the deck's color identity, deck-stats inspection, etc.), then returning a structured report — not a wall of prose:
- Deck Doctor — audits the current build, flags weaknesses by severity (mana base, win conditions, interaction, redundancy), and recommends concrete cuts and adds.
- Suggestions — given the commander, the strategy notes and what's already in the 99, proposes new cards with a short justification each, filtered to the legal color identity.
- Synergy Analysis — explains which cards work together, identifies anchor cards, and surfaces dead weight (cards that don't synergise with anything else).
Every AI run is logged locally: prompt, response, tokens in/out, model, cost. You can re-open past Doctor reports at any time. Cost is estimated before you press the button and recorded after, so there are no surprise bills.
- Scryfall bulk import runs locally on first launch (and on demand from the Database panel). The full card pool is then queryable offline.
- Combo cache so repeated combo lookups don't hammer Spellbook.
Electron + React 19 + TypeScript, with better-sqlite3 as the local store, @anthropic-ai/sdk for AI features, and Tailwind + Radix UI for the interface.
$ npm install$ npm run dev# For Windows
$ npm run build:win
# For macOS
$ npm run build:mac
# For Linux
$ npm run build:linuxContributions are welcome — bug reports, feature ideas, and pull requests alike.
- Open an issue first for anything non-trivial (new feature, UX change, AI prompt change, schema migration). It avoids wasted work and keeps the scope of the app focused.
- Make sure the build is green:
There is no automated test suite yet — please don't add one without discussing it in an issue first.
npm run typecheck npm run lint npm run build
- Keep changes scoped. One feature or one fix per PR; don't bundle unrelated refactors.
- Prettier + ESLint are the source of truth. Run
npm run formatandnpm run lintbefore committing — the configs in.prettierrc.yamlandeslint.config.mjswin every style argument. - Three TypeScript projects. Renderer code uses
tsconfig.web.json; main and preload usetsconfig.node.json. Don't importelectronfrom renderer code — go through the preload bridge. - Renderer ↔ main goes through
window.api. Expose a typed function insrc/preload/index.ts, declare it insrc/preload/index.d.ts, and back it with anipcMain.handleinsrc/main/. - Pure domain logic stays pure. Files under
src/main/domain/must not import fromelectron,better-sqlite3, or any IO module — they should be trivially unit-testable. - Commit style. Conventional Commits (
feat:,fix:,chore:,refactor:,docs:…) with a scope when it helps (feat(doctor): …).
- New AI tools / prompts (deeper synergy reasoning, budget-aware suggestions, sideboard ideas for cEDH).
- Better combo visualisation in the UI.
- Performance work on large collections (50k+ card imports).
- UX polish — keyboard navigation, accessibility, dark/light themes.
Please include:
- OS + app version.
- The deck (export as text and paste it in) if the bug is deck-specific.
- Steps to reproduce, expected vs. actual behaviour.
- For AI-related bugs: the model used and, if you're comfortable sharing it, the redacted Doctor/Suggestions/Synergy run ID from the local log.
Thanks for helping make Commander deckbuilding a little less tedious.