Skip to content

LETHEVIET/AnkiInject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Anki Inject Logo

๐Ÿง  Anki Inject: AI-Powered Flashcard Creator

Release License: MIT Build

Anki Inject is a minimalist desktop companion designed to streamline your study workflow. Instead of manual data entry, use Google Gemini AI as your high-speed formatting assistant to transform "fuzzy" study notes, raw textbook snippets, or unstructured thoughts into perfectly structured Anki flashcards.

Stop wrestling with formatting. Start refining your knowledge with an AI study collaborator.

Anki Inject Demo


โœจ Features

  • ๐Ÿš€ Fuzzy Note Processing: Paste messy, unstructured notes and let Gemini AI extract core concepts and structure them into clear Q&A pairs.
  • ๐Ÿช„ Formatting Assistant: Automatically converts raw text into clean HTML-formatted flashcards, saving you hours of manual tagging and styling.
  • ๐Ÿ‘ฉโ€๐Ÿ’ป Human-in-the-Loop: Anki Inject doesn't replace your study processโ€”it accelerates it. Review, refine, and edit every card in an immersive editor before it reaches your deck.
  • ๐Ÿค– AI Refinement Assistant: Use natural language to instantly "Simplify", "Explain", or "Correct" any card during the review phase.
  • ๐Ÿ“ฅ Seamless Injection: Directly push your final, polished cards to Anki with a single click.
  • โš™๏ธ Native Persistence: Securely stores your settings in standard system configuration paths for a truly native experience.
  • ๐ŸŽจ Modern UI: Features a beautiful, distraction-free interface with stacked card aesthetics and neutral color palettes designed for focus.
  • ๐Ÿ”ง Customizable AI Prompts: Take full control of the generation process. Define your own system prompts in Settings to tailor how the AI formats your cards (e.g., "Always use bold for keywords", "Make it a multiple choice question").

๐Ÿ› ๏ธ How it Works

  1. Paste your content: Textbooks, articles, or notesโ€”any text works.
  2. Generate: Let Gemini AI extract the important bits and structure them as Q&A.
  3. Refine: Edit cards manually or ask the AI Assistant for help.
  4. Inject: Send everything to Anki with a single click.

๐Ÿ› ๏ธ Tech Stack

Backend (Python Core)

  • Language: Python 3.10+
  • Application Wrapper: pywebview โ€” Native windowing and Python/JavaScript bridge. Optimized for the GTK backend on Linux.
  • AI Integration: google-genai โ€” Interfaces with Google's Gemini models for flashcard generation and refinement.
  • HTTP Client: httpx โ€” Modern, async-ready HTTP client for AnkiConnect and AI streaming.
  • Process Management: psutil & gc โ€” Used for memory profiling and manual garbage collection.

Frontend (Modern Web)

  • Framework: Svelte (TypeScript) โ€” High-performance reactive UI with a near-zero runtime footprint.
  • Styling: Tailwind CSS โ€” Utility-first styling with modern aesthetics.
  • Icons: Lucide Svelte โ€” Clean, scalable UI icons.
  • Build Tool: Vite โ€” Fast, modern frontend bundling.

Packaging & Performance

  • Bundler: PyInstaller โ€” Standalone executable packaging.
  • Distribution: AppImage โ€” Universal single-file Linux distribution.

๐Ÿ“ฅ Installation

Download Binaries

The easiest way to get started is to download the latest version for your operating system from the Releases page.

  • Windows: Download the .exe and run.
  • Linux: Download the .AppImage, make it executable (chmod +x ...), and run.

Prerequisites (for Anki Integration)

  1. Have Anki installed and running.
  2. Install the AnkiConnect add-on.

๐Ÿ—๏ธ Development Setup

If you want to build from source or contribute:

  1. Clone the repo:

    git clone https://github.com/yourusername/anki_inject.git
    cd anki_inject
  2. Backend Setup (Python & uv):

    uv sync
  3. Frontend Setup (Svelte & Node):

    cd frontend
    npm install
    npm run build
    cd ..
  4. Run:

    uv run main.py

๐Ÿค Contributing

Contributions are welcome! Whether it's a bug report, a new feature, or UI polish, feel free to open an issue or pull request.

๐Ÿ“„ License

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


Powered by Google Gemini AI & Svelte Targeted at Language Learners, and Life-long Students.

About

๐Ÿง  Anki Inject: AI-Powered Flashcard Creator

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors