安装#
tgs 以单个静态二进制文件分发,无任何运行时依赖。选择适合你平台的方式即可——安装后的命令始终是 tgs。
Homebrew(macOS 和 Linux)#
在 macOS 和 Linux 上最快的方式:
brew install garenal1v3/tap/tgs-cli该命令会安装 tgs 二进制文件,并可通过 brew upgrade 保持更新。
预编译二进制文件#
从发布页面下载对应平台的归档文件。归档命名为 tgs-cli_<os>_<arch>:
| 平台 | OS | Arch |
|---|---|---|
| macOS(Apple 芯片) | darwin | arm64 |
| macOS(Intel) | darwin | amd64 |
| Linux | linux | amd64 / arm64 |
| Windows | windows | amd64 / arm64 |
macOS 和 Linux#
# Choose your platform: OS = darwin (macOS) or linux; ARCH = arm64 or amd64
OS=darwin
ARCH=arm64
curl -L -o tgs.tar.gz \
"https://github.com/garenal1v3/tgs-cli/releases/latest/download/tgs-cli_${OS}_${ARCH}.tar.gz"
tar -xzf tgs.tar.gz tgs
sudo mv tgs /usr/local/bin/
tgs versionWindows#
# PowerShell — ARCH = amd64 or arm64
$Arch = "amd64"
Invoke-WebRequest `
-Uri "https://github.com/garenal1v3/tgs-cli/releases/latest/download/tgs-cli_windows_$Arch.zip" `
-OutFile tgs.zip
Expand-Archive tgs.zip -DestinationPath .
# Move tgs.exe into a directory on your PATH, then:
.\tgs.exe version从源码构建#
需要 Go 1.26 或更高版本:
git clone https://github.com/garenal1v3/tgs-cli.git
cd tgs-cli
make build # produces ./tgs in the repo root
# or install into $GOBIN / $GOPATH/bin:
make install验证安装#
tgs version你应该会看到一个包含版本、提交和构建日期的 JSON 对象。接下来请阅读快速开始。