Skip to content

list-all-cards

Write a deduplicated, alphabetically sorted manifest of every card known to your decks, collections, and wanted lists. Designed primarily as a deterministic cache key input for CI builds — its output changes only when the set of unique (name, set, collector number) tuples in your lists changes.

The manifest excludes quantities, finishes, conditions, notes, and card IDs. If a card appears in multiple lists or with the same printing in different decks, it is collapsed into a single entry.

Terminal window
./ritual list-all-cards [options]
OptionDescriptionDefault
-o, --output <file>Output file path (relative to base directory)all-cards.md
# All cards
- Black Lotus (LEA:232)
- Lightning Bolt
- Lightning Bolt (LEA:161)
- Sol Ring (CMR:472)
- Sol Ring (ECC:57)

Each line is a - name (SET:CN) entry, with the parenthesized printing omitted when a card has no set/collector number.

The generated GitHub Actions workflow uses this file as the cache key for the Scryfall data cache:

- name: Generate card manifest
run: ./ritual list-all-cards
- name: Restore Scryfall cache
uses: actions/cache@v5
with:
path: cache/
key: ritual-cache-${{ hashFiles('all-cards.md') }}

This means the cache is reused across builds whenever the set of cards in your lists hasn’t changed — even if you tweak finishes, conditions, notes, or quantities, or rearrange existing cards across files.

The default file name all-cards.md is added to the .gitignore generated by ritual init-site. You don’t need to commit it.

Generate the default manifest:

Terminal window
./ritual list-all-cards

Write to a custom location:

Terminal window
./ritual list-all-cards --output build/manifest.md

Use with --base-dir:

Terminal window
./ritual --base-dir ~/mtg list-all-cards