Skip to content

Getting Started

An all-in-one toolkit for Magic: The Gathering decks, collections, and self-hosting.

Terminal window
curl -fsSL https://raw.githubusercontent.com/sloshy/ritual/main/scripts/install.sh | bash

You can also download a platform-specific binary from the releases page and run it directly:

Terminal window
./ritual --help

This project uses Bun as its runtime. First, install dependencies:

Terminal window
bun install

Then build the binary:

Terminal window
bun run build
Terminal window
./ritual new-deck "My Commander Deck" --format commander

Import decks from Archidekt, Moxfield, or MTGGoldfish:

Terminal window
./ritual import https://archidekt.com/decks/12345
Terminal window
./ritual price "My Commander Deck"

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:

Terminal window
./ritual build-site
./ritual serve

Then open http://localhost:3000 to view your deck collection.

These options are available on every command:

OptionDescription
--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

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:

Terminal window
# Run from anywhere, but operate on files in ~/my-collection
ritual --base-dir ~/my-collection build-site
# Price all decks in a specific project directory
ritual --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.

  • 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

Use structured output for automation:

Terminal window
./ritual price "My Commander Deck" --output json | jq '.totals'

Stream multiple card lookups as NDJSON:

Terminal window
./ritual card --from-file cards.txt --output ndjson --fields name,set,prices.usd

Avoid interactive prompts in CI:

Terminal window
./ritual import-account johndoe --all --non-interactive --dry-run
  • Prefer --output json or --output ndjson for script parsing.
  • Use --fields to project stable subsets of data.
  • Add --non-interactive (and --yes when needed) in headless environments.