Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
T

ts-fsrs

> 编程语言
Open source

ts-fsrs is a versatile package written in TypeScript that supports ES modules, CommonJS, and UMD.

733 stars0 likes0 views
WebsiteGitHub

About

ts-fsrs is a versatile package written in TypeScript that supports ES modules, CommonJS, and UMD.

Introduction | 简体中文 |はじめに


ts-fsrs

ts-fsrs is a TypeScript toolkit for building spaced repetition systems with FSRS.

Packages

This repository contains two main packages:

Package Description FSRS Version Package Version Downloads
ts-fsrs the scheduler for review flows
@open-spaced-repetition/binding the optimizer for parameter training and CSV conversion

Installation

All current packages in this repository require Node.js >=20.0.0.

Node.js 16 and 18 are end-of-life, so we no longer support versions earlier than Node.js 20. See the official release status page.

bash
pnpm add ts-fsrs

If you also need parameter optimization from review logs:

bash
pnpm add @open-spaced-repetition/binding

Basic Usage

Use ts-fsrs to schedule reviews:

typescript
import { createEmptyCard, fsrs, Rating } from 'ts-fsrs'

const scheduler = fsrs()
const card = createEmptyCard()

// Preview all four possible outcomes before the user answers.
const preview = scheduler.repeat(card, new Date())
// Apply the final rating after the user has already answered.
const result = scheduler.next(card, new Date(), Rating.Good)

console.log(preview[Rating.Good].card)
console.log(result.card)
console.log(result.log)

Use @open-spaced-repetition/binding when you want to train FSRS parameters from review logs. For CSV conversion, timezone handling, browser/WASI setup, and training examples, see packages/binding/README.md.

More Documentation

For detailed usage, advanced examples, browser/WASI setup, and API notes:

  • packages/fsrs/README.md
  • packages/binding/README.md
  • TypeDoc API docs
  • State transition diagram for cards

Examples

  • ts-fsrs package examples
  • @open-spaced-repetition/binding package examples

Other Implementations

FSRS is also available in other languages and ecosystems:

  • awesome-fsrs implementations

Contribute

For how to setup a local development eniroment, how to set up a Dev Container, and contribution guidelines, see CONTRIBUTING.md.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptfsrsopen-spaced-repetitionosrspaced-repetition-algorithm

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言