Clanki is a terminal-based Anki review client that lets you review your Anki flashcards directly from the terminal. It uses the same underlying database and scheduling as Anki Desktop, so your progress stays perfectly in sync.
| Feature | Supported |
|---|---|
| Anki scheduling algorithms | ✅ |
| Image rendering | ✅ |
| Audio playback | ✅ (macOS/Linux/Windows) |
| Basic cards | ✅ |
| Cloze cards | ✅ |
| Type in the answer | 🚧 (planned) |
| Image occlusion | ❌ |
| Custom card styling | ❌ |
- Python 3.10 or later
- Anki Desktop installed with at least one synced profile
- Anki Desktop must be closed when running clanki
- For Linux/Windows audio playback:
ffplay(from FFmpeg) available inPATH
uv is the fastest way to install Python tools.
uv tool install clankiThis installs clanki as a global command - no venv activation needed.
pipx install clankipython3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install clankiBefore using clanki, you must sync your Anki collection at least once using Anki Desktop. This ensures your collection database exists and authentication credentials are cached.
If you already have Anki Desktop installed and synced with your AnkiWeb account, you can skip these steps.
- Open Anki Desktop
- Sign in to your AnkiWeb account
- Sync your collection (Sync button or press Y)
- Close Anki Desktop
# Check version
clanki --version
# Or run as a module
python -m clanki --versionSimply run clanki to launch the TUI:
clankiClanki writes directly to your local Anki database. Syncing is not automatic, run this command to push your progress to AnkiWeb:
clanki syncSync after reviewing, or before starting if you've reviewed on another device. You can also sync as you would normally through the Anki Desktop app.
Cause: Clanki cannot find your Anki data directory or no profiles exist.
Solutions:
- Ensure Anki Desktop has been installed and run at least once
- Sync your collection in Anki Desktop at least once
- Check that profiles exist in your Anki data directory:
- macOS:
~/Library/Application Support/Anki2/ - Linux:
~/.local/share/Anki2/(or$XDG_DATA_HOME/Anki2/) - Windows:
%APPDATA%/Anki2/
- macOS:
Cause: The profile directory exists but doesn't contain a collection database.
Solution: Open Anki Desktop, select the profile, and sync to create the collection.
Cause: AnkiWeb credentials are not cached locally.
Solution: Open Anki Desktop, sign in to AnkiWeb, and sync at least once. This caches your credentials for clanki to use.
If your Anki data is stored in a non-standard location, set the ANKI_BASE environment variable:
export ANKI_BASE="/path/to/custom/Anki2"
clankiThis is useful for:
- Portable Anki installations
- Multiple Anki installations
- Testing with a separate data directory
-
More review actions (bury, suspend, flag, etc.)
added v0.1.3
-
Audio playback on Linux/Windows (via ffplay)
added v0.1.4
-
Custom decks (filtered decks)
-
Support for type in answer cards
-
Profile switching within the TUI
-
Review statistics
-
Ability to run program with Anki desktop app open
- Ability to create or edit cards/decks
- Rendering custom card styles
- Plugin support
- Math/LaTeX rendering