Deck records
A deck names a collection of cards and defines its ordered fields, visibility, and study-mode settings. Cards refer to it by deckId; the filename is not the deck's identity.
Location and basic example
Place one JSON object per physical line in any content/decks/*.jsonl file, for example content/decks/tokyo.jsonl or content/decks/my-decks.jsonl. Filenames are arbitrary; the reader discovers all files directly in that canonical directory. Do not add another enclosing directory. The collection may be omitted when the package contains no decks and nothing references a deck.
This complete JSONL line defines a deck. It requires the folder-languages record shown under Review folders:
To use this deck at the root without a folder, omit folderId or set it to null. The media fields do not require media until a card supplies a mediaPath.
Full example
Copy the runnable content/decks/00000.jsonl, or read its expanded records below. Each object occupies one physical line in the file; the formatting here is for reading.
These two decks collectively define all 11 field types. Both include every deck and study-mode setting. Their folder companions are in review folders, and their values are shown in full cards. TTS references a field ID in the same layout.
Language deck: seven field types
Programming deck: remaining field types
Record properties
Extra properties are ignored, including inside settings sections. Recognized settings retain their value and reference rules. Optional timestamps are not generated for you. See timestamp syntax for timezone offsets, precision, and import persistence.
Field layout
The order of fields is the display order. Each field requires id, name, side, and type; generalSettings and type-specific settings are optional. A field's ID is scoped to its owning deck or template preset, and names must be unique in that layout after trimming and lowercasing.
Every deck needs a front-capable field (front or both) and a back-capable field (back or both). A single both field is sufficient. A note field alone satisfies neither requirement. Cloze and image-occlusion fields must use both. The default package-validation limits are 20 fields per deck and 30 UTF-16 code units per trimmed field name. The schema also allows 20 fields, but its field-name length counts untrimmed Unicode code points. The app configures different metadata limits; see limits.
The field reference gives the values, settings, defaults, null behavior, and examples for all 11 types. The same definitions are used in card-template presets.
Deck settings
deckSettings contains only:
Omitting deckSettings, writing {}, or writing {"showTags":null} all gives showTags:true. Writing "deckSettings":null is invalid.
Study-mode settings
The file format preserves two optional sections in modeSettings: flashcard and matching. Omit a section or use {} to keep that mode's defaults. A section explicitly set to null is invalid.
modeSettings.flashcard
Counts and delays are parsed as integers. The format does not impose additional numeric bounds on these mode settings; use positive session counts and nonnegative delays when authoring.
modeSettings.matching
Pair counts are words, not numbers. Use IDs from this deck's fields for selected columns. The format parses the selection strings without checking that the referenced fields exist; choose valid field IDs for useful imported settings.
Complete settings example
This expanded JSON is an explanatory nested fragment, not a complete JSONL record. Its keys belong inside a deck record. It shows every deck/mode property, using the basic deck's field IDs:
Relationships and additional examples
folderIdrefers to an explicit review folder, not an SRS folder.- Each card names its deck with an explicit
deckId; keys in the card'svaluesmust belong to this deck'sfieldsand have matching types. - SRS sets may include this deck's explicit ID in
deckIds. A deck that omittedidcannot be a relationship target. Nested field IDs remain required. Under Override Existing, an anonymous deck still receives new nested field IDs. - Field-referenced TTS settings may refer only to supported fields in the same deck; see the TTS rules.
An anonymous deck, which cannot be a deckId or deckIds target. Its field IDs stay required:
A complete, independent deck with one cloze field is valid because that field covers both sides. This is one JSONL record:
An empty deck may have no cards, but fields:[] is invalid because it supplies neither side. Omitting the entire decks collection is different from supplying an invalid empty layout.
Schemas: deck record, field definition, and field settings. Layout and relationship checks described here are enforced by the reader in addition to the schema's structural checks.
AI instruction preset selection
aiInstructionPresetId is optional. A nonempty string selects a companion in preferences/ai_instruction_presets/*.jsonl; that record must provide an explicit ID. Null selects None. Omission preserves an existing selection on override, while new decks default to None. Unknown IDs, empty strings and non-string values are invalid. The full Japanese deck above requires the companion instruction preset.