Skip to content

v0.9.0

Latest

Choose a tag to compare

@github-actions github-actions released this 05 Sep 16:54

tf v0.9.0

本版由 GitHub Actions 构建,产物与校验和见下。

新增

  • 交互登录和网页导入可选择默认 TokenFlux 网关或输入自定义地址;显式 --host 跳过选择,已有自建网关账户优先沿用原地址,成功导入后才保存。
  • Windows 原生控制台支持登录、方向键选择、中文及补充字符过滤、隐藏输入、行编辑与取消。建议使用 Windows Terminal 的 Git Bash;npm/pnpm 客户端需要 Git Bash 在 PATH 中。
  • install.sh 支持 Windows x64 Git Bash,下载并校验 ZIP 后安装 tf.exeuninstall.sh 同步支持 Windows 二进制与更新备份,默认保留凭据。
  • 新增独立的 install.ps1 / uninstall.ps1,支持 Windows PowerShell 5.1 和 PowerShell 7,不依赖 Git Bash 或外部下载、解压工具。校验失败及程序被占用时保留旧版本,卸载默认保留凭据,-Purge 不遍历目录链接。

修复

  • Windows 客户端退出后恢复控制台输入输出模式,将控制台中断状态转换为退出码 130。
  • Windows npm/pnpm 启动器通过配套 shell shim 启动,保留空参数、空格、引号和特殊字符,不将参数作为命令字符串执行。
  • 修复 Windows go install 来源识别;自更新替换失败时尝试恢复原可执行文件。

安全

  • Windows 配置目录、凭据和事务日志使用受保护的 DACL,仅允许当前用户、Administrators 和 SYSTEM 访问,不再把 chmod 0600 当作 Windows 的访问控制。

安装

npm(跨平台,需 Node.js 18+)

npm install -g @tokenflux/tf

升级请运行 npm install -g @tokenflux/tf@latesttf update 不会直接修改 npm 托管的文件)。

Windows PowerShell(独立脚本,无 Git Bash / Node 依赖)

irm https://raw.githubusercontent.com/tokenflux/tf-cli/main/install.ps1 | iex

支持 Windows PowerShell 5.1 与 PowerShell 7,安装到 %USERPROFILE%\.local\bin\tf.exe,校验 SHA-256 后替换程序。无需管理员权限;按脚本提示配置 PATH。

macOS / Linux / Windows Git Bash(独立脚本,无 Node 依赖)

curl -fsSL https://raw.githubusercontent.com/tokenflux/tf-cli/main/install.sh | sh

默认安装到 ~/.local/bin/tf,Windows x64 安装为 tf.exe(可通过 TF_INSTALL_DIR 自定义)。Windows 请在 Git Bash 中执行;脚本需要 curl、unzip 和 cygpath。升级直接运行 tf update

手动下载

系统 文件
macOS(Apple Silicon) tf_0.9.0_darwin_arm64.tar.gz
macOS(Intel) tf_0.9.0_darwin_amd64.tar.gz
Linux x86_64 tf_0.9.0_linux_amd64.tar.gz
Linux ARM64 tf_0.9.0_linux_arm64.tar.gz
Windows x64 tf_0.9.0_windows_amd64.zip

macOS 与 Linux 产物解压后将 tf 放入 PATH 即可。

Windows 产物解压后将 tf.exe 放入 PATH。建议在 Windows Terminal 的 Git Bash 中运行;经典 mintty 使用 winpty tf.exe。通过 npm/pnpm 安装的客户端需要 Git Bash 在 PATH 中。

卸载

Windows PowerShell

irm https://raw.githubusercontent.com/tokenflux/tf-cli/main/uninstall.ps1 | iex

默认保留凭据;下载脚本后使用 -Purge 可同时清理配置与缓存,自定义安装目录使用 -InstallDirTF_INSTALL_DIR

npm

npm uninstall -g @tokenflux/tf

独立脚本

仅删除 tf 二进制,保留配置、凭据与缓存:

curl -fsSL https://raw.githubusercontent.com/tokenflux/tf-cli/main/uninstall.sh | sh

同时清理配置、凭据与缓存目录:

curl -fsSL https://raw.githubusercontent.com/tokenflux/tf-cli/main/uninstall.sh | sh -s -- --purge

若安装时指定了 TF_INSTALL_DIR,可在管道右侧传入对应环境变量:curl -fsSL https://raw.githubusercontent.com/tokenflux/tf-cli/main/uninstall.sh | TF_INSTALL_DIR=/原安装目录 sh

校验

sha256sum -c SHA256SUMS --ignore-missing

引用版本:提交 900b7c8 / Go 1.27.0

Full Changelog: v0.8.0...v0.9.0