README file from
GithubRecallFlow AI
Generate AI-powered flashcards from your Obsidian notes, then review them using the FSRS (Free Spaced Repetition Scheduler) algorithm — all locally within your vault.
✨ Features
🧠 AI Flashcard Generation
- From selection — highlight text and generate a single focused card via right-click or command palette
- From entire note — process the full Markdown document into 3–6 mixed-type flashcards
- Preview & refine — inspect, edit, and regenerate AI-generated cards before saving
- Three card types: Q&A, Cloze (fill-in-the-blank), Multiple Choice
📆 FSRS Spaced Repetition
- Cards follow FSRS across 4 lifecycle states: New → Learning (~10min–1d) → Review (e.g., 3d ➔ 10d ➔ 1mo) → Relearning (≤1d)
- Interactive review: typed answers for Q&A, fill-the-blank for cloze, tap-to-select for choice
- Four ratings: Again (1), Hard (2), Good (3), Easy (4) to fine-tune memory curve
- Configure maximum new and review cards per day
🔥 Cramming Mode (Rerun)
- Re-quiz today's reviewed cards without affecting FSRS scheduling
- Full state persistence — navigate freely without losing answers
📋 Card Manager
- Search, edit, validate, and delete flashcards
- View metadata: card type, FSRS state, last review, due date, source, creation time
📊 Activity Heatmap
- 12-month GitHub-style contribution grid of daily review counts
🌐 Multi-Language UI
- English, 中文, 日本語, 한국어
- AI-generated card language configurable independently
🔒 Privacy-First
- No telemetry, no background network requests
- All data stored locally in vault plugin data
- Review works entirely offline
📖 How It Works
- Configure your LLM endpoint (base URL, API key, model) in Settings → RecallFlow AI
- Generate cards from selection or entire note via commands, ribbon, or right-click
- Preview in the generation modal — edit, regenerate, then confirm to save
- Review due cards in the immersive modal — answer, rate, repeat
- Rerun to cram today's cards without resetting the FSRS algorithm
- Manage your card library with search, edit, and validation tools
🚀 Installation
| Method | Steps |
|---|---|
| Community Plugins | Settings → Community plugins → Browse → "RecallFlow AI" → Install & Enable |
| BRAT | Add repo URL in BRAT → Enable plugin |
| Manual | Download main.js, manifest.json, styles.css → copy to <vault>/.obsidian/plugins/recallflow-ai/ → Reload & Enable |
⚙️ Settings
| Setting | Description |
|---|---|
| Base URL | OpenAI-compatible endpoint (default: https://api.openai.com/v1) |
| API Key | Credential — stored locally in vault data |
| Model | Model ID (e.g., gpt-4o, claude-3-5-sonnet, deepseek-chat) |
| Test Connection | Verify your API key, base URL, and model configuration |
| UI & Card Language | Interface language + default AI card language |
| Max New / Day | Cap on new cards per day across all sessions |
| Max Review / Day | Cap on due review cards per day across all sessions |
| Rerun Today's Cards | Cramming mode — re-quiz without FSRS impact |
| Edit Cards | Open Card Manager to browse/search/edit/delete |
| Activity Heatmap | 12-month daily review visualisation |
🎯 Commands
| Command | Description |
|---|---|
| Start review session | Open review modal for cards due today |
| Generate AI flashcards from selection | Create cards from highlighted text |
| Generate AI flashcards from entire note | Create cards from active Markdown note |
Right-click context menu also offers generation when text is selected.
💬 Card Types
| Type | Front | Answer |
|---|---|---|
| Q&A | Open-ended question | Free-text answer |
| Cloze | Sentence with {____} blanks |
Array of terms |
| Choice | Question + 4 options (A–D) | One correct option |
All three types are generated together. The AI decides the mix based on your note content.
🔧 Development
Requirements: Node.js 18+, npm
npm install
npm run dev # Watch mode — writes main.js on change
npm run build # Production bundle
npm run lint # ESLint check
Copy main.js, manifest.json, styles.css into <vault>/.obsidian/plugins/recallflow-ai/ for local testing.
Project Structure
src/
├── main.ts Entry point, commands, ribbon, menus
├── types.ts Type definitions, defaults
├── services/
│ ├── fsrsService.ts FSRS-5 scheduler, due-card queue, limits
│ ├── i18n.ts Translations (en / zh / ja / ko)
│ └── llmService.ts LLM prompt, API call, parser
└── ui/
├── cardManageModal.ts Browser, search, edit, delete
├── cardPreviewModal.ts AI preview with editing & regenerate
├── reviewModal.ts Interactive review, ratings, cramming
└── settingsTab.ts Settings, test connection, heatmap
Tech Stack
| Dependency | Role |
|---|---|
| Obsidian API | Plugin lifecycle, UI, vault I/O |
| TypeScript | Type-safe development |
| esbuild | Bundling to main.js |
ESLint + eslint-plugin-obsidianmd |
Code quality |
🔒 Privacy & Data
- No telemetry — zero background network requests
- Generation data: note text + model name → your configured LLM endpoint only
- All data local — cards, history, stats, settings stored in vault plugin data by Obsidian
📄 License
🤝 Contributing
See CONTRIBUTING.md. Open an issue for large changes, submit PRs that pass npm run build && npm run lint.
📚 Releasing
See RELEASING.md for the release checklist and Community directory submission process.