A beautiful, fast spaced repetition flashcard app for the terminal.
███████╗██████╗ ██╗
██╔════╝██╔══██╗██║
███████╗██████╔╝██║
╚════██║██╔══██╗██║
███████║██║ ██║███████╗
╚══════╝╚═╝ ╚═╝╚══════╝
spaced repetition learning
Built with Ratatui for a modern TUI experience.
- SM-2 Spaced Repetition - Optimal review scheduling based on recall quality
- Anki Compatibility - Import/export
.apkgfiles with full scheduling data - Card Browser - View, edit, and delete cards with full metadata
- Statistics Dashboard - Track total reviews, daily/weekly streaks, cards by difficulty
- 10 Themes - Beautiful color schemes including Kanagawa Wave
- Backup System - Export/import all decks as JSON
- CSV Import - Bulk import from spreadsheets
- Keyboard-Driven - Fast, efficient studying
brew tap kearnsw/tap
brew install srlgit clone https://github.com/kearnsw/flashcards.git
cd flashcards
cargo install --path .# Launch the TUI
srl
# Export backup (JSON)
srl --export-backup ~/backup.json
# Import backup (JSON)
srl --import-backup ~/backup.json
# Import CSV
srl --import cards.csv --import-name "My Deck"
# Import folder of CSVs
srl --import-folder ./decks/
# Import from Anki (.apkg or .txt)
srl --import-anki deck.apkg
srl --import-anki vocab.txt --import-anki-name "Spanish"
# Export to Anki (preserves scheduling progress)
srl --export-anki my_decks.apkg| Key | Action |
|---|---|
j/k |
Navigate |
Enter |
Study deck |
b |
Browse cards |
s |
Statistics |
n |
New deck |
d |
Delete deck |
x |
Export backup |
t |
Cycle theme |
q |
Quit |
| Key | Action |
|---|---|
Space |
Show answer |
1-4 |
Rate recall (Again/Hard/Good/Easy) |
a |
Add card |
b |
Browse cards |
Esc |
Back to decks |
| Key | Action |
|---|---|
j/k |
Navigate cards |
e |
Edit card |
d |
Delete card (press twice) |
a |
Add card |
Esc |
Back |
| Key | Action |
|---|---|
Tab |
Switch field |
Enter |
Save |
Esc |
Cancel |
Spaced repetition is a learning technique that incorporates increasing intervals of time between subsequent reviews of previously learned material. This method exploits the psychological spacing effect, which demonstrates that learning is more effective when study sessions are spaced out over time rather than massed together.
The core insight is that memories have a "forgetting curve" - we forget information at an exponential rate after learning it. By reviewing material just before we're about to forget it, we can reset and strengthen the memory with optimal efficiency.
SRL implements the SM-2 (SuperMemo 2) algorithm, developed by Piotr Wozniak in 1987. SM-2 is the foundation of modern spaced repetition software.
Each card tracks:
- Ease Factor (EF): A multiplier (starting at 2.5) indicating how easy the card is
- Interval: Days until the next review
- Repetitions: Number of successful reviews in a row
When you review a card, you rate your recall from 0-5 (SRL uses 1-4):
| Rating | Meaning | Effect |
|---|---|---|
| Again (1) | Complete blackout | Reset to beginning, EF decreases |
| Hard (2) | Significant difficulty | Interval × 1.2, EF decreases slightly |
| Good (3) | Correct with hesitation | Interval × EF |
| Easy (4) | Perfect, instant recall | Interval × EF × 1.3, EF increases |
For successful recalls (rating ≥ 3):
new_interval = old_interval × ease_factor
ease_factor = max(1.3, EF + (0.1 - (5-q) × (0.08 + (5-q) × 0.02)))
Where q is the quality of response (0-5 scale).
- Wozniak, P. A. (1990). Optimization of repetition spacing in the practice of learning. Master's thesis, University of Technology in Poznan.
- Wozniak, P. A., & Gorzelanczyk, E. J. (1994). Optimization of repetition spacing in the practice of learning. Acta Neurobiologiae Experimentalis, 54, 59-62.
- SM-2 Algorithm Description (SuperMemo)
Research has consistently shown that spaced repetition can:
- Reduce study time by 50% or more compared to massed practice
- Improve long-term retention from ~20% to ~80%+
- Enable learning of large amounts of material (10,000+ items)
Key studies:
- Cepeda, N. J., et al. (2006). Distributed practice in verbal recall tasks: A review and quantitative synthesis. Psychological Bulletin, 132(3), 354-380.
- Karpicke, J. D., & Roediger, H. L. (2008). The critical importance of retrieval for learning. Science, 319(5865), 966-968.
SRL supports full round-trip compatibility with Anki:
# Import .apkg package (preserves all scheduling data)
srl --import-anki my_deck.apkg
# Import tab-separated text export
srl --import-anki vocab.txt --import-anki-name "Vocabulary"Preserved on import:
- Card content (front/back)
- Interval (days until next review)
- Ease factor
- Repetition count
- Lapse count
- Tags
# Export all decks to Anki format
srl --export-anki my_decks.apkgPreserved on export:
- All card content
- Full scheduling state
- Deck names and descriptions
- Tags
The exported .apkg file can be imported directly into Anki Desktop or AnkiMobile.
front,back
Question 1,Answer 1
Question 2,Answer 2Tab-separated format with optional tags:
front<TAB>back
front<TAB>back<TAB>tag1 tag2
JSON backups contain all decks with full card data and review history:
{
"version": 1,
"created_at": "2025-01-06T12:00:00",
"decks": [...]
}We welcome contributions! Please see CONTRIBUTING.md for guidelines.
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Run tests:
cargo test - Submit a pull request
MIT - see LICENSE for details.