Getting Started
An all-in-one toolkit for Magic: The Gathering decks, collections, and self-hosting.
Installation
Section titled “Installation”curl -fsSL https://raw.githubusercontent.com/sloshy/ritual/main/scripts/install.sh | bashirm https://raw.githubusercontent.com/sloshy/ritual/main/scripts/install.ps1 | iexOther Methods
Section titled “Other Methods”You can also download a platform-specific binary from the releases page and run it directly:
./ritual --helpBuilding from Source
Section titled “Building from Source”This project uses Bun as its runtime. First, install dependencies:
bun installThen build the binary:
bun run buildQuick Start
Section titled “Quick Start”Create Your First Deck
Section titled “Create Your First Deck”./ritual new-deck "My Commander Deck" --format commanderImport a Deck from a Website
Section titled “Import a Deck from a Website”Import decks from Archidekt, Moxfield, or MTGGoldfish:
./ritual import https://archidekt.com/decks/12345Get Pricing Information
Section titled “Get Pricing Information”./ritual price "My Commander Deck"Generate a Static Website (Experimental)
Section titled “Generate a Static Website (Experimental)”Ritual supports building static websites to showcase your decks (and soon, your collection). This is an experimental feature, so expect some rough edges. To build and serve the site locally:
./ritual build-site./ritual serveThen open http://localhost:3000 to view your deck collection.
Global Options
Section titled “Global Options”These options are available on every command:
| Option | Description |
|---|---|
--base-dir <path> | Use this directory instead of the current working directory |
--cache-server <host:port> | Use a remote cache server instead of local cache files |
--base-dir
Section titled “--base-dir”By default, Ritual reads and writes files relative to the directory you run it from (the current working directory). Use --base-dir to point Ritual at a different directory without needing to cd there first:
# Run from anywhere, but operate on files in ~/my-collectionritual --base-dir ~/my-collection build-site
# Price all decks in a specific project directoryritual --base-dir /projects/mtg price "My Deck"This affects all file paths: decks, collections, wanted lists, cache, config files, and the output dist/ directory. The directory locations themselves can be customized via ritual.config.json — paths in that file are interpreted relative to --base-dir.
Features
Section titled “Features”- Deck Management: Create and organize your MTG decks
- Multi-source Import: Import from Archidekt, Moxfield, MTGGoldfish, or local files
- Scryfall Integration: Full card search powered by Scryfall
- Pricing: Get min, max, and latest prices for your decks
- Static Site Generation: Create a self-hosted website to showcase your decks or collection
- Caching: Smart caching for fast card lookups
Scripting quickstart
Section titled “Scripting quickstart”Use structured output for automation:
./ritual price "My Commander Deck" --output json | jq '.totals'Stream multiple card lookups as NDJSON:
./ritual card --from-file cards.txt --output ndjson --fields name,set,prices.usdAvoid interactive prompts in CI:
./ritual import-account johndoe --all --non-interactive --dry-runMigration notes
Section titled “Migration notes”- Prefer
--output jsonor--output ndjsonfor script parsing. - Use
--fieldsto project stable subsets of data. - Add
--non-interactive(and--yeswhen needed) in headless environments.