A file-based spaced repetition system for Obsidian. All scheduling data is stored in YAML frontmatter—no external database required.
- File-based storage: All review data stored in YAML frontmatter
- Flexible cloze syntax: Supports both inline (
s;text;) and multiline cloze blocks - Review View: Customizable highlight color for hiding answer regions with smooth reveal
- Two workflows:
- Ad-hoc review: Review any single note on demand
- Session review: Queue-based review of all due cards
- SM-2 algorithm: Proven spaced repetition scheduling
- Configurable hotkeys: Customize keyboard shortcuts for all review actions
- Customizable appearance: Choose your own highlight color for hidden clozes
- Mobile-friendly: Large touch targets and bottom-anchored toolbar
- Minimal UI: Clean, distraction-free interface
- Download
main.js,manifest.json, andstyles.cssfrom the latest release - Create a folder
<vault>/.obsidian/plugins/darkh-srs/ - Copy the three files into that folder
- Reload Obsidian
- Enable "Darkh SRS" in Settings → Community plugins
- Clone this repo into
<vault>/.obsidian/plugins/darkh-srs/ - Run
npm installto install dependencies - Run
npm run devto watch for changes - Reload Obsidian and enable the plugin
- Open Settings → Darkh SRS
- Configure your flashcard folder (e.g.,
flashcards/) - Optionally customize the hidden cloze color to your preference
- Optionally toggle auto-enable review mode (on by default)
- Optionally adjust scheduler parameters and hotkeys
Create markdown files in your flashcard folder. Use cloze syntax to mark answers:
The s;Mitochondria; is the powerhouse of the cell.What are the main components of the CNS?
s;
1. The Brain
2. The Spinal Cord
e;- Open any flashcard note
- Run command: Toggle review view (Ctrl/Cmd+P)
- Click Reveal Next to show each cloze
- Rate with Again, Hard, Good, or Easy
- Run command: Start review session
- All due cards will be queued
- Review each card in sequence
- Session auto-advances after each rating
The plugin provides commands that only work when Review View is active. You can assign your own keyboard shortcuts through Settings → Hotkeys:
- Reveal next cloze: Show the next hidden answer
- Rate card as 'Again': Mark card as failed (review in 1 day)
- Rate card as 'Hard': Mark with minimal progress
- Rate card as 'Good': Standard SM-2 progression
- Rate card as 'Easy': Boosted progression
Suggested hotkey assignments:
- Space for "Reveal next cloze"
- 1, 2, 3, 4 for the rating commands
Commands automatically enable/disable based on whether Review View is active and which actions are currently available.
The plugin stores scheduling data in your notes:
---
sr: true
due: 2025-11-09
interval: 7
ease: 2.5
reps: 3
lapses: 0
last_review: 2025-11-02
---- due: Next review date (ISO format)
- interval: Days until next review
- ease: SM-2 ease factor
- reps: Successful repetitions
- lapses: Times marked "Again"
- last_review: Last review date
Uses a modified SM-2 algorithm:
- Again: Reset progress, review in 1 day
- Hard: Minimal interval increase (1.2x)
- Good: Standard SM-2 progression
- Easy: Boosted interval (1.3x ease factor)
The plugin is fully compatible with mobile:
- Bottom-anchored toolbar for thumb reach
- Large touch-friendly buttons
- Progress banner instead of status bar
- Responsive design
- Keep your flashcard folder organized with subfolders
- Use meaningful file names for easy identification
- Flashcards with scheduling data automatically open in Review View (can be disabled in settings)
- You can edit notes while in Review View
- Clozes update automatically as you type
- Cards with no clozes can still be rated
- Check that flashcard folder is configured correctly
- Verify folder path exists in your vault
- Ensure notes have cloze syntax (
s;ande;)
- Verify you've assigned hotkeys in Settings → Hotkeys (search for "Darkh")
- Confirm Review View is active (toolbar should be visible)
- Rating commands only work when all clozes are revealed
- Reveal command only works when unrevealed clozes remain
- Check file permissions
- Verify note is not read-only
- Look for errors in Developer Console (Ctrl+Shift+I)
npm install
npm run buildnpm run devsrc/
main.ts # Plugin entry point
settings.ts # Settings and settings tab
types.ts # TypeScript interfaces
scheduler.ts # SM-2 algorithm
cloze-parser.ts # Cloze syntax parser
yaml-service.ts # YAML frontmatter I/O
insight-discovery.ts # Find due notes
session-manager.ts # Queue management
review-view-controller.ts # CodeMirror 6 integration
hotkey-manager.ts # Hotkey commands
ui/
review-toolbar.ts # Toolbar component
session-progress.ts # Progress indicator
utils.ts # UI utilities
This plugin:
- ✅ Operates entirely offline
- ✅ Stores all data in your vault
- ✅ Does not collect telemetry
- ✅ Does not make network requests
- ✅ Does not access files outside your vault
MIT License - see LICENSE file for details.
Issues and pull requests welcome! Please ensure:
- Code follows existing style
- All TypeScript compiles without errors
- Manual testing on desktop and mobile
Built with:
Inspired by spaced repetition systems like Anki and the Obsidian community.