simple-ts-fsrs
A minimal implementation of the FSRS (Free Spaced Repetition Scheduler) algorithm written in TypeScript.
Published February 17, 2025 (Updated February 17, 2025)

simple-ts-fsrs offers a lightweight implementation of the FSRS algorithm. I created this package because I wanted a simple TypeScript library to use in a language learning program I'm making.
simple-ts-fsrs takes great inspiration from the Open Spaced Repetition project and I want to give thanks for all the contributors.
Installation
Even though the package is created using Deno it can be used with node.js as well.
Node.js
npx jsr add @austinshelby/simple-ts-fsrs
Deno
deno add jsr:@austinshelby/simple-ts-fsrs
I decided to host the package on JSR (https://jsr.io/@austinshelby/simple-ts-fsrs) because I got intrigued by this new package registry. Getting to develop my package fully in TypeScript was a massive productivity boost and I highly recommend giving JSR a go.
Quickstart
Getting started with simple-ts-fsrs
is easy. To assess your ability to recall information, first initialize FSRS (the default parameters are reasonable) and call the assessRecall
method with your rating.
The package is 100% TypeScript so you'll have great IDE autocompletion.
To assess already previously recalled information, just pass the previous assessment into the method.
You can also optionally pass a date as the time of the assessment.
I decided to create this package as I wasn't satisfied with the other options for spaced repetition scheduling algorithms. I focused on building a simple, easy-to-use API and clean code.
This package is currently under active development and being used in MandoFlow, the science-based way to learn Mandarin Chinese with personalized comprehensible input video recommendations that match your skill level and automatic flashcards.
Changelog
2.0.1
Fixed documentation on README.
2.0.0
Added getRetrievability
method to the Assessment class that allows users to get the chance to assess the information at a point in time. By default it uses the current time.
Renamed now
to date
in many places that use a Date. I feel like this change makes the API more easy to understand