import
Import a deck from a URL, or a deck, collection, or wanted list from a local text file.
./ritual import <source>When the source is a text file, import asks whether the cards are a deck, a
collection, or a wanted list (pass --type to skip the prompt). URL imports
always create decks — importing a collection or wanted list from a URL is not
supported.
Arguments
Section titled “Arguments”| Argument | Description | Required |
|---|---|---|
<source> | URL (Archidekt/Moxfield/MTGGoldfish) or local file path | Yes |
Options
Section titled “Options”| Option | Description |
|---|---|
-t, --type <type> | List type for a text file import: deck, collection, or wanted. Skips the interactive prompt. URLs always import decks. |
-o, --overwrite | Overwrite existing lists without prompting |
--non-interactive | Disable interactive prompts; fail when user input is required. Without --type, a text file import defaults to a deck. |
-y, --yes | Automatically answer yes to prompts (implies overwrite on conflicts and, like --non-interactive, defaults to a deck without --type) |
--dry-run | Preview actions without writing files |
--moxfield-user-agent <agent> | Moxfield-approved unique User-Agent string (required for Moxfield imports unless env is set) |
Supported Sources
Section titled “Supported Sources”| Source | Example URL |
|---|---|
| Archidekt | https://archidekt.com/decks/12345 |
| Moxfield | https://moxfield.com/decks/abc123 |
| MTGGoldfish | https://www.mtggoldfish.com/deck/12345 |
| Local File | ./my-deck.txt |
Examples
Section titled “Examples”Import a deck from Archidekt:
./ritual import https://archidekt.com/decks/12345Import a deck from Moxfield:
./ritual import https://moxfield.com/decks/abc123Import from Moxfield with an explicit user agent:
./ritual import https://moxfield.com/decks/abc123 --moxfield-user-agent "YourName Ritual Import/1.0"Import from a local text file (prompts for the list type):
./ritual import ./decklist.txtImport a text file into a collection:
./ritual import ./binder.txt --type collectionImport a text file into a wanted list without prompts:
./ritual import ./wants.txt --type wanted --non-interactivePreview an import without writing files:
./ritual import ./decklist.txt --dry-run --non-interactiveMoxfield User-Agent Requirement
Section titled “Moxfield User-Agent Requirement”Moxfield imports require a unique Moxfield-approved user agent string.
- Set
MOXFIELD_USER_AGENT, or - Pass
--moxfield-user-agent <agent>
If you need a unique user agent string, contact Moxfield support.
Local File Format
Section titled “Local File Format”When importing from a local file, use the standard decklist format. ## Section
headers split the cards into sections:
4 Lightning Bolt4 Monastery Swiftspear2 Mountain
## Sideboard2 PyroblastLines may also carry a printing, finish, condition, and note, e.g.
1 Sol Ring (C19:221) [foil] [NM] {trade binder}.
When importing into a collection or wanted list, each line expands to one
bullet line per copy (4 Lightning Bolt becomes four - Lightning Bolt lines),
matching how those lists track individual physical cards.
Collection imports require a printing ((SET:123)) on every line, since
collection entries always reference a specific physical printing. Wanted list
entries may be name-only.