Version History - Notes and Note Types

AnkiWeb addon 1237174160

Keeps a local timeline of note and note-type changes, enabling per-field diffs, named snapshots, A→B comparisons, pinning, and undoable restoration of compatible content.
AI-generated summary; may contain mistakes.

note-managementcard-templatesbackup-maintenance

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
0 (👍 0 · 👎 0)
Updated
2026-08-08
Anki versions
26.05~
License
AGPL-3.0 (from the GitHub repository)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python, JSON
Description language
en

Maintenance

active

  • Last update or commit: 2026-08-08 (85 days before the snapshot).
  • Test files: 19.
  • GitHub Actions workflows: 1.
  • Commits in the last year: 5.
  • Issues: 0 open, 0 closed.
  • Pull requests: 0 open, 0 merged.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
23.1026.05+2026-08-08
History across monthly snapshots

Loading…

Similar addons

Set Added Date

Lets users change the added date of selected cards and notes via the browser's right-click or Cards menu, including dynamic offsets and timeline warnings.

note-management

22 votes 78% approval 👍 21 · 👎 1 ⭐ 3 Anki 25.02~ Updated 2023-07-16
No-Sync Note Converter

Converts Anki notes between types without triggering a full sync, offering field mapping, presets, review-history preservation, deck/tag retention, browser and reviewer conversion, and one-step undo.

schedulingnote-managementcard-templatescloze

1 votes 21% approval 👍 1 · 👎 0 ⭐ 1 Anki 2.1.1~ Updated 2026-09-02
Anki Time Warp

Rewrites card due dates via shifting, stretching, or daily caps, with filtered deck/tag selection, simulation previews, timeline charts, and single-step undo.

scheduling

2 votes 34% approval 👍 2 · 👎 0 ⭐ 1 Anki 25.02.1~ Updated 2026-09-16
Anki Semantic Search

Enables semantic and keyword search across selected Anki notes, generating cited AI answers through local or cloud providers.

aisearch

3 votes 44% approval 👍 3 · 👎 0 ⭐ 3 Anki 25.09.2~ Updated 2026-06-15

Description

Note history and per-field diff Note type template/CSS diff Tools menu

Keep a local timeline of observed changes to Anki notes (fields and tags) and note types (card templates and CSS). Inspect per-field diffs, create named snapshots, compare two stored versions as A→B, pin important versions, and restore compatible content without leaving Anki.

This is a safety net, not a guaranteed audit log of every keystroke. Automatic capture is debounced (1.5 seconds by default), so rapid consecutive operations can coalesce into one stored state.

Capture and compare

  • Automatic capture after observable Anki operations, including undo/redo checks.
  • Lazy by default: installation does not copy the whole collection. Create the offered full baseline before bulk edits, imports, full sync, or other add-ons if the earlier state of every note matters.
  • Normal merge-sync changes can be labeled Sync. History itself does not sync, and an uncaptured pre-sync state cannot be reconstructed afterwards.
  • Search names, labels, origins, tags, and optionally field/template content; filter 100-row pages and compare stored A→B endpoints across pages.
  • Named snapshots for one or many selected notes, plus pinning that protects important automatic versions from retention pruning.

Restore scope

  • Existing notes: restore matching current field names and tags, or selected matching fields only. Deck assignment, cards, scheduling, and review history are not restored.
  • Note types: restore front/back HTML for templates with the same name, plus CSS. Fields/schema and the template list are not changed, so this limited restore does not force a full sync.
  • Restores use Anki's public undoable operations (Ctrl+Z) and are recorded as new history rows.

Storage and maintenance

  • History is stored locally per profile under this add-on's user_files/, outside collection.anki2. It is not included in AnkiWeb sync or collection backups.
  • Full baseline, missing-history check/repair, retention, database-space reclaim, statistics, and previous-profile history reconnect tools are included.
  • English and Korean UI. Configuration can follow Anki's language or override it.

Version 1.2.1

  • Releases the history database and background work before future add-on install/update/delete operations on Windows, preventing the user_files / files_backup WinError 5 conflict.
  • In explicit A→B comparison mode, restore actions now restore endpoint B rather than an unrelated timeline row that happens to be selected.
  • Timeline searches now recognize the English and Korean labels displayed for stored origins and system operations.

Windows one-time update note: versions through 1.2.0 may still hold history.db open before 1.2.1 can install its fix. If updating the old version reports PermissionError: [WinError 5], close Anki, start it while holding Shift to disable add-ons for that run, then update once. If old local history is not needed, deleting the old add-on and installing it again is also acceptable.

Requires: Anki 23.10+ (Qt6). Developed and tested on Anki 26.05.

Source and documentation: https://github.com/udonehn/anki-version-history
Bug reports: https://github.com/udonehn/anki-version-history/issues

한국어

Anki 노트(필드·태그)와 노트타입(카드 템플릿·CSS)에서 관찰된 변경 상태를 로컬 타임라인에 보관합니다. 필드별 차이를 확인하고, 이름 있는 스냅샷을 만들고, 두 저장 버전을 A→B로 비교하고, 중요한 버전을 고정하고, 호환되는 내용을 Anki 안에서 복원할 수 있습니다.

모든 키 입력을 빠짐없이 보증하는 감사 로그가 아니라 안전망입니다. 자동 캡처에는 기본 1.5초 debounce가 적용되므로 빠르게 이어진 여러 작업은 하나의 저장 상태로 합쳐질 수 있습니다.

캡처와 비교

  • 실행 취소/다시 실행 검사를 포함해, 관찰 가능한 Anki 작업 뒤에 자동 캡처합니다.
  • 기본값은 지연 시작입니다. 설치만으로 컬렉션 전체를 복사하지 않습니다. 모든 노트의 변경 전 상태가 중요하다면 일괄 편집·가져오기·전체 동기화·다른 애드온 사용 전에 제안되는 전체 베이스라인을 만드세요.
  • 일반 병합 동기화로 들어온 변경은 동기화로 표시할 수 있습니다. 기록 자체는 동기화되지 않으며, 한 번도 캡처되지 않은 동기화 전 상태는 나중에 재구성할 수 없습니다.
  • 이름·작업명·출처·태그와 선택적으로 필드/템플릿 내용을 검색하고, 100행 단위 페이지를 필터링하며, 페이지를 넘나들어 저장 버전 A→B를 비교합니다.
  • 하나 또는 여러 선택 노트의 이름 있는 스냅샷을 만들 수 있습니다. 중요한 자동 버전을 고정하면 보존 정리에서 보호됩니다.

복원 범위

  • 존재하는 노트: 현재도 이름이 같은 필드와 태그 전체, 또는 선택한 일치 필드만 복원합니다. 덱 배정, 카드, 스케줄, 복습 기록은 복원하지 않습니다.
  • 노트타입: 이름이 같은 템플릿의 앞·뒤 HTML과 CSS를 복원합니다. 필드/스키마와 템플릿 목록은 바꾸지 않으므로 이 제한된 복원은 전체 동기화를 강제하지 않습니다.
  • Anki의 공개된 실행 취소 가능 작업을 사용하므로 Ctrl+Z로 되돌릴 수 있고, 복원 결과도 새 기록 행으로 남습니다.

저장과 유지보수

  • 기록은 프로필별로 이 애드온의 user_files/ 아래에 로컬 저장되며 collection.anki2 밖에 있습니다. AnkiWeb 동기화나 컬렉션 백업에는 포함되지 않습니다.
  • 전체 베이스라인, 기록 누락 검사·복구, 보존 정리, DB 여유 공간 회수, 통계, 이전 프로필 기록 다시 연결 도구를 제공합니다.
  • 영어·한국어 UI를 제공하며, Anki 언어를 따르거나 설정에서 지정할 수 있습니다.

버전 1.2.1

  • Windows에서 이후 애드온 설치·업데이트·삭제 전에 기록 DB와 백그라운드 작업을 종료해 user_files / files_backup의 WinError 5 충돌을 방지합니다.
  • 명시적 A→B 비교 모드의 복원은 관계없는 현재 선택 타임라인 행이 아니라 끝점 B를 복원합니다.
  • 타임라인 검색에서 화면에 표시되는 영어·한국어 출처명과 시스템 작업명을 인식합니다.

Windows 최초 1회 업데이트 안내: 1.2.0 이하 버전은 1.2.1의 수정 코드가 설치되기 전에 history.db를 계속 열고 있을 수 있습니다. 구버전 업데이트에서 PermissionError: [WinError 5]가 나오면 Anki를 닫고 Shift를 누른 채 실행해 이번 실행의 애드온을 비활성화한 다음 한 번 업데이트하세요. 예전 로컬 기록이 필요 없다면 구버전을 삭제하고 새로 설치해도 됩니다.

요구 사항: Anki 23.10 이상(Qt6). Anki 26.05에서 개발·테스트했습니다.

소스와 문서: https://github.com/udonehn/anki-version-history
버그 신고: https://github.com/udonehn/anki-version-history/issues

README

Version History for Anki — Notes & Note Types

Read this in other languages: 한국어

Version History keeps a local timeline of observed changes to Anki notes (fields and tags) and note types (card templates and CSS). You can inspect per-field diffs, create named snapshots, and restore compatible content without leaving Anki.

This is a safety net, not an audit log of every intermediate keystroke. Automatic capture is debounced (1.5 seconds by default), so rapid consecutive operations can coalesce into one stored state. Old unpinned automatic note versions are pruned according to the retention settings.

History is stored locally per Anki profile under the add-on's user_files/. It is not stored in collection.anki2, included in AnkiWeb sync, or shared between devices. A sync can trigger capture of the state that arrived, but the add-on cannot reconstruct a pre-sync state that was never captured. Create a full baseline before sync when that earlier state matters.

Screenshots

Note history & per-field diff Note type (template/CSS) diff Tools menu
Note history Note type diff Tools menu

Features and capture limits

  • Automatic capture — observable note and note-type changes are scanned after Anki operations. Undo and redo are also rechecked. The default 1,500 ms debounce means several quick operations may become one version rather than a row for each operation.
  • Sync-aware capture — normal merge-sync changes are rechecked and labeled Sync. After a full-sync replacement, the add-on rescans all notes only if a full baseline exists; in lazy mode it deliberately rescans only notes already tracked. It cannot reconstruct the old state of an untracked note after sync.
  • Lazy start, optional full coverage — installing the add-on does not copy all existing notes. When a note is loaded in the editor, its pre-edit state is cached and can become its first baseline. This does not protect untracked notes changed by bulk operations, another add-on, or sync. Create a full baseline before such operations if you need their previous states.
  • Diff, search, and comparison — inspect fields and tags or templates and CSS; search/filter 100-row pages; and compare two stored versions as A→B, including versions on different pages.
  • Snapshots and pinning — create named snapshots for one or many selected notes and pin important versions. Pinned automatic versions are protected from pruning. Manual snapshots are not pruned even after they are unpinned.
  • Undoable restore — restores use Anki's public undoable APIs and are recorded as new restore rows. Exact restore scope is documented below.
  • Profile-aware local storage — history remains connected after a profile is renamed. Reconnect Previous Profile History… can point the profile at an orphaned history database without merging or deleting directories.
  • Maintenance tools — check a fully baselined collection for missing history, inspect statistics and the database location, and reclaim free SQLite space.
  • English / 한국어 UI — follows Anki's language by default and can be overridden in the add-on configuration.

Media-file history exists in the source but is disabled in this release. The media-related configuration keys currently have no effect.

Requirements

  • Anki 23.10+ (Qt6)
  • Developed and tested on Anki 26.05

Installation

Fresh installation

  1. In Anki, open Tools → Add-ons → Get Add-ons….
  2. Enter 1237174160 (AnkiWeb page).
  3. Restart Anki when the installation finishes.
  4. Create the full baseline offered after startup if you want coverage for notes that have not yet been opened or edited.

Upgrading from 1.2.0 or earlier on Windows

Versions through 1.2.0 could leave history.db open while Anki tried to preserve user_files/ during an update. Windows then reported PermissionError: [WinError 5] while renaming user_files to addons21/files_backup. Version 1.2.1 closes its runtime before future installs and updates, but the old version cannot run that new code before the first upgrade.

For that one-time transition:

  1. Close Anki completely.
  2. Hold Shift while starting Anki and keep it held until Anki opens with add-ons disabled for that run.
  3. Open Tools → Add-ons and run Check for Updates.
  4. Install version 1.2.1 or later, close Anki, and start it normally.

See Anki's official add-on troubleshooting and safe-mode instructions. If you do not need the old history, deleting the old add-on and installing it again is also acceptable: use the same Shift safe-mode run to delete it, restart normally, and install code 1237174160 again. See Local data and backups before deleting anything you may want to keep.

First setup: create a baseline

The default lazy mode starts recording new observed states without copying your whole collection. On the first profile open, the add-on offers a one-time full baseline. Declining suppresses the automatic offer, but the command remains at:

Tools → Note Version History → Baseline Entire Collection…

A full baseline is strongly recommended before bulk Find & Replace, large imports, full sync, or use of other add-ons that can modify many notes. It is required for Check & Repair Missing History… and is the only way to guarantee a stored pre-change state for notes that have never been tracked. The baseline reads the collection in the background and can resume if interrupted.

Usage

Notes

  • In the Browser, select one card and use Notes → 🕘 Version History…, the right-click command, or Ctrl+Alt+H. The editor also provides a 🕘 button.
  • Use Snapshot Selected Note(s) from the Browser context menu to snapshot one or many selected notes in a chunked background job.
  • Search names, operation labels, origins, tags, and optionally field content. Filters include automatic, sync, snapshot, restore, baseline, deletion, and pinned rows.
  • Choose Compare specified versions (A→B) to set, swap, and clear comparison endpoints across pages and filters.

Note types

  • Open Tools → Note Version History → Note Type History…, or use the 🕘 Version history… button in the card-template editor.
  • Inspect and compare front templates, back templates, and CSS; create a snapshot; or restore the compatible template/CSS surfaces described below.

Tools menu

  • Baseline Entire Collection… — create or resume the one-time full note and note-type baseline.
  • Check & Repair Missing History… — after a completed baseline, hash-check all notes and capture states missing from history. In lazy mode it refuses to run so it does not turn every existing note into a misleading automatic version.
  • Reclaim Database Space… — run a full SQLite vacuum to return already-free pages to the filesystem. It does not select additional versions for deletion.
  • Reconnect Previous Profile History… — connect this profile to another history database found under this add-on's user_files/; it does not merge or delete databases.
  • About / Statistics… — show note/note-type row counts and the current local database directory.

What restore does

Target Restored Not restored / conditions
Existing note, whole version Stored field values whose names still exist, plus tags Does not reconstruct the historical note type, deck assignment, card states, scheduling, or review history. Stored fields with no current name match are skipped.
Existing note, selected fields Only selected stored fields whose names still exist Tags and every unselected/nonmatching field remain unchanged.
Deleted note, restore as new Matching field values and tags into a new note in a deck you choose The command is available only while that note's timeline is already open or otherwise reachable; there is currently no global deleted-note browser. The original note ID, cards, scheduling, and reviews are not resurrected, and the stored note type must still exist.
Existing note type Front/back HTML of templates matched by exact template name, plus CSS Does not add, delete, rename, or reorder templates; does not change fields/schema, sort field, note-type name, or scheduling. Missing names are reported and skipped/kept. This limited restore does not force a full sync.
Deleted note type Earlier template/CSS versions remain viewable It cannot be restored unless that note type still exists in the collection.

Restores are undoable with Ctrl+Z. A restore is also recorded as a new history row so the action remains visible in the timeline. If the relevant card-template editor is already open, a note-type restore is loaded into that editor and takes effect when you press Save.

The Deleted filter applies inside the note timeline you have opened; it is not a collection-wide list of deleted notes.

Configuration

Open Tools → Add-ons, select Version History - Notes and Note Types, and choose Config. The help pane documents every key; the defaults are:

  • automatic capture: on
  • debounce: 1,500 ms
  • heartbeat scan: every 5 minutes
  • retention: at most 100 unpinned automatic note versions per logical note and 180 days
  • excluded note-type IDs: none
  • language: auto (follow Anki; en and ko are available)

Saving configuration immediately refreshes the settings cache and heartbeat. auto_capture, debounce, and exclusions apply to subsequent work. Retention is enforced at the next automatic maintenance opportunity (at most once per day), not as soon as the Config dialog closes. A language change affects newly created UI; restart Anki to reliably relabel the already-created Tools menu.

Turning auto_capture off pauses operation/sync/heartbeat capture, profile-open catch-up and unclean-shutdown healing, and automatic retention maintenance. Manual snapshots, the manual full baseline, Check & Repair Missing History…, history viewing, and restore remain available. The off period does not discard or advance the history scan marker/boundary, so the first automatic scan after re-enabling may record the final observed state reached while capture was off, but it cannot reconstruct that period's pre-change or intermediate states.

Exclusions apply to automatic note capture only. They do not erase existing history and do not exclude note types themselves, manual snapshots, or the manual full baseline. Automatic-note retention does not prune note-type versions, manual snapshots, baselines, restore rows, deletion markers, pinned automatic rows, or the newest automatic row for a note. See the configuration reference for exact keys, ranges, and timing.

Local data and backups

History is a schema-v2 SQLite database stored in a per-profile subdirectory of user_files/. Notes are tracked by Anki GUID, and a profile setting keeps the same database attached after a profile rename. The history database is separate from the collection; only restore operations intentionally change the collection, via Anki APIs.

  • No sync: history is not uploaded by AnkiWeb and each device has its own timeline.
  • No collection-backup coverage: because this data is outside collection.anki2, back up user_files/ separately if it matters to you.
  • Updates: Anki is designed to preserve user_files/ when an add-on is upgraded (official user_files documentation). Version 1.2.1 also releases this add-on's Windows file handles before updates.
  • Uninstall: close Anki and copy the entire user_files/ directory somewhere safe before deleting the add-on. Anki 26.05 normally sends a deleted add-on directory to the operating-system trash, but the trash is not a backup strategy.

Default Windows locations:

  • AnkiWeb/prod: %APPDATA%\Anki2\addons21\1237174160\user_files
  • linked dev copy described below: inside the linked source tree at src\note_version_history\user_files

The prod and dev directories therefore have separate configurations and separate history databases even when they use the same Anki base. They do, however, act on the same Anki collection when that base is shared.

Development

Tests and package build

python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e ".[dev]"
.\.venv\Scripts\python.exe -m pytest
.\.venv\Scripts\python.exe -m ruff check src tests build.py
.\.venv\Scripts\python.exe build.py                 # -> dist/*.ankiaddon

Only __init__.py, scheduler.py, and ui/ import aqt; the remaining modules are headless-testable.

Everyday dev/prod switching in one Anki base (Windows)

Anki accepts a nonnumeric folder name for a local add-on, while an AnkiWeb add-on uses its numeric ID. This lets the prod folder 1237174160 and a dev junction note_version_history_dev coexist. Create the junction once, with Anki closed; it remains valid until the junction is removed or the source path moves. Never have both copies enabled at the same time.

Run this in Command Prompt (cmd.exe), replacing the source path if the repository is elsewhere:

mklink /J "%APPDATA%\Anki2\addons21\note_version_history_dev" "C:\work\anki-version-history\src\note_version_history"

Or run this equivalent command in PowerShell:

cmd /c mklink /J "$env:APPDATA\Anki2\addons21\note_version_history_dev" "C:\work\anki-version-history\src\note_version_history"

The addons21 directory must already exist; starting Anki once creates the normal base structure. See Anki's official add-on folder and symlink guidance.

To switch versions:

  1. Open Tools → Add-ons.
  2. Disable the currently active copy and enable the desired copy. If prod is not installed yet, disable dev first, then install code 1237174160.
  3. Confirm that exactly one of 1237174160 (prod) and note_version_history_dev (dev) is enabled. If their display names are the same, use View Files to distinguish their folders.
  4. Restart Anki before using the add-on. Enable/disable changes only take effect after restart because add-ons are loaded at startup.

Do not point the junction at the numeric prod folder, install an .ankiaddon over the junction, update the linked dev copy through Anki's package installer, or use Anki's Delete action as a way to manage the source tree. To remove dev, close Anki and remove only the junction itself; do not delete the source directory.

Isolated base for risky lifecycle tests

The same-base toggle is convenient for ordinary development, but it shares the real profile and collection. Use a disposable base for package install/update, uninstall, migration, full-sync, baseline/repair, and destructive restore tests. Anki's -b option is an advanced startup option, not a requirement for everyday source editing.

With every other Anki instance closed, start the isolated base:

"%LOCALAPPDATA%\Programs\Anki\anki.exe" -b "%LOCALAPPDATA%\AnkiVersionHistoryDev"

Always use the same -b argument for that base; the executable path can differ by installation method. Build the .ankiaddon, then install it through the local package installer in this isolated base. Do not add the everyday source junction to it: two junctions that target the same source tree also share that tree's user_files/, even though their Anki bases differ. A physically installed package has its own user_files/ inside the disposable base and exercises Anki's real install/update/uninstall lifecycle.

If an isolated base truly needs live-linked source, use a separate disposable checkout or copy as the junction target so its runtime user_files/ is not the one in your everyday working tree.

License

AGPL-3.0 © 2026 udonehn. Anki's anki/aqt packages are AGPL-3.0 and this add-on links against them.