This is an enhanced version of the IntelliFiller addon for Anki, allowing you to automatically fill note fields using various Large Language Models (LLMs).
For a detailed history of changes, please view the release-notes.md file or the Releases Page.
Attribution & Source
This add-on is a modified fork of IntelliFiller by ganqqwerty.
- Original Project: Source Code | AnkiWeb (9559994708) | AnkiWeb (1416178071) | Anki Forums (31618)
- This Enhanced Version: Source Code | AnkiWeb (1149226090)
Note
Cross-Platform Ready (Linux & macOS)
Developed & Validated Environment:
- OS: Windows 11 (Python 3.9.13 via Microsoft Store)
- Anki: Version 24.06.3 (d678e393) - (Python 3.9.18 / Qt 6.6.2 / PyQt 6.6.1)
- Features
- Prerequisites
- Installation
- Updating
- Advanced / Developer Installation
- Build Instructions
- Usage
- Configuration Guide
- Original Project
- Kardenwort Ecosystem
- License
- Multi-Provider Support: Use models from OpenAI, Anthropic, Google Gemini, OpenRouter, and Ollama.
- Custom Endpoints: Support for any OpenAI-compatible API (local LLMs, etc.).
- Configurable Models: Easily switch between models (e.g., GPT-4o, Claude 3.5 Sonnet, Gemini 1.5 Pro).
- Smart Batch Processing:
- Batch Processing: Select multiple cards in the browser and fill them in bulk.
- Configurable Delays: Set fixed and random delays between batches to avoid rate limits and disperse requests.
- Execution Queue: Queue multiple batch tasks to run sequentially.
- Pause/Resume: Manually pause processing to inspect results or yield to other tasks.
- Progress Tracking: Real-time progress dialog with live countdown and pause/resume capabilities.
- Flexible Prompting:
- Design prompts that use existing field data (e.g.,
{{{Sentence}}}) to generate new content. - Multi-Field Updates: Support for JSON responses to update multiple fields from a single prompt.
- Design prompts that use existing field data (e.g.,
- Advanced Prompt Management:
- Master-Detail Interface: Manage your prompts with an intuitive split-view editor.
- Save & Reuse: Store your favorite prompts for quick access.
- Secure Backups: Automatic, encrypted backups of your settings and prompts.
- Anki (Latest version recommended)
- Python 3.9 (For building from source)
- Open Anki.
- Go to Tools -> Add-ons.
- Click Get Add-ons...
- Enter the code:
1149226090 - Restart Anki.
- Download the latest
.ankiaddonfile from the Releases Page. - Open Anki.
- Go to Tools -> Add-ons.
- Click Install from file...
- Select the downloaded
.ankiaddonfile. - Restart Anki.
To install this addon from the source code (for development purposes), follow these steps:
- Clone this repository.
- Copy the
IntelliFillerfolder into your Ankiaddons21directory.- To find this directory, open Anki, go to Tools -> Add-ons, click View Files.
- Install dependencies (see Build Instructions).
- Restart Anki.
It is recommended to backup your data using the addon's backup feature (Backup tab in settings) before updating.
If the "Backups" tab is not available in your current version, please manually copy the entire addon folder from your addons21 directory to a safe location before proceeding.
- Download the new
.ankiaddonfile from Releases. - Install it using Install from file... in Anki's Add-on menu. This will overwrite the old version while preserving your user files.
Note: Versions v2.14.8+ include an automatic "Atomic Update" mechanism to prevent file locking errors. Future updates should proceed smoothly.
If you are updating from an older version (< v2.14.8), or if you encounter a PermissionError:
Method 1: Smooth Update (Recommended)
- Go to Tools -> Add-ons.
- Select
IntelliFillerand toggle it to Disabled. - Restart Anki.
- Check for updates and install the update.
- Enable the addon and Restart Anki.
Method 2: Recovering from a Failed Update
If you tried to update without disabling and received an error (and the addon now appears as a number like 1149226090):
- Select the numbered addon entry (e.g.
1149226090). - Click Check for Updates again and confirm the update.
- Once finished, Restart Anki. The addon should work correctly and the name will be restored.
The addon works around Windows file locking by hooking into Anki's update process. Instead of deleting the old folder, it renames it to _IntelliFiller_trash_TIMESTAMP and immediately deletes __init__.py and manifest.json from it. This prevents Anki from loading the trash folder on startup while ensuring the locked binary files can be cleaned up later.
Your persistent settings and prompts (in user_files) will be preserved.
This project includes scripts to manage Python dependencies (like openai, httpx) required by the addon.
If you are running the addon locally on your machine, run the setup script to install dependencies for your current platform:
python scripts/setup_vendor.py- Mac M1/M2 Users: Ensure you are running the ARM64 version of Python.
- Windows/Intel Mac: The script automatically handles your architecture.
This will populate the IntelliFiller/vendor directory with the necessary libraries.
To build a release that supports multiple platforms (Windows, macOS ARM/Intel, Linux), use the build release script:
python scripts/build_release.pyThis creates a vendor directory with subfolders for each platform, ensuring the addon works regardless of the user's OS.
To create an .ankiaddon package for distribution:
- Run
python scripts/build_release.pyto prepare dependencies. - Run
python scripts/package_addon.pyto create the artifact.
This will generate a timestamped .ankiaddon file in the project root, safely excluding sensitive user files.
You can optionally specify an output directory:
python scripts/package_addon.py --out "C:/My/Builds"Packaging Safety Features:
- Automatically excludes sensitive user files (
user_filesdirectory). - Excludes root-level secrets (
meta.json,credentials.json,settings.json). - Prints a warning if potentially sensitive files are detected in deep subdirectories.
- Open Anki Browser: Go to the card browser.
- Select Cards: Select one or more cards you want to fill.
- Right-Click: Choose IntelliFiller from the context menu.
- Configure:
- Select your Provider (OpenAI, Anthropic, Gemini, etc.).
- Enter your API Key.
- Choose or type the Model Name.
- Write your prompt using field placeholders like
{{{Front}}}. - Select the Destination Field for the result.
- (Optional) Use the Prompts tab to save or load existing prompt configurations.
- Run: Click Run to process the cards.
You can also launch IntelliFiller directly from the note editor using the dedicated button in the editor toolbar.
For advanced users who prefer editing JSON files or need to understand the underlying keys, here is an explanation of the configuration parameters.
apiKey: Your personal OpenAI GPT API key.emulate: Set to "yes" to use fake responses for testing, "no" for real API requests.
The prompts section is a list of prompt objects. Each object contains:
-
prompt: The text template sent to the AI.Using Placeholders: The
promptfield can contain placeholders in the form of{{{field_name}}}. Eachfield_namemust correspond to a field in your Anki notes.Example:
If you have a note with a "Word" field containing "apple", using
{{{Word}}}in your prompt will replace it with "apple".Prompt: "Explain the usage of {{{Word}}} in a sentence." Sent to AI: "Explain the usage of apple in a sentence."
-
targetField: The field name where the API response will be stored. -
promptName: A descriptive name for this prompt shown in the UI.
- HyperTTS: This extension may conflict with HyperTTS due to shared dependencies (
typing_extensions.py). If you see errors related to this, try disabling HyperTTS temporarily.
- M1/M2 Mac Users: Ensure you are using the ARM64 version of Python and pip when building from source.
- Intel Mac Users: Use the x86_64 version.
This project is a fork of IntelliFiller AI addon for Anki (forked from version 2.1.0). Significant improvements have been made to support a wider range of AI providers and configuration options.
This project is part of the Kardenwort environment, designed to create a focused and efficient learning ecosystem.
This project is licensed under the MIT License.
See the LICENSE file for details.