安装和升级
Tarsail 通过 GitHub Releases 发布预构建二进制文件。
安装脚本会根据你的操作系统和 CPU 架构下载匹配资产,使用该 release 的 SHA256SUMS 校验文件,安装到 PATH 目录,并让 tarsail 命令全局可用。
Windows、macOS 或 Linux 上的 PowerShell:
irm https://tarsail.plystra.com/install.ps1 | iexLinux 或 macOS 上的 POSIX shell:
curl -fsSL https://tarsail.plystra.com/install.sh | sh如果没有 curl:
wget -qO- https://tarsail.plystra.com/install.sh | sh如果当前 shell 没有立即识别新的 PATH,打开一个新终端。
tarsail versiontarsail helpWindows 上 PowerShell installer 默认安装到当前用户 PATH 目录:
%LOCALAPPDATA%\Programs\Tarsail\binLinux 和 macOS 上两个 installer 都默认安装到:
/usr/local/binUnix installer 只会在目标目录不可写时使用 sudo。
再次运行同一条安装命令即可升级。
PowerShell:
irm https://tarsail.plystra.com/install.ps1 | iexPOSIX shell:
curl -fsSL https://tarsail.plystra.com/install.sh | sh脚本会用最新 GitHub Release 资产替换已有 tarsail 二进制文件。
安装指定 release
Section titled “安装指定 release”把 TARSAIL_VERSION 设置为 release ID。
PowerShell:
$env:TARSAIL_VERSION = "20260622-194500-a1b2c3d4e5f6"irm https://tarsail.plystra.com/install.ps1 | iexPOSIX shell:
curl -fsSL https://tarsail.plystra.com/install.sh | TARSAIL_VERSION=20260622-194500-a1b2c3d4e5f6 shTarsail release ID 会根据被推送 commit 的日期和短 commit hash 生成:
YYYYMMDD-HHMMSS-<12-char-commit>安装到自定义目录
Section titled “安装到自定义目录”PowerShell:
$env:TARSAIL_INSTALL_DIR = "C:\Tools\Tarsail"irm https://tarsail.plystra.com/install.ps1 | iexPOSIX shell:
curl -fsSL https://tarsail.plystra.com/install.sh | TARSAIL_INSTALL_DIR="$HOME/.local/bin" sh请确认自定义目录已经在 PATH 中。
Release assets 会为以下系统构建:
| 系统 | 架构 | 资产格式 |
|---|---|---|
| Linux | amd64, arm64 | .tar.gz |
| macOS | amd64, arm64 | .tar.gz |
| Windows | amd64, arm64 | .zip |
脚本会自动选择资产名称:
tarsail_<version>_<os>_<arch>.tar.gztarsail_<version>_<os>_<arch>.zip示例:
tarsail_20260622-194500-a1b2c3d4e5f6_linux_amd64.tar.gztarsail_20260622-194500-a1b2c3d4e5f6_darwin_arm64.tar.gztarsail_20260622-194500-a1b2c3d4e5f6_windows_amd64.zipRelease 来源
Section titled “Release 来源”默认从这里下载:
https://github.com/plystra/tarsail/releases如果用于 fork 或私有测试,可以覆盖仓库:
curl -fsSL https://tarsail.plystra.com/install.sh | TARSAIL_REPO=owner/repo sh$env:TARSAIL_REPO = "owner/repo"irm https://tarsail.plystra.com/install.ps1 | iex脚本会使用同一个 GitHub Release 下的 SHA256SUMS 校验下载归档。
更严格的环境中,可以先下载并检查脚本:
curl -fsSL https://tarsail.plystra.com/install.sh -o install.shless install.shsh install.shirm https://tarsail.plystra.com/install.ps1 -OutFile install.ps1notepad .\install.ps1.\install.ps1不要运行来自不可信域名的安装脚本。
发布 release
Section titled “发布 release”维护者通过推送到 main 发布二进制文件:
git push origin mainGitHub Actions release workflow 会运行测试,根据被推送 commit 的日期和短 commit hash 生成 release ID,构建 Linux、macOS 和 Windows 的 release assets,写入 SHA256SUMS,为该 release ID 创建 GitHub Release,并把它标记为 GitHub latest release。
也可以在 GitHub Actions 中通过 workflow_dispatch 手动运行 release workflow。手动运行会使用检出的 commit,并采用相同的日期加 hash 的 release ID 格式。
删除已安装二进制文件。
Windows PowerShell:
Remove-Item "$env:LOCALAPPDATA\Programs\Tarsail\bin\tarsail.exe"Linux 或 macOS:
sudo rm -f /usr/local/bin/tarsail如果安装到了自定义目录,请删除该目录下的二进制文件。