card
Look up a single card by name on Scryfall, or a batch of names from a file or stdin.
ritual card [name] [options]Arguments
Section titled “Arguments”| Argument | Description | Required |
|---|---|---|
[name] |
Card name to search for | Conditional (required unless using --stdin or --from-file) |
Options
Section titled “Options”| Option | Description |
|---|---|
--fuzzy |
Use fuzzy matching instead of exact |
--set <code> |
Filter by set code |
--stdin |
Read card names from stdin (one per line) |
--from-file <path> |
Read card names from a file (one per line) |
--fields <list> |
Comma-separated fields for json/ndjson output |
--output <format> |
Output format (json, ndjson, or text) |
There is no --quiet: everything the command prints is either a card or an error (shared convention).
Batch output shape
Section titled “Batch output shape”--stdin and --from-file look up every name in the input.
--output json(the default): an input of two or more names emits one JSON array for the whole batch, like a multi-pagescrysearch. Cards that were found are still emitted when some lookups fail (failures go to stderr and set the exit code); if all fail, the output is[]. A single name, as an argument or a one-line batch, emits a bare card object.--output ndjsonstreams one JSON object per card as it arrives. Use this for large inputs.--output textprints oneName (SET)line per card.
Examples
Section titled “Examples”Look up a card by exact name:
ritual card "Sol Ring"Use fuzzy matching for approximate names:
ritual card "sol rng" --fuzzyLook up a specific printing by set:
ritual card "Lightning Bolt" --set leaGet plain text output:
ritual card "Sol Ring" --output textBatch lookup from stdin as one JSON array:
printf "Sol Ring\nArcane Signet\n" | ritual card --stdin --output jsonStream a large batch as NDJSON instead:
ritual card --from-file cards.txt --output ndjson --fields name,set,prices.usdExit Codes
Section titled “Exit Codes”| Code | Meaning |
|---|---|
0 |
All requested cards were found and printed |
1 |
Request failure (network error or a Scryfall server error) |
2 |
Usage error (missing card name, --stdin with --from-file, invalid fields) |
3 |
Not found (a card does not exist, or the --from-file file could not be read) |
In batch mode each failure is reported individually. If both a request failure and a not-found occur, the exit code is 1.
Ritual is unofficial Fan Content permitted under the Fan Content Policy. Not approved or endorsed by Wizards of the Coast. Portions of the materials used are property of Wizards of the Coast. ©Wizards of the Coast LLC.
Card data, images and symbols come from Scryfall, which is not affiliated with this project. Ritual is free software under the AGPL-3.0. License and attribution.