Stage 3 of the recall system uses externally-posed cards — questions I didn’t write, so I can’t lean on remembering my own phrasing. Writing those by hand is the boring part, so I generate them from my topic notes with a small CLI with an LLM that runs entirely on my own hardware.

Using NotebookLM to generate the flashcards is a perfect alternative to this, however, it won’t use obsidian

topic.mdtopic.flashcards.md (Obsidian SR cards)

It runs against the local Qwen stackllama-server on :8080, model qwen3.6-35b-a3b — and uses grammar-constrained JSON output, so the model can only emit valid card objects and the code never has to defend against malformed text. Standard library only; nothing leaves the machine.

Usage

python flashcards.py <input.md> [-o OUTPUT] [--max-cards N] [--deck TAG] [--types basic,cloze]
FlagDefaultPurpose
<input.md>The prose note to convert. Required.
-o, --output<stem>.flashcards.mdWhere to write the cards.
--max-cards20Cap the number of cards.
--deckflashcardsDeck tag written at the top (#flashcards).
--typesbasic,clozeWhich card types to allow.

Why these choices

  • Grammar-constrained JSON — the model is forced to emit a schema-valid array of cards from token 0, so extraction is deterministic and parsing can’t fail. (Thinking is turned off: a thinking preamble conflicts with grammar-from-token-0.)
  • Low temperature (0.2–0.3) — this is extraction, not creative writing; I want the same note to produce the same cards.
  • Standard library onlyurllib, json, argparse. One file, no venv, no supply chain. It’s a dogfood project: built by the local LLM stack and run on it.

Output format

The CLI renders two card shapes into the Obsidian Spaced Repetition plugin’s Markdown syntax. Basic cards use a lone ? line as the front/back separator; cloze cards use ==highlight== deletions:

#flashcards
 
What is the primary purpose of encryption in transit (TLS/SSL)?
?
To prevent a man-in-the-middle reading the data: it's encrypted before sending and decrypted after receipt.
 
The three KMS key types by ownership are AWS Owned, ==AWS Managed==, and ==Customer Managed== keys.

Those cards then become the stage-3 review material the dashboard points me at.