Background Auto Sync

AnkiWeb addon 226796325

Silently syncs your Anki collection in the background after inactivity or changes, avoiding focus interruptions, with configurable delays, idle syncing, conflict handling, and session logs.
AI-generated summary; may contain mistakes.

sync-integrationfork-or-reupload

Open on AnkiWeb GitHub Ask about alternatives

AnkiWeb

Rating
7 (πŸ‘ 5 Β· πŸ‘Ž 2)
Updated
2026-09-25
Anki versions
2.1.1~
Description language
en

Maintenance

active

  • Last update or commit was 6 days before the snapshot (2026-09-25).
  • The repository has 2 test files.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.1+2026-09-25
History across monthly snapshots

Loading…

Similar addons

Auto Sync

Automatically syncs your collection with AnkiWeb at configurable intervals on PyQt6 Anki, avoiding interruptions during reviews, open dialogs, or focused main windows.

sync-integration

Rating 27 πŸ‘ 24 Β· πŸ‘Ž 3 ⭐ 7 Anki 23.10.1~ Updated 2023-11-20
Bluetooth Anti-Lag Add-on

Loops silent audio while Anki runs to keep Bluetooth headsets awake, preventing audio lag at the start of card playback.

bugfix-workaround

Rating 2 πŸ‘ 2 Β· πŸ‘Ž 0 Anki 2.1.16~ Updated 2023-06-19
Nudger: Force Learn

Sends configurable Anki review reminders with quiet hours, snooze options, target deck selection, and no interruptions during active reviews.

motivation

Rating 0 πŸ‘ 0 Β· πŸ‘Ž 0 Updated 2025-08-28

README

Background Auto Sync for Anki

Automatically syncs your Anki collection in the background β€” without stealing focus, raising windows, or interrupting your workflow.

Install from AnkiWeb or download the latest release below.

Latest release: Background Auto Sync v5.0.1

This addon is a fork of Auto-Sync-Anki-Addon by Robin-Haupt-1.

Features

  • True background sync β€” If Anki is minimized, it stays minimized. If another app has focus, Anki won't steal it. The sync happens silently.
  • Periodic sync β€” Automatically syncs after a configurable period of inactivity (default: 1 minute after last interaction).
  • Idle periodic sync β€” While you're away, keeps syncing periodically (default: Off) to pick up changes from AnkiWeb, mobile, or other devices.
  • Change detection β€” Only syncs when the collection has actually been modified (cards added, reviewed, edited). Stops wasting bandwidth when nothing changed (enabled by default).
  • Idle-before-sync delay β€” When a change is detected, waits for a configurable idle period before syncing, so it doesn't interrupt an active editing session (default: 2 minutes).
  • Interruption avoidance β€” Three independently toggleable conditions (dialogs open / main window focused / reviewing) that defer sync, each with its own "allow sync anyway after" grace period, plus a global override timeout.
  • Session log file β€” View a timestamped log in the Logs tab or inspect auto_sync.log in the add-on folder. The file is cleared when Anki starts so it contains the current session's activity.
  • Support tab β€” The Support tab opens automatically once after each new release. Enable the supporter checkbox to prevent it from opening automatically in future releases.

Important Considerations

  • Undo Queue: Syncing terminates Anki's "undo" queue. Periodic sync may mean that if you take a break and return, you won't be able to undo actions performed just before the break.
  • Sync Conflicts: Auto-syncing on one device while actively using, editing, or studying on another device can lead to sync conflicts.
  • Idle Periodic Sync: Using "Idle periodic sync" while leaving Anki open may cause issues, especially if other add-ons with background activity are installed.
  • Interruption avoidance & override timeouts: Each interruption condition defers sync while true, but the "allow sync anyway after" timeouts let a sync proceed once you've been idle long enough. Consider whether you want a sync to fire mid-review or with the browser open before raising these values.

Installation

  1. Download the latest .ankiaddon from Releases.
  2. In Anki, go to Tools β†’ Add-ons β†’ Install from file… and select the downloaded file.
  3. Restart Anki.

Or install via AnkiWeb addon code (226796325).

Configuration

Go to Tools β†’ Background Auto Sync Options… to configure. The options are organized into three sections on one scrollable Settings tab.

Sync behavior

  • Only sync when changes are detected (Default: βœ… On) β€” Sync only when the collection was modified, avoiding unnecessary network traffic when nothing changed.
  • Sync after (Default: 1 minute) β€” Minutes of inactivity before syncing a changed collection. This control is disabled when change-only mode is enabled.
  • After a change, wait idle before syncing (Default: 2 minutes) β€” After detecting a change, wait this long without user activity before syncing, so an active editing session is not interrupted. This is enabled when change-only mode is enabled.

Interruption avoidance

These controls defer sync so it does not interrupt your work. Each condition can be enabled independently. A condition's effective grace period is the lower positive value of its specific timeout and the global timeout. A specific timeout of Off means it uses the global timeout; if both are Off, that condition never overrides.

  • Global override (Default: 10 minutes) β€” Caps the grace period for all interruption conditions. For example, a global value of 10 minutes and a focus value of 5 minutes produces an effective focus grace of 5 minutes.
  • Avoid sync when dialogs are open (Default: βœ… On) β€” Defer sync while selected Anki windows are open. The selectable windows are:
    • Card browser β€” the Browse window
    • Add cards β€” the Add Cards dialog
    • Edit current card β€” the Edit Current dialog
    • Deck stats β€” the statistics dialog
    • Preferences β€” the Preferences dialog
    • Allow sync anyway after (Default: Off) β€” Override this condition after the configured idle period.
  • Avoid sync when the main window is focused (Default: βœ… On) β€” Defer sync while Anki is focused.
    • Allow sync anyway after (Default: 5 minutes) β€” Permit sync after the configured period of inactivity even if Anki remains focused.
  • Avoid sync while reviewing (Default: βœ… On) β€” Defer sync unless Anki is on the deck browser or overview screen.
    • Allow sync anyway after (Default: Off) β€” Permit sync during another Anki screen after the configured period of inactivity.

Background and network

  • When idle, sync every (Default: Off) β€” While Anki is idle, periodically sync to pick up changes from AnkiWeb or another device. Use Off to disable. This is disabled when change-only mode is enabled.

  • Disable pre-sync internet check (Default: ❌ Off) β€” Skip the connectivity check and immediately attempt to sync. This can help with restrictive firewalls.

  • On sync conflict (Default: Ask me each time) β€” Choose how ambiguous full-sync conflicts are resolved: Always AnkiWeb β†’ local discards local changes, while Always local β†’ AnkiWeb overwrites AnkiWeb. Use a forced direction only when one side is authoritative.

Changes apply live. Use Save to close and keep them, Cancel to close the dialog, or Reset Defaults to restore the recommended defaults.

Logs

The Logs tab shows timestamped sync activity from the current Anki session. The same entries are written to auto_sync.log in the add-on root. The file is truncated when Anki starts, making it useful for reviewing a reproducible bug without old sessions obscuring the output.

Background Sync Behavior

The addon ensures syncs never interrupt your work:

  • If Anki is minimized β†’ stays minimized during and after sync
  • If Anki is behind other windows β†’ stays behind, doesn't raise to foreground
  • If another app has focus β†’ Anki won't steal focus
  • Window state is saved before sync and restored after sync completes

How It Works

  1. After user activity in Anki, a countdown timer starts.
  2. Once the idle timeout expires, the addon checks:
    • Is Anki in a "safe" state? (no dialogs open, not reviewing, etc.)
    • Is there internet connectivity?
    • If change-only mode: has the collection been modified?
  3. Window state is saved (minimized? focused? background?).
  4. Sync triggers via Anki's built-in sync.
  5. After sync completes, window state is restored exactly.
  6. The cycle restarts.

Support

If you find this add-on useful, please consider supporting its development:

ko-fi

License

GPL-3.0 β€” see LICENSE.txt.

Changelog

See CHANGELOG.md for the full history of changes and releases.