A modern Magic: The Gathering deck builder desktop application built with Electrobun, React, and TypeScript. Features AI-powered deck assistance with an integrated chat interface for strategy advice, card suggestions, and deck organization.
- Create & Save: Create, save, load, duplicate, and delete decks with local storage
- Multi-Format Support: Standard, Pioneer, Modern, Legacy, Vintage, Commander, and Pauper
- Commander Support: Set commanders for Commander format decks with visual display
- Deck Description: Add summary and detailed description for deck strategy guides
- Card Tagging: Organize cards with custom tags (e.g., "Ramp", "Removal", "Win Condition")
- Grouping: View cards grouped by type or tags
- Scryfall-Powered Search: Search cards with full Scryfall syntax support
- Color & Type Filters: Quick filter buttons for colors and card types
- Grid View: Visual card browser with hover previews
- Click to Add: Click any card to add it to your deck
- Deck Building Advice: Get card suggestions and strategy tips
- Card Search: Ask the agent to find cards matching specific criteria
- Rules Lookup: Query the comprehensive rules for game mechanics
- Deck Modification: Agent can add/remove cards, set tags, and write descriptions
- Card Linking: Card names in chat are clickable to add to deck
- Multiple Formats: Import and export in text, MTGO, and Arena formats
- Clipboard Support: Easy copy/paste for deck sharing
- Mana Curve: Visual distribution of mana values
- Color Distribution: Breakdown of mana symbols in deck
- Type Breakdown: Count of creatures, spells, lands, etc.
- Format Validation: Automatic legality checking with detailed errors
# Install dependencies
bun install# Run in development mode
bun run dev
# Run with Vite HMR (in separate terminal)
bun run dev:hmr# Build for production
bun run buildThe AI assistant uses GitHub Copilot SDK which authenticates automatically via your GitHub login. No API key is required.
- An active GitHub Copilot subscription
- Github copilot-cli installed and authenticated.
| Shortcut | Action |
|---|---|
Ctrl+S |
Save deck |
Ctrl+N |
New deck |
Ctrl+O |
Open deck library |
Ctrl+I |
Import deck |
Ctrl+E |
Export deck |
Ctrl+F |
Focus card search |
Escape |
Close modal |
The integrated AI agent has access to the following capabilities:
search_cards- Search for Magic cards using Scryfall syntaxget_card- Get detailed information about a specific cardsearch_rules- Search the comprehensive rules
get_current_deck- View the current deck contentsadd_card_to_deck- Add a card to the deckremove_card_from_deck- Remove a card from the deckset_card_quantity- Change the quantity of a cardset_commander- Set the commander for Commander format
add_tag- Add a tag to a cardremove_tag- Remove a tag from a cardset_card_tags- Set all tags for a cardget_deck_tags- Get all tags used in the deck
get_deck_description- Read deck summary and descriptionset_deck_summary- Set brief deck summary (shown in library)set_deck_description- Set detailed deck guide
analyze_deck- Get deck statistics and suggestionssuggest_cards- Get card recommendations based on deckcheck_legality- Validate deck against format rules
src/
├── main/ # Electrobun main process
│ ├── tools/ # AI agent tool handlers
│ └── services/ # Card data, rules, agent, validation
├── renderer/ # React frontend
│ ├── components/ # UI components
│ │ ├── CardBrowser/ # Card search and grid
│ │ ├── Chat/ # AI chat interface
│ │ ├── DeckEditor/ # Deck editing views
│ │ ├── DeckLibrary/ # Saved decks browser
│ │ ├── DeckStats/ # Statistics display
│ │ └── common/ # Shared UI components
│ ├── hooks/ # Custom React hooks
│ ├── services/ # API client
│ └── types/ # TypeScript types
└── shared/ # Shared types and utilities
- Runtime: Bun
- Desktop Framework: Electrobun
- Frontend: React 19 + TypeScript + Tailwind CSS
- Build Tool: Vite
- AI Integration: GitHub Copilot SDK
- Card Data: Scryfall bulk data with local caching (1 week TTL)
- Rules: MTG Comprehensive Rules (text format)
This application is not affiliated with Wizards of the Coast.
MIT
