EN 中文

# Upgrade — Self-Upgrade

# Upgrade — 自动升级

Fetch the latest release binary and replace the running executable in-place.

从 GitHub Releases 拉取新版本二进制，原地替换当前运行的可执行文件。

## Quick Start

## 快速开始

    $ seek -upgrade-check  # Check for updates
    $ seek -upgrade        # Upgrade to latest

## How It Works

## 工作方式

1. Checks current version vs latest GitHub release
2. 比较当前版本与 GitHub 最新 release 版本
3. Downloads platform-specific tarball from GitHub Releases
4. 从 GitHub Releases 下载对应平台压缩包
5. Verifies SHA-256 checksum
6. SHA-256 校验
7. Replaces the running binary in-place (POSIX rename on Unix, rename-then-replace on Windows)
8. 原地替换当前二进制

## Safety

## 安全边界

- dev build protection — refuses to upgrade a dev build (which may be newer than latest release). Override with `-upgrade-force`.
- dev 版本保护——dev 构建通常比 release 更新，默认拒绝覆盖。设 -upgrade-force 强行升级。
- No backup — seek does not backup the old binary. Roll back by downloading from GitHub Releases.
- 不做备份——回滚请从 GitHub Releases 手动下载。

## CLI Reference

## CLI 参考

    $ seek -upgrade-check    # Check for update (print only, no download)
    $ seek -upgrade          # Download & apply update
    $ seek -upgrade-dry-run  # Download + verify checksum, don't replace binary
    $ seek -upgrade-force    # Allow dev→release upgrade