No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Maximilian Jugl 3671a69fb0
All checks were successful
Build and create release / release (push) Successful in 40s
feat: add version flag (#1)
Reviewed-on: #1
2026-09-03 19:17:48 +02:00
.forgejo/workflows feat: add version flag (#1) 2026-09-03 19:17:48 +02:00
.gitignore feat: initial release 2026-09-02 19:36:07 +02:00
.goreleaser.yaml feat: add version flag (#1) 2026-09-03 19:17:48 +02:00
go.mod feat: initial release 2026-09-02 19:36:07 +02:00
LICENSE feat: initial release 2026-09-02 19:36:07 +02:00
main.go feat: add version flag (#1) 2026-09-03 19:17:48 +02:00
README.md feat: initial release 2026-09-02 19:36:07 +02:00

mtg-oracle-tool

A simple Go application that converts card data from Scryfall into Markdown files ready for Retrieval Augmented Generation (RAG).

Usage

mtg-oracle-tool requires the compressed oracle cards and rulings files from Scryfall. These can be downloaded by using the Scryfall bulk data API.

# Fetch oracle cards
ORACLE_CARDS_DOWNLOAD_URL="$(curl --fail -s https://api.scryfall.com/bulk-data/oracle-cards | jq -r '.jsonl_download_uri')"
curl --fail -o oracle-cards.jsonl.gz "${ORACLE_CARDS_DOWNLOAD_URL}"

# Fetch rulings
RULINGS_DOWNLOAD_URL="$(curl --fail -s https://api.scryfall.com/bulk-data/rulings | jq -r '.jsonl_download_uri')"
curl --fail -o rulings.jsonl.gz "${RULINGS_DOWNLOAD_URL}"

Pass the downloaded files to the application along with an output directory. If the directory doesn't exist, it will be created.

go run . -rulings rulings.jsonl.gz -oracle-cards oracle-cards.jsonl.gz -o ./output

License

Apache 2.0