FSRS

approved

by evgene-kopylov

This plugin has not been manually reviewed by Obsidian staff. Free Spaced Repetition Scheduler integration. Implements FSRS algorithm for spaced repetition flashcards directly in your notes.

โ˜… 2 starsโ†“ 400 downloadsUpdated 12d ago

FSRS for Obsidian

Free Spaced Repetition Scheduler โ€” a modern spaced repetition algorithm for Obsidian. The plugin turns your notes into FSRS-based flashcards for effective memorization.

Obsidian TypeScript Rust License pipeline status DeepSeek

๐Ÿ“‹ Table of Contents

[toc]

๐Ÿš€ Features

  • ๐Ÿ“Š FSRS Algorithm โ€” more efficient than SM-2
  • ๐ŸŽฏ Retention Control โ€” 70โ€“97% target level
  • โšก High Performance โ€” Rust/WASM for fast computations
  • ๐Ÿ”„ Dynamic Interface โ€” auto-updating lists
  • ๐Ÿ“ฑ Mobile Support โ€” iOS(?), Android(โœ“)
  • ๐ŸŽจ Flexible Configuration โ€” filtering, sorting, customization
  • ๐Ÿ“ˆ Statistics โ€” track your progress

๐Ÿ“ฆ Installation

Install from the community catalog (Settings โ†’ Community plugins โ†’ Browse โ†’ FSRS).

Beta versions via BRAT

  1. Install BRAT
  2. Add the repository: https://github.com/Evgene-Kopylov/fsrs_plugin

Installation Requirements

  • Obsidian v1.12.7 or higher
  • WebAssembly support (enabled by default)

Platform Support

PlatformStatus
Linux (x86_64)โœ…
macOSโ” (not tested)
Windows (x86_64)โœ…
Androidโœ…
iOSโ” (not tested)

๐ŸŒ Quick Start

  1. Create a card โ€“ open a note โ†’ run the command Add FSRS fields to file header (Ctrl/Cmd+P).
  2. Add a review button โ€“ use the command FSRS: Insert review button (Ctrl/Cmd+P), or insert a ```fsrs-review-button``` block manually, or enable auto-adding in settings.
  3. Insert a table โ€“ use the command Insert default fsrs-table (Ctrl/Cmd+P), or create a ```fsrs-table ...``` block manually.
  4. Start reviewing โ€“ open the table, hover over a file name, and click a rating.

A detailed step-by-step guide with screenshots: Usage Guide

๐Ÿ“– Usage

The fsrs-table Block (SQL-like Syntax)

The fsrs-table block uses SQL-like syntax to customize how cards are displayed.

Basic syntax:

```fsrs-table
SELECT field1, field2 as "Header", field3
ORDER BY field4 DESC
LIMIT 30
```

Available columns:

FieldDescriptionNotes
filecard file nameclickable link
repsnumber of repetitions completed
stabilitycard stability (S)FSRS parameter
difficultycard difficulty (D)value from 0 to 10
retrievabilityretrievability (R)probability of correct recall
duenext review date and time
statecard stateNew, Learning, Review, Relearning
elapseddays since last review
scheduleddays until next review

Block parameters:

  • SELECT โ€” choose fields to display (required)
  • ORDER BY โ€” sort by a specified field (ASC ascending, DESC descending)
  • LIMIT โ€” limit the number of rows (0 uses the value from plugin settings)

Limitations:

  • No subqueries, JOIN, aggregations (COUNT, SUM, AVG), GROUP BY, UNION
  • WHERE supports only simple conditions: =, !=, <, >, <=, >=, ~ (regex), !~, AND, OR
  • The only function available is date_format(field, 'format')
  • Unknown field in SELECT, WHERE, ORDER BY โ€” error with field name indicated
  • Column order in SELECT is preserved in the displayed table

More: How the SQL parser works

Examples:

  1. Urgent cards (by due date):
```fsrs-table
SELECT file as " ", r as "R",
       s as "S", d as "D",
       due as "Next review"
LIMIT 20
```
  1. All cards sorted by date:
```fsrs-table
SELECT *
ORDER BY due ASC
LIMIT 100
```

FSRS Parameters and Configuration

The plugin uses rs-fsrs โ€” the official Rust FSRS implementation by the algorithm authors (L-M-Sherlock). Rationale:

  • rs-fsrs โ€” maintained by the FSRS team, synced with the Python reference implementation, actively updated.
  • fsrs-rs โ€” third-party implementation, long outdated, incompatible with current FSRS versions.

User-configurable (Settings โ†’ FSRS โ†’ Algorithm Parameters):

ParameterDefaultDescription
request_retention0.9 (90%)Target retention rate
maximum_interval36500 daysMaximum interval between reviews
enable_fuzztrueRandomize intervals to counter card grouping

Not yet configurable:

  • w weights (17 parameters) โ€” the core of FSRS, determining the forgetting curve. The plugin uses defaults optimized by FSRS authors on the Anki corpus (millions of reviews).
  • Parameter optimization on user statistics โ€” not supported. Users cannot retrain weights on their responses. Planned for future versions.

Review Button in Notes fsrs-review-button

```fsrs-review-button
```

FSRS Card Format

FSRS cards are stored in the note's frontmatter under the reviews field:

---
reviews:
  - date: "2026-01-15T10:30:00Z"
    rating: 2
  - date: "2026-01-20T14:15:00Z"
    rating: 3
---

Fields of each review session:

  • date โ€” date/time in ISO 8601
  • rating โ€” 0 (Again), 1 (Hard), 2 (Good), or 3 (Easy)

Notes:

  • reviews can be [] for new cards
  • Each review adds a session to the array
  • FSRS calculates the next review date based on history
  • The plugin adds these fields automatically

๐ŸŽฎ Plugin Commands

Via Command Palette (Ctrl/Cmd+P)

  • FSRS: Add FSRS fields to file header
  • FSRS: Find cards to review
  • FSRS: Review current card
  • FSRS: Remove last card review
  • FSRS: Show review history
  • FSRS: Insert review button
  • FSRS: Insert default fsrs-table
  • FSRS: Show fsrs-table syntax help

Via the Status Bar

  • Button ๐Ÿ”„FSRS: at the bottom of the Obsidian window

โš™๏ธ Settings

FSRS Algorithm Parameters

SettingDescriptionDefault
Request RetentionTarget retention level0.9 (90%)
Maximum IntervalMax interval (days)36500 (~100 years)
Enable Interval FuzzRandomize intervals (ยฑ5%)Enabled

Default Settings for New Cards

SettingDescriptionDefault
Initial StabilityInitial stability0.0
Initial DifficultyInitial difficulty for new cards0.0

Display Settings

SettingDescriptionDefault
Auto Add Review ButtonAutomatically add review buttonDisabled

Filter Settings

SettingDescriptionExample
Ignore PatternsIgnore patterns.obsidian/, templates/

๐Ÿง  The FSRS Algorithm

FSRS is a modern spaced repetition algorithm by Jarrett Ye. Implements FSRS-5 (rs-fsrs v1.2.1). Compared to SM-2:

  • Learns memory patterns via machine learning
  • Adapts to your memory speed
  • Requires 20โ€“30% fewer reviews for the same retention level
  • Handles breaks (weeks/months) much better

Key Concepts

  • Retrievability (R) โ€” probability of successful recall
  • Stability (S) โ€” time it takes for R to decay from 100% to 90%
  • Difficulty (D) โ€” information difficulty (affects how stability grows)

The algorithm uses 21 parameters optimized on millions of reviews.

Read more: ABC of FSRS

๐Ÿ› ๏ธ Development

Development happens on GitLab: gitlab.com/Evgene-Kopylov/FSRS-plugin. The GitHub repository is a mirror.

Tech Stack

  • Frontend: TypeScript, Obsidian API
  • Algorithm: Rust (compiled to WebAssembly)
  • Build: esbuild, wasm-pack
  • Testing: Rust (cargo test) + TypeScript (vitest)

Rust and TypeScript Responsibility Split

Principle: Rust is the computation core, TypeScript is a thin wrapper for the Obsidian API.

Release Pipeline

The project uses GitLab CI/CD for automated build, test, and release:

Building from Source

Build Requirements

  • Node.js 18+
  • npm
  • Rust (with wasm32-unknown-unknown target)
  • wasm-pack
  • binaryen (wasm-opt, installed via npm install)
git clone https://gitlab.com/Evgene-Kopylov/FSRS-plugin.git
cd FSRS-plugin
npm install
npm run build

# Install plugin in vault
ln -s "$PWD" /path/to/vault/.obsidian/plugins/fsrs

# Development (optional)
npm run dev

WASM Integration

The plugin uses Rust/WASM for FSRS computations:

  • WASM binary is embedded into the plugin via base64
  • No network requests โ€” everything runs locally
  • High performance โ€” native-level computation

Read more: WASM Integration

๐Ÿ“„ License

This plugin is licensed under LGPLv3.

LGPL permits:

  • Use in proprietary software
  • Requires modified library source code to be open

Main Rights

  • โœ… Use (free, including commercial use)
  • โœ… Study (access to source code)
  • โœ… Distribute
  • โœ… Improve

Requirements

  • Library modifications must remain under LGPLv3
  • Dynamic linking is allowed without disclosing application code
  • Maintain copyright notices
  • Provide source code when distributing modifications

For Obsidian Users

  • Free to use for personal/commercial purposes
  • Derivative plugins must be under LGPLv3
  • Modifications to Rust WASM components must be under LGPLv3

Full text: LICENSE

๐Ÿ™ Acknowledgements

  • Jarrett Ye (ๅถๅณปๅณฃ) โ€” author of the FSRS algorithm
  • Obsidian Community โ€” inspiration and support
  • Rust Community โ€” WASM tooling
  • DeepSeek โ€” a powerful and convenient development tool (code, refactoring, localization)
  • All contributors โ€” improvements and bug reports

๐Ÿ“š Additional Resources

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.