No description
Find a file
Evgene-Kopylov 4c5dae6c0c Merge branch 'dev/2026-06-25/22-21' into 'main'
fix: обновляй кэш WASM до уведомления рендереров после ревью

See merge request Evgene-Kopylov/FSRS-plugin!103
2026-07-09 19:23:18 +03:00
docs clean 2026-06-23 08:32:18 +02:00
scripts Добавить check.sh: локальный прогон проверок, документировать в AGENTS.md 2026-05-23 13:48:59 +02:00
src fix: добавь пустую строку между фронтматтером и кнопкой в add-fsrs-fields 2026-07-08 22:42:15 +02:00
tests Update rebuild-log.sh 2026-07-02 21:48:18 +02:00
wasm-lib feat: вывод записи из повторений (card-retire) 2026-06-18 16:15:03 +03:00
.agentignore WIP перенос парсинга в WASM. Тесты растовой части прошли, но FIXME 2026-04-15 04:32:23 +02:00
.editorconfig Update .editorconfig 2026-04-20 20:29:41 +02:00
.gitignore Update rebuild-log.sh 2026-07-02 21:48:18 +02:00
.gitlab-ci.yml Dev/2026 06 11/17 49 2026-06-11 19:10:21 +03:00
.markdownlint.json MD, доки, линты 2026-05-13 21:46:03 +03:00
.markdownlintignore 0.12.0: однобуквенные псевдонимы d, s, r + доки 2026-05-14 14:18:38 +03:00
.npmrc плагин c WASM 2026-04-15 04:06:21 +02:00
.repogrokignore Squashed commit of the following: 2026-04-23 16:23:54 +02:00
.stylelintrc.json Добавить color-hex-length в stylelint, исправить #333 и #000 на полный формат 2026-05-14 15:50:54 +02:00
AGENTS.md feat: вывод записи из повторений (card-retire) 2026-06-18 16:15:03 +03:00
esbuild.config.mjs Убрать двойной билд WASM в dev, сократить вывод encode-wasm 2026-04-29 11:49:29 +02:00
eslint.config.mts feat: вывод записи из повторений (card-retire) 2026-06-18 16:15:03 +03:00
lefthook.yml lefthook: заменить пре-пуш джобы на scripts/check.sh 2026-05-23 13:57:10 +02:00
LICENSE Update LICENSE 2026-05-22 21:26:27 +02:00
manifest.json 0.19.1 2026-07-08 22:45:50 +02:00
package-lock.json 0.19.1 2026-07-08 22:45:50 +02:00
package.json 0.19.1 2026-07-08 22:45:50 +02:00
README.md doc clean 2026-06-05 11:38:08 +02:00
README.ru.md doc clean 2026-06-05 11:38:08 +02:00
README.zh.md doc clean 2026-06-05 11:38:08 +02:00
styles.css Update styles.css 2026-05-22 12:33:03 +02:00
tsconfig.json 0.3.0 Локализация и логи 2026-04-22 18:11:43 +03:00
version-bump.mjs Update .editorconfig 2026-04-20 20:29:41 +02:00
versions.json Обновить versions.json: 0.6.0 требует Obsidian 1.12.7 2026-04-27 19:50:51 +02:00
vitest.config.ts Добавлены тесты для команды вставки дефолтной таблицы 2026-04-26 20:51:04 +02:00

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-6 Algorithm — more efficient than SM-2
  • 🎯 Retention Control — 7097% 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 (SettingsCommunity pluginsBrowseFSRS).

Installation Requirements

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

Platform Support

Platform Status
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:

Field Description Notes
file card file name clickable link
reps number of repetitions completed
stability card stability (S) FSRS parameter
difficulty card difficulty (D) value from 0 to 10
retrievability retrievability (R) probability of correct recall
due next review date and time
state card state New, Learning, Review, Relearning
elapsed days since last review
scheduled days 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):

Parameter Default Description
request_retention 0.9 (90%) Target retention rate
maximum_interval 36500 days Maximum interval between reviews

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
  • rating0 (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

Setting Description Default
Request Retention Target retention level 0.9 (90%)
Maximum Interval Max interval (days) 36500 (~100 years)

Default Settings for New Cards

Setting Description Default
Initial Stability Initial stability 0.0
Initial Difficulty Initial difficulty for new cards 0.0

Display Settings

Setting Description Default
Auto Add Review Button Automatically add review button Disabled

Filter Settings

Setting Description Example
Ignore Patterns Ignore patterns .obsidian/, templates/

🧠 The FSRS Algorithm

FSRS is a modern spaced repetition algorithm by Jarrett Ye. Implements FSRS-6 (v6.0.0, rev af8448e). Compared to SM-2:

  • Learns memory patterns via machine learning
  • Adapts to your memory speed
  • Requires 2030% 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