# 從原始碼建置


需要 Git 與 Go 1.27.4。macOS 還需要 Xcode Command Line Tools 與 CGO，才能支援鑰匙圈（Keychain）。

macOS 或 Linux：

```sh
git clone https://github.com/kongesque/line-cli.git
cd line-cli
./install.sh
```

Windows 請在 PowerShell 中執行：

```powershell
git clone https://github.com/kongesque/line-cli.git
Set-Location line-cli
$env:CGO_ENABLED = "0"
go build -trimpath -o .\bin\line.exe ./cmd/line
.\bin\line.exe help
```

開發檢查項目、測試樣本（fixtures）、平台整合與發行流程，請參閱[開發指南](https://github.com/kongesque/line-cli/blob/main/docs/DEVELOPMENT.md)。一般測試使用合成資料與模擬 API；連線至實際 LINE 環境的測試需要明確授權。


---
Source: https://kongesque.github.io/line-cli/zh-tw/reference/build/
