Skip to content

Auto Update EN

zhenhun edited this page Sep 4, 2026 · 1 revision

中文 | English

Detection Mechanism

On startup BIT probes for the latest version in the following order (if one source fails, it falls through to the next):

  1. https://yxpil.github.io/bit/latest.json
  2. https://osbt.space/latest.json
  3. GitHub API repos/yxpil/bit/releases/latest

latest.json contains the version number, release notes, and a direct-download URL map per platform (windows-x64 / windows-arm64 / macos-arm64 / macos-x64 / linux-x64 / linux-arm64).

Update Flow

  1. Detection: after startup a background task compares versions; when a new version is found, an update pill appears next to the version number in the title bar (throttled to once every 6 hours, so it won't nag)
  2. Download: 6 seconds after launch, the installer for the current platform is silently downloaded in the background to the upgrade directory (completes on its own, no action required); the pill shows progress while downloading
  3. Install: once the download finishes, the pill turns into "Restart to Update" — clicking it installs and restarts. Quitting via the tray also swaps in the new version automatically (quit old → install new → optional restart)

Manual Trigger

  • Click the update pill in the title bar
  • Remote API: GET /api/update/check → POST /api/update/download → restart

Idempotency and Fault Tolerance

  • If an installer with the same version and filename already exists and is non-empty, it is reused as-is — no duplicate download
  • If a download fails or the content is empty, an error is raised and recorded in the audit log; the current version keeps running unaffected
  • If the current version is already the latest, the status returns none

Offline / Restricted Environments

Three detection sources plus the GitHub API fallback; if all of them fail, BIT only shows "Unable to fetch the latest version info for now" and normal usage is unaffected.

Clone this wiki locally