Skip to content

aerkn1/ObsiCard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง  ObsiCard โ€“ AI-Powered Flashcard Generator

ObsiCard intelligently turns your Obsidian notes into structured flashcards powered by Groq AI. Each approved flashcard is stored inside the same note and synced instantly with your Anki Desktop deck.

License: MIT GitHub release

โœจ Features

  • ๐Ÿง  AI Flashcard Generation - Powered by Groq API for intelligent flashcard creation
  • ๐Ÿ“ Review & Approval Modal - Review and edit flashcards before saving
  • ๐Ÿท๏ธ Smart Tag Recommendations - Dynamic or fixed tag modes
  • ๐Ÿ’พ Auto-Save to Notes - Flashcards stored under ## Flashcards section
  • ๐Ÿ”„ Real-Time Anki Sync - Seamless integration with Anki Desktop via AnkiConnect
  • ๐Ÿ“ก Offline Queue - Automatic retry system for failed syncs
  • โœ… Full Validation - Schema validation and repair pipeline
  • โšก Smart Chunking - Handles large notes with intelligent summarization
  • ๐ŸŽฏ Context Menu Integration - Right-click to generate flashcards

๐Ÿš€ Quick Start

  1. Install the Plugin

    • Download the latest release from GitHub Releases
    • Extract to your Obsidian vault's .obsidian/plugins/obsicard folder
    • Enable in Obsidian Settings โ†’ Community Plugins
  2. Configure API Keys

  3. Set Up Anki (Optional)

  4. Generate Flashcards

    • Highlight text or open a note
    • Right-click โ†’ "Generate Flashcards with ObsiCard"
    • Choose mode and tags
    • Review and approve flashcards
    • Done! Flashcards are saved and synced

โš™๏ธ Requirements

  • Obsidian Desktop v1.5.0 or higher
  • Groq API Key (free at console.groq.com)
  • Anki Desktop + AnkiConnect (optional, for syncing)

๐ŸŽฎ Usage

Generate from Selection

  1. Select text in your note
  2. Right-click โ†’ "Generate Flashcards with ObsiCard"
  3. Choose Dynamic (AI tags) or Fixed (your tags) mode
  4. Review generated flashcards
  5. Edit, select, and approve

Generate from Entire Note

  1. Open any note
  2. Click the brain icon in the ribbon, or
  3. Use Command Palette โ†’ "Generate Flashcards from Current Note"

Review Flashcards

  • Each flashcard shows Front, Back, and Tags
  • Click checkboxes to select/deselect
  • Click "Edit" to modify any flashcard
  • Click "Approve & Save" to save selected cards

Anki Sync

  • If Anki is running: flashcards sync immediately
  • If Anki is offline: flashcards are queued
  • Use "Process Anki Sync Queue" command to retry

๐Ÿ“‹ Commands

Command Description
Generate Flashcards from Selection Create flashcards from selected text
Generate Flashcards from Current Note Create flashcards from entire note
Process Anki Sync Queue Retry queued flashcards
View Sync Queue Status Check how many flashcards are queued
Test API Connections Verify Groq and Anki connectivity

โš™๏ธ Settings

Groq API Configuration

  • API Key - Your Groq API key
  • Model - Choose from Mixtral, Llama 3, or Gemma 2
  • Test Connection - Verify API access

Anki Integration

  • AnkiConnect URL - Default: http://127.0.0.1:8765
  • Deck Name - Target Anki deck (default: "ObsiCard")
  • Auto-sync - Enable/disable automatic Anki syncing

Advanced Settings

  • Max Chunk Size - Token limit per chunk (default: 3500)
  • Max Parallel Requests - Concurrent API calls (1-5)
  • Enable Offline Queue - Queue flashcards when Anki is offline
  • Max Retries - Retry attempts for failed syncs
  • Default Tags - Tags applied to all flashcards

๐Ÿงฉ How It Works

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Select Text    โ”‚
โ”‚  or Full Note   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Pre-Generation  โ”‚
โ”‚ Modal (Mode +   โ”‚
โ”‚ Tags Selection) โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Groq API Call  โ”‚
โ”‚  โ€ข Chunking     โ”‚
โ”‚  โ€ข Generation   โ”‚
โ”‚  โ€ข Validation   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Review Modal   โ”‚
โ”‚  (Edit/Select)  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Save to Note    โ”‚
โ”‚ (## Flashcards) โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Sync to Anki   โ”‚
โ”‚  (or Queue)     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ”’ Privacy

  • No Data Collection - ObsiCard never stores or shares your notes
  • Direct API Calls - Your content is sent directly to Groq (secured by your API key)
  • Local Storage - All settings and queued flashcards stored locally

๐Ÿงฉ Open Source

Released under the MIT License. You can use, modify, and distribute freely with attribution.

๐Ÿ› ๏ธ Development

# Clone repository
git clone https://github.com/aerkn1/ObsiCard.git
cd obsicard

# Install dependencies
npm install

# Run in development mode
npm run dev

# Run tests
npm test

# Build for production
npm run build

# Lint code
npm run lint

๐Ÿค Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“ Changelog

See CHANGELOG.md for version history.

๐Ÿ†˜ Support

๐Ÿ“š Resources

๐Ÿ™ Acknowledgments

  • Powered by Groq for fast AI inference
  • Inspired by the Obsidian and Anki communities
  • Built with Vite and TypeScript

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with โค๏ธ by Arda Erkan

If you find ObsiCard useful, consider โญ starring the repository!